The Modelica Standard Library comes with the Modelica.Media
library which makes available thermodynamic properties of fluids.
Quoting from the Modelica.Media documentation:
Media models in Modelica.Media are provided by packages, inheriting from the partial package
Modelica.Media.Interfaces.PartialMedium
. Every package defines:
- [...]
- A
BaseProperties
model, to compute the basic thermodynamic properties of the fluid;setState_XXX
functions to compute the thermodynamic state record from different input arguments (such as density, temperature, and composition which would be setState_dTX);- [...]
There are - as stated above - two different basic ways of using the Media library which will be described in more details in the following section.
One way is to use the model BaseProperties.
[...]
The second way is to use the setState_XXX functions to compute the thermodynamic state record from which all other thermodynamic state variables can be computed [...]
My colleague prefers BaseProperties
(he spends most time modeling components),
I prefer the setState_XXX
functions (I spend most time writing a property library).
Now we want to develop a simple&small component library together and probably we should agree to use one of the two approaches.
Can you recommend a publication that explains the advantages/disadvantages of the two approaches? Publications that promote the use of the setState_XXX
function are preferred of course... ;-)
Are there some simple rules to decide which one of the two approaches to use when modeling a component (e.g. a very simple turbine)? The components in Modelica.Fluid seem to use both.