In the Filename section, enter the name of the cosimulation file to export to. Enter the full name, including the path, if you want to save the file in a specific location; otherwise, the file is saved at the same location as the model MPH file.
Click
Export to generate the cosimulation file in FMU-format.
In the Inputs section you specify the input variables and their order in the COMSOL Cosimulation block in Simulink. The input variables can be modified and updated in the model at every communication time. In the
Parameter name column, the list contains all global parameters defined in the model. This list is automatically updated with respect to the block parameters settings, as a global parameter can either be set as input or block parameter.
In the Initial value cell enter the value to be set at initial time step.
To add a new input, click
Add. To remove an input, select a row and click
Delete.
Click
Clear Table to clear all parameter from the input list.
In the Block Parameters section you specify the parameters you want to change in Simulink but which are only evaluated during the initialization of the cosimulation. In the
Parameter name column choose one of the parameters from the list. This list is automatically updated with respect to the inputs settings, as a global parameter can either be set as input or block parameter. There is no restriction on which settings are defined by Block Parameters.
In the Initial value cell enter the default value in the COMSOL Cosimulation block.
To add a new block parameter, click
Add. To remove a block parameter, select a row and click
Delete.
Click
Clear Table to clear all parameter from the input list.
In the Outputs section you specify the output expressions and their order in the COMSOL Cosimulation block in Simulink.
In the Expression column enter the global expression you want to be evaluated and sent to Simulink. The expression has to include the component scope where the variable is defined, even if the model contains only one component. It is of good practice to create a probe with the desired output expression, and click
Add Expression to get the correct variable expression.
In the Unit column you can specify the unit for evaluation. The unit column is populated automatically with the base unit when adding a new output expression. Inconsistent unit prevents you to export the cosimulation file.
In the Name column you set the display string to be used in the COMSOL cosimulation block. The name column is populated automatically with the variable description, or variable name when a probe is set as output expression.
Click
Clear Table to clear all parameter from the input list.
From the Study list, select the study to run in the cosimulation. This list is populated with studies that only contain a single study step, either a Stationary or a Time Dependent study step.
In case you did specify a filename, click Import, to embed the image in the COMSOL model.