OpenTURNSFMUPointToFieldFunction
- class OpenTURNSFMUPointToFieldFunction(*args)
Define a PointToFieldFunction from a FMU file.
Methods
__call__
(X)Call self as a function.
Get the list of input variable names.
Get the list of output variable names.
Accessor to the description of the input values of the function.
Accessor to the dimension of the input point of the function.
Accessor to the description of the output field values.
Accessor to the dimension of the output field values.
Accessor to the mesh of the output field of the function.
initialize
([initialization_script])Initialize the FMU, using initialization script if available.
load_fmu
(path_fmu[, kind])Load an FMU.
setInputDescription
(descIn)Accessor to the description of the input values of the function.
setOutputDescription
(descOut)Accessor to the description of the output field values.
simulate
([value_input, reset])Simulate the fmu.
- getFMUInputDescription()
Get the list of input variable names.
- getFMUOutputDescription()
Get the list of output variable names.
- getInputDescription()
Accessor to the description of the input values of the function.
- Returns:
- descInsequence of str
The description of the input values of the function.
- getInputDimension()
Accessor to the dimension of the input point of the function.
- Returns:
- inputPointDimint
The dimension of the input point of the function
.
- getOutputDescription()
Accessor to the description of the output field values.
- Returns:
- descOutsequence of str
The description of the output field values of the function.
- getOutputDimension()
Accessor to the dimension of the output field values.
- Returns:
- outputFieldDimint
The dimension of the output field values
.
- getOutputMesh()
Accessor to the mesh of the output field of the function.
- Returns:
- outputMeshint
The mesh of the output field of the function.
- initialize(initialization_script=None)
Initialize the FMU, using initialization script if available.
- Parameters:
- initialization_scriptString (optional), path to the initialization
- script.
- load_fmu(path_fmu, kind=None, **kwargs)
Load an FMU.
- Parameters:
- path_fmuString, path to the FMU file.
- kindString, one of “ME” (model exchange) or “CS” (co-simulation)
Select a kind of FMU if both are available. Note: Contrary to pyfmi, the default here is “CS” (co-simulation). The rationale behind this choice is is that co-simulation may be used to impose a solver not available in pyfmi.
- Additional keyword arguments are passed on to pyfmi’s ‘load_fmu’
- function.
- setInputDescription(descIn)
Accessor to the description of the input values of the function.
- Parameters:
- descInsequence of str
The description of the input values of the function.
- setOutputDescription(descOut)
Accessor to the description of the output field values.
- Parameters:
- descOutsequence of str
The description of theof the output field values of the function.
- simulate(value_input=None, reset=True, **kwargs)
Simulate the fmu.
- Parameters:
- value_inputVector of input values.
- resetBoolean, toggle resetting the FMU prior to simulation. True by
- default.
- timeSequence of floats, time vector (optional).
- timestepFloat, time step in seconds (optional).
- Additional keyword arguments are passed on to the ‘simulate’ method of
- the underlying PyFMI model object.