blockTableFunction

Table function defined by external data on file using Modelica's CombiTable format

Extends from Interfaces.PartialConverters.SISO_Conversion (Partial SISO converter class with input and output conversions for lookup functions), Icons.InterpolationTable (Icon for table functions).

Information

This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.

This converter uses the Modelica CombiTable format to read in a 1-D table function from file. For more explanation regarding the 1-D Modelica CombiTable interpolation see Modelica.Blocks.Tables.CombiTable1Ds.

For more convenience, the input u to and the ouput from the lookup table can be converted into different units. This typically applies to rates and times which in non-technical modeling will typically not be referenced in SI-units (e.g., s).

Notes

The Modelica CombiTable format can be generated by Wolfram Mathematica using Export[]:

Export[ filename, { {"TableName1", table1}, {"TableName2", table2}, ... }, "MCTT" ]

where table1, table2, ... are 2-dimensional arrays. By default all lookup data are assumed to be included in a single file whose name is given by the global parameter lookupDataFileURI.

See also

TableFunctionVectorLinearTimeTable

Parameters

TypeNameDefaultDescription
Time Conversion
BooleanconvertInput (from SISO_Conversion)false= true, if the input value is a rate or time variable that needs to be converted
BooleaninputIsRate (from SISO_Conversion)false= true, if the input is given in units of time, otherwise it is assumed to be a rate
BooleanconvertOutput (from SISO_Conversion)false= true, if the output value is a rate or time variable that needs to be converted
BooleanoutputIsRate (from SISO_Conversion)false= true, if the output is given in units of time, otherwise it is assumed to be a rate
TimeBasestimeBaseInput (from SISO_Conversion)TimeBases.secondsTimeBase to convert from (default = seconds)
TimeBasestimeBaseTableIn (from SISO_Conversion)modelSettings.modelDisplayTimeBaseTimeBase used for the lookup function input (default = modelDisplayTimeBase)
TimeBasestimeBaseTableOut (from SISO_Conversion)modelSettings.modelDisplayTimeBaseTimeBase assumed for the lookup function output (default = modelSettings.modelDisplayTimeBase)
TimeBasestimeBaseOutput (from SISO_Conversion)TimeBases.secondsTimeBase used for the output (default = seconds)
TableDataDefinition
BooleantableOnFilefalse= true, if table is defined on file or in function usertab (combiTable1D.tableOnFile)
Real[:,:]tablefill(0.0, 2, 2)Table matrix (combiTable1D.table)
StringtableName"NoName"Name of the table in the file containing the data
StringfileNameURImodelSettings.lookupDataFileURIURI of the file to read the data from (default = modelSettings.lookupDataFileURI)
BooleanverboseReadtrue= true, if info message that file is loading is to be printed (combiTable1D.verboseRead)
TableDataInterpretation
SmoothnesssmoothnessSmoothness.LinearSegmentsSmoothness of table interpolation
Integercolumn2Column of table to be interpolated
ExtrapolationextrapolationModelica.Blocks.Types.Extrapolation.HoldLastPointExtrapolation of data outside the definition range (combiTable.extrapolation)
BooleanverboseExtrapolationfalse= true, if warning messages are to be printed if table input is outside the definition range (combiTable.verboseExtrapolation)

Connectors

TypeNameDefaultDescription
Connectors.RealInputu (from SISO)Input

Components

TypeNameDefaultDescription
RealOutputy (from SO)
ModelSettingsmodelSettings (from SISO_Conversion)

Revisions

  • Updated in v2.0.0.