Flux-Activate co-simulation: preparation of the Twin Activate model
Preparation
In Twin Activate : File > Preference > Path, set the access path to Flux, for example : C:/Program Files/Altair/2020/flux/Flux/
In Twin Activate : Palette browser > Activate > CoSimulation, choose the Flux block.
Set the coupling block and the necessary components for the construction of the desired model.
"Coupling with Flux" component
The new block "Flux" available in Twin Activate : :
- "Parameters" tab
Field | Description |
---|---|
Flux to Twin Activate component file name | Coupling component created by Flux. |
Multiplexed inputs/outputs | Allow choosing between input/output vector or scalar mode. |
Number of input ports | The number of input parameters stored in the *.F2STA file. |
Number of output ports | The number of output parameters stored in the *.F2STA file. |
- Flux Activation tab
Field | Description |
---|---|
External activation | This parameter defines if the block receives an external activation or inherits. When "external activation" is used, an additional activation port is added to the block (red). If "external activation" is enabled, the Flux engine does the computation only at event instants, e.g., at a fixed-rate defined by an external clock. If this option is enabled, the "Minimal variation (%) to run Flux computation" and "Maximum computation interval" fields are disabled. |
Extra Flux calls at Twin Activate event instants | Twin Activate only calls the Flux block at Twin Activate solver mesh-point. If this checkbox is checked, the Flux block is also called at other instants such as discrete-time events during co-simulation. Extra points provide more detailed outputs especially at event instants. |
Minimal input variation (%) to run Flux computations | Minimal input variation (%) to run Flux computation. Permits to define a percentage of variation of the input parameters between two calculation steps under which the Flux calculation will not be carried out, the outputs will be extrapolated in agree with the option « Output extrapolation order ». This allows carrying out several Twin Activate time steps, without systematically doing any Flux calculation. |
Maximum computation interval | If a non-zero "Maximum computation interval" is provided, and a non-zero 'Minimal input variation' is specified, the Flux engine is forced to perform a computation not later than the 'Maximum computation interval' since the last computation, even if the input values have not changed. |
Output extrapolation order | Choose the output extrapolation order (0 : no extrapolation, 1 : linear extrapolation). |
Add one-step delay | When activated, this field indicates to Twin Activate to add one-step
delay to the outputs of the Flux component. This delay is necessary in case
of feedback loops between output and input to avoid the algebraic loops that
can be caused by the Flux block. Do not use this option if there is no
feedback loop. Note: An algebraic loop appears when a variable from an output
is also a variable of the input of the system. |
- Reporting" tab
Field | Description |
---|---|
Subsampling (Reduced result storage) | Limit the number of files where Flux stores the results, and then it saves hard disk space. Moreover, the number of steps on which the user can post process the results is also limited to one step on n, n is the number indicated in this field. This number must be greater or equal to three. The number of Flux files storing the results is adapted according to the n value. |
Flux console display | Display the Flux console. |
Log file name | Allow creating a text file which contains detailed co-simulation information. |
Field | Description |
---|---|
Current Flux version | Flux version called during co-simulation. |
Flux component version | Flux version used to generate the coupling component. |
Flux solver | The solver used to simulate the Flux model. |
Numerical memory (MB) | This field allows the user to define the numerical
memory that Flux will use (solving, mesh...) during the co-simulation,
whatever the settings in Flux supervisor are. For more informations, see :
Memory requirements management Note: If user has generated
the coupling component in dynamic memory, the co-simulation will launch
Flux also in dynamic memory (the memory values are set to "0" in this
case). |
Character memory (MB) | This field allows the user to define the character
memory that Flux will use (parameter names, region names…) during
co-simulation, whatever the settings in Flux supervisor are. For more
informations, see : Memory requirements management Note: If user
has generated the coupling component in dynamic memory, the co-simulation
will launch Flux also in dynamic memory (the memory values are set to "0"
in this case). Note: It is not required to define GUI and System
memories of Flux because they are not used during
co-simulations. |
Number of cores | Number of cores used by Flux during co-simulation. For more informations, see : System options |