Change medium properties in Altair Activate Modelica Thermal
Hello,
I am unable to find how to use a custom Media while using the thermal library in Activate. Documentation is limited.
For example, I would like to change the density of a Medium. In Diagram:
Medium = FromModelica('Modelica.Thermal.FluidHeatFlow.Media.Gylcol50_20degC')
This works fine however, how do I modify the parameters? Variable browser only shows a class.
Adding a Media block and changing the parameters there does nothing, default values are used, record block does nothing.
Kind Regards,
Tomas Tienstra
Best Answer
-
Hi Tomas,
Custom media can be declared using the Medium block and referencing it in all the thermal blocks.
Look at the example I've attached and notice the block called Custom Medium and how all the thermal blocks reference it with "FromModelica('/Custom Medium')". If you play around with any medium parameter, you'll see changes in the simulation.
Hope this helps.
Rafael
4
Answers
-
Hi Tomas,
Custom media can be declared using the Medium block and referencing it in all the thermal blocks.
Look at the example I've attached and notice the block called Custom Medium and how all the thermal blocks reference it with "FromModelica('/Custom Medium')". If you play around with any medium parameter, you'll see changes in the simulation.
Hope this helps.
Rafael
4 -
Thanks for the example.
Changing in the Diagram: "Medium = FromModelica('/Medium')"
Made my original model work.
0 -
A further simplification of Rafael's suggestion is the use of a variable that is defined in model (or diagram) context and used in any component. This makes it easier to change the medium.
1