Package Modelica.​Media.​Common
Data structures and fundamental functions for fluid properties

Information

Package description

Package Modelica.Media.Common provides records and functions shared by many of the property sub-packages. High accuracy fluid property models share a lot of common structure, even if the actual models are different. Common data structures and computations shared by these property models are collected in this library.

Extends from Modelica.​Icons.​Package (Icon for standard packages).

Package Contents

NameDescription
AuxiliaryPropertiesIntermediate property data record
BridgmansTablesCalculates all entries in Bridgmans tables if first seven variables given
cv2PhaseCompute isochoric specific heat capacity inside the two-phase region
cvdpT2PhaseCompute isochoric specific heat capacity inside the two-phase region and derivative of pressure w.r.t. temperature
DerDensityByEntropy 
DerEnergyByMoles 
DerEnergyByPressure 
DerEntropyByMoles 
DerEntropyByPressure 
DerEntropyByTemperature 
DerPressureByDensity 
DerPressureBySpecificVolume 
DerPressureByTemperature 
DerVolumeByMoles 
DerVolumeByPressure 
DerVolumeByTemperature 
ExtraDerivativesAdditional thermodynamic derivatives
FundamentalConstantsConstants of the medium
Gibbs2_dTFunction to calculate analytic derivatives for computing p given d and T
Gibbs2_phFunction to calculate analytic derivatives for computing T given p and h
Gibbs2_psFunction to calculate analytic derivatives for computing d and t given p and s
GibbsDerivsDerivatives of dimensionless Gibbs-function w.r.t. dimensionless pressure and temperature
GibbsDerivs2Derivatives of Gibbs function w.r.t. pressure and temperature
gibbsToBoundaryPropsCalculate phase boundary property record from dimensionless Gibbs function
gibbsToBridgmansTablesCalculates base coefficients for Bridgman's tables from gibbs enthalpy
gibbsToExtraDerivsCompute additional thermodynamic derivatives from dimensionless Gibbs function
Helmholtz_phFunction to calculate analytic derivatives for computing d and t given p and h
Helmholtz_psFunction to calculate analytic derivatives for computing d and t given p and s
Helmholtz_pTFunction to calculate analytic derivatives for computing d and t given p and t
HelmholtzDerivsDerivatives of dimensionless Helmholtz-function w.r.t. dimensionless pressure, density and temperature
helmholtzToBoundaryPropsCalculate phase boundary property record from dimensionless Helmholtz function
helmholtzToBridgmansTablesCalculates base coefficients for Bridgmans tables from Helmholtz energy
helmholtzToExtraDerivsCompute additional thermodynamic derivatives from dimensionless Helmholtz function
IF97BaseTwoPhaseIntermediate property data record for IF 97
IF97PhaseBoundaryPropertiesThermodynamic base properties on the phase boundary for IF97 steam tables
IsenthalpicExponent 
IsentropicExponent 
IsobaricVolumeExpansionCoefficient 
IsochoricPressureCoefficient 
IsothermalCompressibility 
JouleThomsonCoefficient 
MolarEnthalpy 
MolarFlowRate 
MolarReactionRate 
NewtonDerivatives_dTDerivatives for fast inverse calculations of Gibbs function
NewtonDerivatives_phDerivatives for fast inverse calculations of Helmholtz functions: p & h
NewtonDerivatives_psDerivatives for fast inverse calculation of Helmholtz functions: p & s
NewtonDerivatives_pTDerivatives for fast inverse calculations of Helmholtz functions:p & T
OneNonLinearEquationDetermine solution of a non-linear algebraic equation in one unknown without derivatives in a reliable and efficient way
PhaseBoundaryPropertiesThermodynamic base properties on the phase boundary
Rate 
SaturationBoundaryPropertiesProperties on both phase boundaries, including some derivatives
SaturationPropertiesProperties in the two phase region
smoothStepApproximation of a general step, such that the characteristic is continuous and differentiable
ThermoFluidSpecialProperty records used by the ThermoFluid library
TwoPhaseTransportPropsDefines properties on both phase boundaries, needed in the two phase region

Package Constants

TypeNameValueDescription
AreaAMAX100000Maximal init area
AreaAMINMINPOSMinimal init area
AreaANOM1Nominal init area
PressureCOMPPMAX1e+8Maximal init pressure
PressureCOMPPMIN-1 * MINPOSMinimal init pressure
PressureCOMPPNOM100000Nominal init pressure
SpecificHeatCapacityCPMAX1000000Maximal init specific heat capacity
SpecificHeatCapacityCPMINMINPOSMinimal init specific heat capacity
SpecificHeatCapacityCPNOM1000Nominal init specific heat capacity
DensityDMAX30000Maximal init density
DensityDMIN1e-6Minimal init density
DensityDNOM1Nominal init density
EnergyEMAX1e+10Maximal init energy
EnergyEMIN-1e+10Minimal init energy
EnergyENOM1000Nominal init energy
DynamicViscosityETAMAX1e+8Maximal init dynamic viscosity
DynamicViscosityETAMINMINPOSMinimal init dynamic viscosity
DynamicViscosityETANOM100Nominal init dynamic viscosity
MomentumFluxGMAX1e+8Maximal init momentum flux
MomentumFluxGMIN-1e+8Minimal init momentum flux
MomentumFluxGNOM1Nominal init momentum flux
RatioOfSpecificHeatCapacitiesKAPPAMAX1.7Maximal init isentropic exponent
RatioOfSpecificHeatCapacitiesKAPPAMIN1Minimal init isentropic exponent
RatioOfSpecificHeatCapacitiesKAPPANOM1.2Nominal init isentropic exponent
ThermalConductivityLAMMAX1000Maximal thermal conductivity
ThermalConductivityLAMMINMINPOSMinimal thermal conductivity
ThermalConductivityLAMNOM1Nominal thermal conductivity
ThermalConductivityLMAX500Maximal init thermal conductivity
ThermalConductivityLMINMINPOSMinimal init thermal conductivity
ThermalConductivityLNOM1Nominal init thermal conductivity
MassFractionMASSXMAX1Maximal init mass fraction
MassFractionMASSXMIN-1 * MINPOSMinimal init mass fraction
MassFractionMASSXNOM0.1Nominal init mass fraction
MassFlowRateMDOTMAX100000Maximal init mass flow rate
MassFlowRateMDOTMIN-100000Minimal init mass flow rate
MassFlowRateMDOTNOM1Nominal init mass flow rate
RealMINPOS1e-9Minimal value for physical variables which are always > 0.0
MassMMAX1e+8Maximal init mass
MassMMIN-1 * MINPOSMinimal init mass
MolarMassMMMAX250Maximal initial molar mass
MolarMassMMMIN0.001Minimal initial molar mass
MolarMassMMNOM0.2Nominal initial molar mass
MassMNOM1Nominal init mass
MoleFractionMOLEYMAX1Maximal init mole fraction
MoleFractionMOLEYMIN-1 * MINPOSMinimal init mole fraction
MoleFractionMOLEYNOM0.1Nominal init mole fraction
AmountOfSubstanceMOLMAX1e+8Maximal Mole Number
AmountOfSubstanceMOLMIN-1 * MINPOSMinimal Mole Number
AmountOfSubstanceMOLNOM1Nominal Mole Number
PressurePMAX1e+8Maximal init pressure
PressurePMIN10000Minimal init pressure
PressurePNOM100000Nominal init pressure
PowerPOWMAX1e+8Maximal init power or heat
PowerPOWMIN-1e+8Minimal init power or heat
PowerPOWNOM1000Nominal init power or heat
SpecificEnergySEMAX1e+8Maximal init specific energy
SpecificEnergySEMIN-1e+8Minimal init specific energy
SpecificEnergySENOM1000000Nominal init specific energy
SpecificEnthalpySHMAX1e+8Maximal init specific enthalpy
SpecificEnthalpySHMIN-1e+8Minimal init specific enthalpy
SpecificEnthalpySHNOM1000000Nominal init specific enthalpy
EntropySMAX1000000Maximal init entropy
EntropySMIN-1000000Minimal init entropy
EntropySNOM1000Nominal init entropy
SpecificEntropySSMAX1000000Maximal init specific entropy
SpecificEntropySSMIN-1000000Minimal init specific entropy
SpecificEntropySSNOM1000Nominal init specific entropy
TemperatureTMAX6000Maximal init temperature
TemperatureTMIN1Minimal init temperature
TemperatureTNOM320Nominal init temperature
VelocityVELMAX100000Maximal init speed
VelocityVELMIN-100000Minimal init speed
VelocityVELNOM1Nominal init speed
VolumeVMAX100000Maximal init volume
VolumeVMIN0Minimal init volume
VolumeVNOM0.001Nominal init volume

Type Modelica.​Media.​Common.​Rate

Extends from Real.

Attributes

NameValue
quantity"Rate"
unit"s-1"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​MolarFlowRate

Extends from Real.

Attributes

NameValue
quantity"MolarFlowRate"
unit"mol/s"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​MolarReactionRate

Extends from Real.

Attributes

NameValue
quantity"MolarReactionRate"
unit"mol/(m3.s)"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​MolarEnthalpy

Extends from Real.

Attributes

NameValue
quantity"MolarEnthalpy"
unit"J/mol"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​DerDensityByEntropy

Extends from Real.

Attributes

NameValue
quantity"DerDensityByEntropy"
unit"kg2.K/(m3.J)"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​DerEnergyByPressure

Extends from Real.

Attributes

NameValue
quantity"DerEnergyByPressure"
unit"J/Pa"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​DerEnergyByMoles

Extends from Real.

Attributes

NameValue
quantity"DerEnergyByMoles"
unit"J/mol"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​DerEntropyByTemperature

Extends from Real.

Attributes

NameValue
quantity"DerEntropyByTemperature"
unit"J/K2"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​DerEntropyByPressure

Extends from Real.

Attributes

NameValue
quantity"DerEntropyByPressure"
unit"J/(K.Pa)"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​DerEntropyByMoles

Extends from Real.

Attributes

NameValue
quantity"DerEntropyByMoles"
unit"J/(mol.K)"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​DerPressureByDensity

Extends from Real.

Attributes

NameValue
quantity"DerPressureByDensity"
unit"Pa.m3/kg"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​DerPressureBySpecificVolume

Extends from Real.

Attributes

NameValue
quantity"DerPressureBySpecificVolume"
unit"Pa.kg/m3"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​DerPressureByTemperature

Extends from Real.

Attributes

NameValue
quantity"DerPressureByTemperature"
unit"Pa/K"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​DerVolumeByTemperature

Extends from Real.

Attributes

NameValue
quantity"DerVolumeByTemperature"
unit"m3/K"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​DerVolumeByPressure

Extends from Real.

Attributes

NameValue
quantity"DerVolumeByPressure"
unit"m3/Pa"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​DerVolumeByMoles

Extends from Real.

Attributes

NameValue
quantity"DerVolumeByMoles"
unit"m3/mol"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​IsenthalpicExponent

Extends from Real.

Attributes

NameValue
quantity"IsenthalpicExponent"
unit"1"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​IsentropicExponent

Extends from Real.

Attributes

NameValue
quantity"IsentropicExponent"
unit"1"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​IsobaricVolumeExpansionCoefficient

Extends from Real.

Attributes

NameValue
quantity"IsobaricVolumeExpansionCoefficient"
unit"1/K"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​IsochoricPressureCoefficient

Extends from Real.

Attributes

NameValue
quantity"IsochoricPressureCoefficient"
unit"1/K"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​IsothermalCompressibility

Extends from Real.

Attributes

NameValue
quantity"IsothermalCompressibility"
unit"1/Pa"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Type Modelica.​Media.​Common.​JouleThomsonCoefficient

Extends from Real.

Attributes

NameValue
quantity"JouleThomsonCoefficient"
unit"K/Pa"
min-Modelica.Constants.inf
maxModelica.Constants.inf
start0.

Record Modelica.​Media.​Common.​SaturationProperties
Properties in the two phase region

Information

This icon is indicates a record.

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
Temp_KTTemperature
DensitydDensity
PressurepPressure
SpecificEnergyuSpecific inner energy
SpecificEnthalpyhSpecific enthalpy
SpecificEntropysSpecific entropy
SpecificHeatCapacitycpHeat capacity at constant pressure
SpecificHeatCapacitycvHeat capacity at constant volume
SpecificHeatCapacityRGas constant
RatioOfSpecificHeatCapacitieskappaIsentropic expansion coefficient
PhaseBoundaryPropertiesliqThermodynamic base properties on the boiling curve
PhaseBoundaryPropertiesvapThermodynamic base properties on the dew curve
RealdpTDerivative of saturation pressure w.r.t. temperature
MassFractionxVapour mass fraction

Record Modelica.​Media.​Common.​SaturationBoundaryProperties
Properties on both phase boundaries, including some derivatives

Information

This icon is indicates a record.

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
Temp_KTSaturation temperature
DensitydlLiquid density
DensitydvVapour density
SpecificEnthalpyhlLiquid specific enthalpy
SpecificEnthalpyhvVapour specific enthalpy
RealdTpDerivative of temperature w.r.t. saturation pressure
RealddldpDerivative of density along boiling curve
RealddvdpDerivative of density along dew curve
RealdhldpDerivative of specific enthalpy along boiling curve
RealdhvdpDerivative of specific enthalpy along dew curve
MassFractionxVapour mass fraction

Record Modelica.​Media.​Common.​IF97BaseTwoPhase
Intermediate property data record for IF 97

Information

This icon is indicates a record.

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
IntegerphasePhase: 2 for two-phase, 1 for one phase, 0 if unknown
IntegerregionIF 97 region
PressurepPressure
TemperatureTTemperature
SpecificEnthalpyhSpecific enthalpy
SpecificHeatCapacityRGas constant
SpecificHeatCapacitycpSpecific heat capacity
SpecificHeatCapacitycvSpecific heat capacity
DensityrhoDensity
SpecificEntropysSpecific entropy
DerPressureByTemperatureptDerivative of pressure w.r.t. temperature
DerPressureByDensitypdDerivative of pressure w.r.t. density
RealvtDerivative of specific volume w.r.t. temperature
RealvpDerivative of specific volume w.r.t. pressure
RealxDryness fraction
RealdpTdp/dT derivative of saturation curve

Record Modelica.​Media.​Common.​IF97PhaseBoundaryProperties
Thermodynamic base properties on the phase boundary for IF97 steam tables

Information

This icon is indicates a record.

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
Booleanregion3boundaryTrue if boundary between 2-phase and region 3
SpecificHeatCapacityRSpecific heat capacity
TemperatureTTemperature
DensitydDensity
SpecificEnthalpyhSpecific enthalpy
SpecificEntropysSpecific entropy
SpecificHeatCapacitycpHeat capacity at constant pressure
SpecificHeatCapacitycvHeat capacity at constant volume
DerPressureByTemperaturedpTdp/dT derivative of saturation curve
DerPressureByTemperatureptDerivative of pressure w.r.t. temperature
DerPressureByDensitypdDerivative of pressure w.r.t. density
RealvtDerivative of specific volume w.r.t. temperature
RealvpDerivative of specific volume w.r.t. pressure

Record Modelica.​Media.​Common.​GibbsDerivs
Derivatives of dimensionless Gibbs-function w.r.t. dimensionless pressure and temperature

Information

This icon is indicates a record.

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
PressurepPressure
TemperatureTTemperature
SpecificHeatCapacityRSpecific heat capacity
RealpiDimensionless pressure
RealtauDimensionless temperature
RealgDimensionless Gibbs-function
RealgpiDerivative of g w.r.t. pi
Realgpipi2nd derivative of g w.r.t. pi
RealgtauDerivative of g w.r.t. tau
Realgtautau2nd derivative of g w.r.t. tau
RealgtaupiMixed derivative of g w.r.t. pi and tau

Record Modelica.​Media.​Common.​HelmholtzDerivs
Derivatives of dimensionless Helmholtz-function w.r.t. dimensionless pressure, density and temperature

Information

This icon is indicates a record.

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
DensitydDensity
TemperatureTTemperature
SpecificHeatCapacityRSpecific heat capacity
RealdeltaDimensionless density
RealtauDimensionless temperature
RealfDimensionless Helmholtz-function
RealfdeltaDerivative of f w.r.t. delta
Realfdeltadelta2nd derivative of f w.r.t. delta
RealftauDerivative of f w.r.t. tau
Realftautau2nd derivative of f w.r.t. tau
RealfdeltatauMixed derivative of f w.r.t. delta and tau

Record Modelica.​Media.​Common.​TwoPhaseTransportProps
Defines properties on both phase boundaries, needed in the two phase region

Information

This icon is indicates a record.

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
Densityd_vapDensity on the dew line
Densityd_liqDensity on the bubble line
DynamicViscosityeta_vapDynamic viscosity on the dew line
DynamicViscosityeta_liqDynamic viscosity on the bubble line
ThermalConductivitylam_vapThermal conductivity on the dew line
ThermalConductivitylam_liqThermal conductivity on the bubble line
SpecificHeatCapacitycp_vapCp on the dew line
SpecificHeatCapacitycp_liqCp on the bubble line
MassFractionxSteam quality

Record Modelica.​Media.​Common.​PhaseBoundaryProperties
Thermodynamic base properties on the phase boundary

Information

This icon is indicates a record.

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
DensitydDensity
SpecificEnthalpyhSpecific enthalpy
SpecificEnergyuInner energy
SpecificEntropysSpecific entropy
SpecificHeatCapacitycpHeat capacity at constant pressure
SpecificHeatCapacitycvHeat capacity at constant volume
DerPressureByTemperatureptDerivative of pressure w.r.t. temperature
DerPressureByDensitypdDerivative of pressure w.r.t. density

Record Modelica.​Media.​Common.​NewtonDerivatives_ph
Derivatives for fast inverse calculations of Helmholtz functions: p & h

Information

This icon is indicates a record.

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
PressurepPressure
SpecificEnthalpyhSpecific enthalpy
DerPressureByDensitypdDerivative of pressure w.r.t. density
DerPressureByTemperatureptDerivative of pressure w.r.t. temperature
RealhdDerivative of specific enthalpy w.r.t. density
RealhtDerivative of specific enthalpy w.r.t. temperature

Record Modelica.​Media.​Common.​NewtonDerivatives_ps
Derivatives for fast inverse calculation of Helmholtz functions: p & s

Information

This icon is indicates a record.

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
PressurepPressure
SpecificEntropysSpecific entropy
DerPressureByDensitypdDerivative of pressure w.r.t. density
DerPressureByTemperatureptDerivative of pressure w.r.t. temperature
RealsdDerivative of specific entropy w.r.t. density
RealstDerivative of specific entropy w.r.t. temperature

Record Modelica.​Media.​Common.​NewtonDerivatives_pT
Derivatives for fast inverse calculations of Helmholtz functions:p & T

Information

This icon is indicates a record.

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
PressurepPressure
DerPressureByDensitypdDerivative of pressure w.r.t. density

Record Modelica.​Media.​Common.​ExtraDerivatives
Additional thermodynamic derivatives

Information

This icon is indicates a record.

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
IsentropicExponentkappaIsentropic expansion coefficient
IsenthalpicExponentthetaIsenthalpic exponent
IsobaricVolumeExpansionCoefficientalphaIsobaric volume expansion coefficient
IsochoricPressureCoefficientbetaIsochoric pressure coefficient
IsothermalCompressibilitygammaIsothermal compressibility
JouleThomsonCoefficientmuJoule-Thomson coefficient

Record Modelica.​Media.​Common.​BridgmansTables
Calculates all entries in Bridgmans tables if first seven variables given

Information

Important: the phase equilibrium conditions are not yet considered. this means that Bridgman's tables do not yet work in the two phase region. Some derivatives are 0 or infinity anyways. Idea: Do not use the values in Bridgmans table directly, all derivatives are calculated as the quotient of two entries in the table. The last letter indicates which variable is held constant in taking the derivative. The second letters are the two variables involved in the derivative and the first letter is always a d to remind of differentiation.

Example 1: Get the derivative of specific entropy s w.r.t. Temperature at
constant specific volume (between identical to constant density)
constant volume  --> last letter v
Temperature      --> second letter T
Specific entropy --> second letter s
--> the needed value is dsv/dTv
Known variables:
Temperature T
pressure p
specific volume v
specific inner energy u
specific enthalpy h
specific entropy s
specific Helmholtz energy f
specific gibbs enthalpy g
Not included but useful:
density d
In order to convert derivatives involving density use the following
rules:
at constant density == at constant specific volume
ddx/dyx = -d*d*dvx/dyx with y,x any of T,p,u,h,s,f,g
dyx/ddx = -1/(d*d)dyx/dvx with y,x any of T,p,u,h,s,f,g
Usage example assuming water as the medium:
model BridgmansTablesForWater
extends ThermoFluid.BaseClasses.MediumModels.Water.WaterSteamMedium_ph;
Real derOfsByTAtConstantv "derivative of sp. entropy by temperature at constant sp. volume"
ThermoFluid.BaseClasses.MediumModels.Common.ExtraDerivatives dpro;
ThermoFluid.BaseClasses.MediumModels.Common.BridgmansTables bt;
equation
dpro = ThermoFluid.BaseClasses.MediumModels.SteamIF97.extraDerivs_pT(p[1],T[1]);
bt.p = p[1];
bt.T = T[1];
bt.v = 1/pro[1].d;
bt.s = pro[1].s;
bt.cp = pro[1].cp;
bt.alpha = dpro.alpha;
bt.gamma = dpro.gamma;
derOfsByTAtConstantv =  bt.dsv/bt.dTv;
                ...
end BridgmansTablesForWater;
                

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
SpecificVolumevSpecific volume
PressurepPressure
TemperatureTTemperature
SpecificEntropysSpecific entropy
SpecificHeatCapacitycpHeat capacity at constant pressure
IsobaricVolumeExpansionCoefficientalphaIsobaric volume expansion coefficient
IsothermalCompressibilitygammaIsothermal compressibility
RealdTpCoefficient in Bridgmans table, see info for usage
RealdpTCoefficient in Bridgmans table, see info for usage
RealdvpCoefficient in Bridgmans table, see info for usage
RealdpvCoefficient in Bridgmans table, see info for usage
RealdspCoefficient in Bridgmans table, see info for usage
RealdpsCoefficient in Bridgmans table, see info for usage
RealdupCoefficient in Bridgmans table, see info for usage
RealdpuCoefficient in Bridgmans table, see info for usage
RealdhpCoefficient in Bridgmans table, see info for usage
RealdphCoefficient in Bridgmans table, see info for usage
RealdfpCoefficient in Bridgmans table, see info for usage
RealdpfCoefficient in Bridgmans table, see info for usage
RealdgpCoefficient in Bridgmans table, see info for usage
RealdpgCoefficient in Bridgmans table, see info for usage
RealdvTCoefficient in Bridgmans table, see info for usage
RealdTvCoefficient in Bridgmans table, see info for usage
RealdsTCoefficient in Bridgmans table, see info for usage
RealdTsCoefficient in Bridgmans table, see info for usage
RealduTCoefficient in Bridgmans table, see info for usage
RealdTuCoefficient in Bridgmans table, see info for usage
RealdhTCoefficient in Bridgmans table, see info for usage
RealdThCoefficient in Bridgmans table, see info for usage
RealdfTCoefficient in Bridgmans table, see info for usage
RealdTfCoefficient in Bridgmans table, see info for usage
RealdgTCoefficient in Bridgmans table, see info for usage
RealdTgCoefficient in Bridgmans table, see info for usage
RealdsvCoefficient in Bridgmans table, see info for usage
RealdvsCoefficient in Bridgmans table, see info for usage
RealduvCoefficient in Bridgmans table, see info for usage
RealdvuCoefficient in Bridgmans table, see info for usage
RealdhvCoefficient in Bridgmans table, see info for usage
RealdvhCoefficient in Bridgmans table, see info for usage
RealdfvCoefficient in Bridgmans table, see info for usage
RealdvfCoefficient in Bridgmans table, see info for usage
RealdgvCoefficient in Bridgmans table, see info for usage
RealdvgCoefficient in Bridgmans table, see info for usage
RealdusCoefficient in Bridgmans table, see info for usage
RealdsuCoefficient in Bridgmans table, see info for usage
RealdhsCoefficient in Bridgmans table, see info for usage
RealdshCoefficient in Bridgmans table, see info for usage
RealdfsCoefficient in Bridgmans table, see info for usage
RealdsfCoefficient in Bridgmans table, see info for usage
RealdgsCoefficient in Bridgmans table, see info for usage
RealdsgCoefficient in Bridgmans table, see info for usage
RealdhuCoefficient in Bridgmans table, see info for usage
RealduhCoefficient in Bridgmans table, see info for usage
RealdfuCoefficient in Bridgmans table, see info for usage
RealdufCoefficient in Bridgmans table, see info for usage
RealdguCoefficient in Bridgmans table, see info for usage
RealdugCoefficient in Bridgmans table, see info for usage
RealdfhCoefficient in Bridgmans table, see info for usage
RealdhfCoefficient in Bridgmans table, see info for usage
RealdghCoefficient in Bridgmans table, see info for usage
RealdhgCoefficient in Bridgmans table, see info for usage
RealdfgCoefficient in Bridgmans table, see info for usage
RealdgfCoefficient in Bridgmans table, see info for usage

Record Modelica.​Media.​Common.​FundamentalConstants
Constants of the medium

Information

This icon is indicates a record.

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
MolarHeatCapacityR_bar 
SpecificHeatCapacityR 
MolarMassMM 
MolarDensityrhored 
TemperatureTred 
AbsolutePressurepred 
SpecificEnthalpyh_off 
SpecificEntropys_off 

Record Modelica.​Media.​Common.​AuxiliaryProperties
Intermediate property data record

Information

This icon is indicates a record.

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
PressurepPressure
TemperatureTTemperature
SpecificEnthalpyhSpecific enthalpy
SpecificHeatCapacityRGas constant
SpecificHeatCapacitycpSpecific heat capacity
SpecificHeatCapacitycvSpecific heat capacity
DensityrhoDensity
SpecificEntropysSpecific entropy
DerPressureByTemperatureptDerivative of pressure w.r.t. temperature
DerPressureByDensitypdDerivative of pressure w.r.t. density
RealvtDerivative of specific volume w.r.t. temperature
RealvpDerivative of specific volume w.r.t. pressure

Record Modelica.​Media.​Common.​GibbsDerivs2
Derivatives of Gibbs function w.r.t. pressure and temperature

Information

This icon is indicates a record.

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
PressurepPressure
TemperatureTTemperature
SpecificHeatCapacityRSpecific heat capacity
RealpiDimensionless pressure
RealthetaDimensionless temperature
RealgGibbs function
RealgpDerivative of g w.r.t. p
Realgpp2nd derivative of g w.r.t. p
RealgTDerivative of g w.r.t. T
RealgTT2nd derivative of g w.r.t. T
RealgTpMixed derivative of g w.r.t. T and p

Record Modelica.​Media.​Common.​NewtonDerivatives_dT
Derivatives for fast inverse calculations of Gibbs function

Information

This icon is indicates a record.

Extends from Modelica.​Icons.​Record (Icon for records).

Fields

TypeNameDescription
SpecificVolumevSpecific volume
RealvpDerivative of specific volume w.r.t. pressure

Function Modelica.​Media.​Common.​gibbsToBridgmansTables
Calculates base coefficients for Bridgman's tables from gibbs enthalpy

Information

This icon indicates Modelica functions.

Extends from Modelica.​Icons.​Function (Icon for functions).

Inputs

TypeNameDescription
GibbsDerivsgDimensionless derivatives of Gibbs function

Outputs

TypeNameDescription
SpecificVolumevSpecific volume
PressurepPressure
TemperatureTTemperature
SpecificEntropysSpecific entropy
SpecificHeatCapacitycpHeat capacity at constant pressure
IsobaricVolumeExpansionCoefficientalphaIsobaric volume expansion coefficient
IsothermalCompressibilitygammaIsothermal compressibility

Function Modelica.​Media.​Common.​helmholtzToBridgmansTables
Calculates base coefficients for Bridgmans tables from Helmholtz energy

Information

This icon indicates Modelica functions.

Extends from Modelica.​Icons.​Function (Icon for functions).

Inputs

TypeNameDescription
HelmholtzDerivsfDimensionless derivatives of Helmholtz function

Outputs

TypeNameDescription
SpecificVolumevSpecific volume
PressurepPressure
TemperatureTTemperature
SpecificEntropysSpecific entropy
SpecificHeatCapacitycpHeat capacity at constant pressure
IsobaricVolumeExpansionCoefficientalphaIsobaric volume expansion coefficient
IsothermalCompressibilitygammaIsothermal compressibility

Function Modelica.​Media.​Common.​gibbsToBoundaryProps
Calculate phase boundary property record from dimensionless Gibbs function

Information

This icon indicates Modelica functions.

Extends from Modelica.​Icons.​Function (Icon for functions).

Inputs

TypeNameDescription
GibbsDerivsgDimensionless derivatives of Gibbs function

Outputs

TypeNameDescription
PhaseBoundaryPropertiessatPhase boundary properties

Function Modelica.​Media.​Common.​helmholtzToBoundaryProps
Calculate phase boundary property record from dimensionless Helmholtz function

Information

This icon indicates Modelica functions.

Extends from Modelica.​Icons.​Function (Icon for functions).

Inputs

TypeNameDescription
HelmholtzDerivsfDimensionless derivatives of Helmholtz function

Outputs

TypeNameDescription
PhaseBoundaryPropertiessatPhase boundary property record

Function Modelica.​Media.​Common.​cv2Phase
Compute isochoric specific heat capacity inside the two-phase region

Information

This icon indicates Modelica functions.

Extends from Modelica.​Icons.​Function (Icon for functions).

Inputs

TypeNameDescription
PhaseBoundaryPropertiesliqProperties on the boiling curve
PhaseBoundaryPropertiesvapProperties on the condensation curve
MassFractionxVapour mass fraction
TemperatureTTemperature
PressurepProperties

Outputs

TypeNameDescription
SpecificHeatCapacitycvIsochoric specific heat capacity

Function Modelica.​Media.​Common.​cvdpT2Phase
Compute isochoric specific heat capacity inside the two-phase region and derivative of pressure w.r.t. temperature

Information

This icon indicates Modelica functions.

Extends from Modelica.​Icons.​Function (Icon for functions).

Inputs

TypeNameDescription
PhaseBoundaryPropertiesliqProperties on the boiling curve
PhaseBoundaryPropertiesvapProperties on the condensation curve
MassFractionxVapour mass fraction
TemperatureTTemperature
PressurepProperties

Outputs

TypeNameDescription
SpecificHeatCapacitycvIsochoric specific heat capacity
RealdpTDerivative of pressure w.r.t. temperature

Function Modelica.​Media.​Common.​gibbsToExtraDerivs
Compute additional thermodynamic derivatives from dimensionless Gibbs function

Information

This icon indicates Modelica functions.

Extends from Modelica.​Icons.​Function (Icon for functions).

Inputs

TypeNameDescription
GibbsDerivsgDimensionless derivatives of Gibbs function

Outputs

TypeNameDescription
ExtraDerivativesdproAdditional property derivatives

Function Modelica.​Media.​Common.​helmholtzToExtraDerivs
Compute additional thermodynamic derivatives from dimensionless Helmholtz function

Information

This icon indicates Modelica functions.

Extends from Modelica.​Icons.​Function (Icon for functions).

Inputs

TypeNameDescription
HelmholtzDerivsfDimensionless derivatives of Helmholtz function

Outputs

TypeNameDescription
ExtraDerivativesdproAdditional property derivatives

Function Modelica.​Media.​Common.​Helmholtz_ph
Function to calculate analytic derivatives for computing d and t given p and h

Information

This icon indicates Modelica functions.

Extends from Modelica.​Icons.​Function (Icon for functions).

Inputs

TypeNameDescription
HelmholtzDerivsfDimensionless derivatives of Helmholtz function

Outputs

TypeNameDescription
NewtonDerivatives_phnderivsDerivatives for Newton iteration to calculate d and t from p and h

Function Modelica.​Media.​Common.​Helmholtz_pT
Function to calculate analytic derivatives for computing d and t given p and t

Information

This icon indicates Modelica functions.

Extends from Modelica.​Icons.​Function (Icon for functions).

Inputs

TypeNameDescription
HelmholtzDerivsfDimensionless derivatives of Helmholtz function

Outputs

TypeNameDescription
NewtonDerivatives_pTnderivsDerivatives for Newton iteration to compute d and t from p and t

Function Modelica.​Media.​Common.​Helmholtz_ps
Function to calculate analytic derivatives for computing d and t given p and s

Information

This icon indicates Modelica functions.

Extends from Modelica.​Icons.​Function (Icon for functions).

Inputs

TypeNameDescription
HelmholtzDerivsfDimensionless derivatives of Helmholtz function

Outputs

TypeNameDescription
NewtonDerivatives_psnderivsDerivatives for Newton iteration to compute d and t from p and s

Function Modelica.​Media.​Common.​smoothStep
Approximation of a general step, such that the characteristic is continuous and differentiable

Information

This function is used to approximate the equation

    y = if x > 0 then y1 else y2;

by a smooth characteristic, so that the expression is continuous and differentiable:

   y = smooth(1, if x >  x_small then y1 else
                 if x < -x_small then y2 else f(y1, y2));

In the region -x_small < x < x_small a 2nd order polynomial is used for a smooth transition from y1 to y2.

If mass fractions X[:] are approximated with this function then this can be performed for all nX mass fractions, instead of applying it for nX-1 mass fractions and computing the last one by the mass fraction constraint sum(X)=1. The reason is that the approximating function has the property that sum(X) = 1, provided sum(X_a) = sum(X_b) = 1 (and y1=X_a[i], y2=X_b[i]). This can be shown by evaluating the approximating function in the abs(x) < x_small region (otherwise X is either X_a or X_b):

    X[1]  = smoothStep(x, X_a[1] , X_b[1] , x_small);
    X[2]  = smoothStep(x, X_a[2] , X_b[2] , x_small);
       ...
    X[nX] = smoothStep(x, X_a[nX], X_b[nX], x_small);

or

    X[1]  = c*(X_a[1]  - X_b[1])  + (X_a[1]  + X_b[1])/2
    X[2]  = c*(X_a[2]  - X_b[2])  + (X_a[2]  + X_b[2])/2;
       ...
    X[nX] = c*(X_a[nX] - X_b[nX]) + (X_a[nX] + X_b[nX])/2;
    c     = (x/x_small)*((x/x_small)^2 - 3)/4

Summing all mass fractions together results in

    sum(X) = c*(sum(X_a) - sum(X_b)) + (sum(X_a) + sum(X_b))/2
           = c*(1 - 1) + (1 + 1)/2
           = 1

Extends from Modelica.​Icons.​Function (Icon for functions).

Inputs

TypeNameDescription
RealxAbscissa value
Realy1Ordinate value for x > 0
Realy2Ordinate value for x < 0
Realx_smallApproximation of step for -x_small <= x <= x_small; x_small > 0 required

Outputs

TypeNameDescription
RealyOrdinate value to approximate y = if x > 0 then y1 else y2

Function Modelica.​Media.​Common.​Gibbs2_ph
Function to calculate analytic derivatives for computing T given p and h

Information

This icon indicates Modelica functions.

Extends from Modelica.​Icons.​Function (Icon for functions).

Inputs

TypeNameDescription
GibbsDerivs2gDimensionless derivatives of Gibbs function

Outputs

TypeNameDescription
NewtonDerivatives_phnderivsDerivatives for Newton iteration to calculate d and t from p and h

Function Modelica.​Media.​Common.​Gibbs2_dT
Function to calculate analytic derivatives for computing p given d and T

Information

This icon indicates Modelica functions.

Extends from Modelica.​Icons.​Function (Icon for functions).

Inputs

TypeNameDescription
GibbsDerivs2gDimensionless derivatives of Gibbs function

Outputs

TypeNameDescription
NewtonDerivatives_dTnderivsDerivatives for Newton iteration to compute p from d and T

Function Modelica.​Media.​Common.​Gibbs2_ps
Function to calculate analytic derivatives for computing d and t given p and s

Information

This icon indicates Modelica functions.

Extends from Modelica.​Icons.​Function (Icon for functions).

Inputs

TypeNameDescription
GibbsDerivs2gDimensionless derivatives of Gibbs function

Outputs

TypeNameDescription
NewtonDerivatives_psnderivsDerivatives for Newton iteration to compute T from p and s