WOLFRAM SYSTEM MODELER
PartialLinearFluidGeneric pure liquid model with constant cp, compressibility and thermal expansion coefficients |
A selection of variables that uniquely defines the thermodynamic state |
|
Base properties of medium |
|
Set the thermodynamic state record from p and T (X not needed) |
|
Set the thermodynamic state record from p and h (X not needed) |
|
Set the thermodynamic state record from p and s (X not needed) |
|
Set the thermodynamic state record from d and T (X not needed) |
|
Return thermodynamic state so that it smoothly approximates: if x > 0 then state_a else state_b |
|
Return the pressure from the thermodynamic state |
|
Return the temperature from the thermodynamic state |
|
Return the density from the thermodynamic state |
|
Return the specific enthalpy from the thermodynamic state |
|
Return the specific entropy from the thermodynamic state |
|
Return the specific internal energy from the thermodynamic state |
|
Return specific Gibbs energy from the thermodynamic state |
|
Return specific Helmholtz energy from the thermodynamic state |
|
Return velocity of sound from the thermodynamic state |
|
Return isentropic exponent from the thermodynamic state |
|
Return isentropic enthalpy |
|
Return specific heat capacity at constant volume |
|
Return specific heat capacity at constant volume from the thermodynamic state |
|
Return the isothermal compressibility kappa |
|
Return the isobaric expansion coefficient |
|
Return density derivative w.r.t. pressure at const specific enthalpy |
|
Return density derivative w.r.t. specific enthalpy at constant pressure |
|
Return density derivative w.r.t. pressure at const temperature |
|
Return density derivative w.r.t. temperature at constant pressure |
|
Returns the partial derivative of density with respect to mass fractions at constant pressure and temperature |
|
Return molar mass |
|
Return temperature from pressure and specific enthalpy |
|
Return temperature from pressure and specific entropy |
ThermoStates |
Value: Modelica.Media.Interfaces.Choices.IndependentVariables.pTX Type: IndependentVariables Description: Enumeration type for independent variables |
---|---|
mediumName |
Value: "unusablePartialMedium" Type: String Description: Name of the medium |
substanceNames |
Value: {mediumName} Type: String[:] Description: Names of the mixture substances. Set substanceNames={mediumName} if only one substance. |
extraPropertiesNames |
Value: fill("", 0) Type: String[:] Description: Names of the additional (extra) transported properties. Set extraPropertiesNames=fill("",0) if unused |
singleState |
Value: false Type: Boolean Description: = true, if u and d are not a function of pressure |
reducedX |
Value: true Type: Boolean Description: = true if medium contains the equation sum(X) = 1.0; set reducedX=true if only one substance (see docu for details) |
fixedX |
Value: true Type: Boolean Description: = true if medium contains the equation X = reference_X |
reference_p |
Value: 101325 Type: AbsolutePressure (Pa) Description: Reference pressure of Medium: default 1 atmosphere |
reference_T |
Value: 298.15 Type: Temperature (K) Description: Reference temperature of Medium: default 25 deg Celsius |
reference_X |
Value: fill(1 / nX, nX) Type: MassFraction[nX] (kg/kg) Description: Default mass fractions of medium |
p_default |
Value: 101325 Type: AbsolutePressure (Pa) Description: Default value for pressure of medium (for initialization) |
T_default |
Value: Modelica.Units.Conversions.from_degC(20) Type: Temperature (K) Description: Default value for temperature of medium (for initialization) |
h_default |
Value: specificEnthalpy_pTX(p_default, T_default, X_default) Type: SpecificEnthalpy (J/kg) Description: Default value for specific enthalpy of medium (for initialization) |
X_default |
Value: reference_X Type: MassFraction[nX] (kg/kg) Description: Default value for mass fractions of medium (for initialization) |
C_default |
Value: fill(0, nC) Type: ExtraProperty[nC] Description: Default value for trace substances of medium (for initialization) |
nS |
Value: size(substanceNames, 1) Type: Integer Description: Number of substances |
nX |
Value: nS Type: Integer Description: Number of mass fractions |
nXi |
Value: if fixedX then 0 else if reducedX then nS - 1 else nS Type: Integer Description: Number of structurally independent mass fractions (see docu for details) |
nC |
Value: size(extraPropertiesNames, 1) Type: Integer Description: Number of extra (outside of standard mass-balance) transported properties |
C_nominal |
Value: 1.0e-6 * ones(nC) Type: Real[nC] Description: Default for the nominal values for the extra properties |
cp_const |
Value: Type: SpecificHeatCapacity (J/(kg⋅K)) Description: Specific heat capacity at constant pressure |
beta_const |
Value: Type: IsobaricExpansionCoefficient (1/K) Description: Thermal expansion coefficient at constant pressure |
kappa_const |
Value: Type: IsothermalCompressibility (1/Pa) Description: Isothermal compressibility |
MM_const |
Value: Type: MolarMass (kg/mol) Description: Molar mass |
reference_d |
Value: Type: Density (kg/m³) Description: Density in reference conditions |
reference_h |
Value: Type: SpecificEnthalpy (J/kg) Description: Specific enthalpy in reference conditions |
reference_s |
Value: Type: SpecificEntropy (J/(kg⋅K)) Description: Specific entropy in reference conditions |
constantJacobian |
Value: Type: Boolean Description: If true, entries in thermodynamic Jacobian are constant, taken at reference conditions |
This information is part of the Modelica Standard Library maintained by the Modelica Association.
This linear compressibility fluid model is based on the assumptions that:
That means that the density is a linear function in temperature and in pressure. In order to define the complete model, a number of constant reference values are needed which are computed at the reference values of the states pressure p and temperature T. The model can be interpreted as a linearization of a full non-linear fluid model (but it is not linear in all thermodynamic coordinates). Reference values are needed for
Apart from that, a user needs to define the molar mass, MM_const. Note that it is possible to define a fluid by computing the reference values from a full non-linear fluid model by computing the package constants using the standard functions defined in a fluid package (see example in liquids package).
In order to avoid numerical inversion of the temperature in the T_ph and T_ps functions, the density is always taken to be the reference density in the computation of h, s, u and cv. For liquids (and this model is intended only for liquids) the relative error of doing so is 1e-3 to 1e-4 at most. The model would be more "correct" based on the other assumptions, if occurrences of reference_d in the computations of h,s,u and cv would be replaced by a call to density(state). That would require a numerical solution for T_ps, while T_ph can be solved symbolically from a quadratic function. Errors from this approximation are small because liquid density varies little.
One of the main reasons to use a simple, linear fluid model is to achieve high performance in simulations. There are a number of possible compromises and possibilities to improve performance. Some of them can be influenced by a flag. The following rules where used in this model:
SystemModel["Modelica.Media.Interfaces.PartialLinearFluid"]
Modelica.Media.CompressibleLiquids Cold water model with linear compressibility |
|
Modelica.Media.CompressibleLiquids.Common Base class for liquid, linear compressibility water models |