.Modelica.Media.Incompressible.TableBased

Information

This is the base package for medium models of incompressible fluids based on tables. The minimal data to provide for a useful medium description is tables of density and heat capacity as functions of temperature.

It should be noted that incompressible media only have 1 state per control volume (usually T), but have both T and p as inputs for fully correct properties. The error of using only T-dependent properties is small, therefore a Boolean flag enthalpyOfT exists. If it is true, the enumeration Choices.IndependentVariables is set to Choices.IndependentVariables.T otherwise it is set to Choices.IndependentVariables.pT.

Using the package TableBased

To implement a new medium model, create a package that extends TableBased and provides one or more of the constant tables:

tableDensity        = [T, d];
tableHeatCapacity   = [T, Cp];
tableConductivity   = [T, lam];
tableViscosity      = [T, eta];
tableVaporPressure  = [T, pVap];

The table data is used to fit constant polynomials of order npol, the temperature data points do not need to be same for different properties. Properties like enthalpy, inner energy and entropy are calculated consistently from integrals and derivatives of d(T) and Cp(T). The minimal data for a useful medium model is thus density and heat capacity. Transport properties and vapor pressure are optional, if the data tables are empty the corresponding function calls can not be used.

Contents

Name Description
 invertTemp Function to invert temperatures
 BaseProperties Base properties of T dependent medium
 setState_pTX Returns state record, given pressure and temperature
 setState_dTX Returns state record, given pressure and temperature
 setState_pT Returns state record as function of p and T
 setState_phX Returns state record, given pressure and specific enthalpy
 setState_ph Returns state record as function of p and h
 setState_psX Returns state record, given pressure and specific entropy
 setState_ps Returns state record as function of p and s
 setSmoothState Return thermodynamic state so that it smoothly approximates: if x > 0 then state_a else state_b
 specificHeatCapacityCv Specific heat capacity at constant volume (or pressure) of medium
 specificHeatCapacityCp Specific heat capacity at constant volume (or pressure) of medium
 dynamicViscosity Return dynamic viscosity as a function of the thermodynamic state record
 thermalConductivity Return thermal conductivity as a function of the thermodynamic state record
 s_T Compute specific entropy
 specificEntropy Return specific entropy as a function of the thermodynamic state record
 h_T Compute specific enthalpy from temperature
 h_T_der Compute specific enthalpy from temperature
 h_pT Compute specific enthalpy from pressure and temperature
 density_T Return density as function of temperature
 temperature Return temperature as a function of the thermodynamic state record
 pressure Return pressure as a function of the thermodynamic state record
 density Return density as a function of the thermodynamic state record
 specificEnthalpy Return specific enthalpy as a function of the thermodynamic state record
 specificInternalEnergy Return specific internal energy as a function of the thermodynamic state record
 T_ph Compute temperature from pressure and specific enthalpy
 T_ps Compute temperature from pressure and specific enthalpy
 Polynomials_Temp Temporary Functions operating on polynomials (including polynomial fitting); only to be used in Modelica.Media.Incompressible.TableBased

Generated at 2020-06-05T07:38:22Z by OpenModelica 1.16.0~dev-420-gc007a39