LBL logo

Modelica.Media.Interfaces.PartialSimpleMedium.setState_pTX Modelica.Media.Interfaces.PartialSimpleMedium.setState_pTX

Return thermodynamic state from p, T, and X or Xi

Information

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

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
TemperatureT Temperature [K]
MassFractionX[:]reference_XMass fractions [kg/kg]

Outputs

TypeNameDescription
ThermodynamicStatestateThermodynamic state record

Modelica definition

redeclare function setState_pTX "Return thermodynamic state from p, T, and X or Xi" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input Temperature T "Temperature"; input MassFraction X[:]=reference_X "Mass fractions"; output ThermodynamicState state "Thermodynamic state record"; algorithm state := ThermodynamicState(p=p, T=T); end setState_pTX;

Modelica.Media.Interfaces.PartialSimpleMedium.setState_phX Modelica.Media.Interfaces.PartialSimpleMedium.setState_phX

Return thermodynamic state from p, h, and X or Xi

Information

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

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
SpecificEnthalpyh Specific enthalpy [J/kg]
MassFractionX[:]reference_XMass fractions [kg/kg]

Outputs

TypeNameDescription
ThermodynamicStatestateThermodynamic state record

Modelica definition

redeclare function setState_phX "Return thermodynamic state from p, h, and X or Xi" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input SpecificEnthalpy h "Specific enthalpy"; input MassFraction X[:]=reference_X "Mass fractions"; output ThermodynamicState state "Thermodynamic state record"; algorithm state := ThermodynamicState(p=p, T=T0 + h/cp_const); end setState_phX;

Modelica.Media.Interfaces.PartialSimpleMedium.setState_psX Modelica.Media.Interfaces.PartialSimpleMedium.setState_psX

Return thermodynamic state from p, s, and X or Xi

Information

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

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
SpecificEntropys Specific entropy [J/(kg.K)]
MassFractionX[:]reference_XMass fractions [kg/kg]

Outputs

TypeNameDescription
ThermodynamicStatestateThermodynamic state record

Modelica definition

redeclare replaceable function setState_psX "Return thermodynamic state from p, s, and X or Xi" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input SpecificEntropy s "Specific entropy"; input MassFraction X[:]=reference_X "Mass fractions"; output ThermodynamicState state "Thermodynamic state record"; algorithm state := ThermodynamicState(p=p, T=Modelica.Math.exp(s/cp_const + Modelica.Math.log(reference_T))) "Here the incompressible limit is used, with cp as heat capacity"; end setState_psX;

Modelica.Media.Interfaces.PartialSimpleMedium.setState_dTX Modelica.Media.Interfaces.PartialSimpleMedium.setState_dTX

Return thermodynamic state from d, T, and X or Xi

Information

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

Inputs

TypeNameDefaultDescription
Densityd Density [kg/m3]
TemperatureT Temperature [K]
MassFractionX[:]reference_XMass fractions [kg/kg]

Outputs

TypeNameDescription
ThermodynamicStatestateThermodynamic state record

Modelica definition

redeclare function setState_dTX "Return thermodynamic state from d, T, and X or Xi" extends Modelica.Icons.Function; input Density d "Density"; input Temperature T "Temperature"; input MassFraction X[:]=reference_X "Mass fractions"; output ThermodynamicState state "Thermodynamic state record"; algorithm assert(false, "Pressure can not be computed from temperature and density for an incompressible fluid!"); end setState_dTX;

Modelica.Media.Interfaces.PartialSimpleMedium.setSmoothState Modelica.Media.Interfaces.PartialSimpleMedium.setSmoothState

Return thermodynamic state so that it smoothly approximates: if x > 0 then state_a else state_b

Information

Extends from (Return thermodynamic state so that it smoothly approximates: if x > 0 then state_a else state_b).

Inputs

TypeNameDefaultDescription
Realx m_flow or dp
ThermodynamicStatestate_a Thermodynamic state if x > 0
ThermodynamicStatestate_b Thermodynamic state if x < 0
Realx_small Smooth transition in the region -x_small < x < x_small

Outputs

TypeNameDescription
ThermodynamicStatestateSmooth thermodynamic state for all x (continuous and differentiable)

Modelica definition

redeclare function extends setSmoothState "Return thermodynamic state so that it smoothly approximates: if x > 0 then state_a else state_b" algorithm state := ThermodynamicState(p=Media.Common.smoothStep( x, state_a.p, state_b.p, x_small), T=Media.Common.smoothStep( x, state_a.T, state_b.T, x_small)); end setSmoothState;

Modelica.Media.Interfaces.PartialSimpleMedium.dynamicViscosity Modelica.Media.Interfaces.PartialSimpleMedium.dynamicViscosity

Return dynamic viscosity

Information

Extends from (Return dynamic viscosity).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
DynamicViscosityetaDynamic viscosity [Pa.s]

Modelica definition

redeclare function extends dynamicViscosity "Return dynamic viscosity" algorithm eta := eta_const; end dynamicViscosity;

Modelica.Media.Interfaces.PartialSimpleMedium.thermalConductivity Modelica.Media.Interfaces.PartialSimpleMedium.thermalConductivity

Return thermal conductivity

Information

Extends from (Return thermal conductivity).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
ThermalConductivitylambdaThermal conductivity [W/(m.K)]

Modelica definition

redeclare function extends thermalConductivity "Return thermal conductivity" algorithm lambda := lambda_const; end thermalConductivity;

Modelica.Media.Interfaces.PartialSimpleMedium.pressure Modelica.Media.Interfaces.PartialSimpleMedium.pressure

Return pressure

Information

Extends from (Return pressure).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
AbsolutePressurepPressure [Pa]

Modelica definition

redeclare function extends pressure "Return pressure" algorithm p := state.p; end pressure;

Modelica.Media.Interfaces.PartialSimpleMedium.temperature Modelica.Media.Interfaces.PartialSimpleMedium.temperature

Return temperature

Information

Extends from (Return temperature).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
TemperatureTTemperature [K]

Modelica definition

redeclare function extends temperature "Return temperature" algorithm T := state.T; end temperature;

Modelica.Media.Interfaces.PartialSimpleMedium.density Modelica.Media.Interfaces.PartialSimpleMedium.density

Return density

Information

Extends from (Return density).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
DensitydDensity [kg/m3]

Modelica definition

redeclare function extends density "Return density" algorithm d := d_const; end density;

Modelica.Media.Interfaces.PartialSimpleMedium.specificEnthalpy Modelica.Media.Interfaces.PartialSimpleMedium.specificEnthalpy

Return specific enthalpy

Information

Extends from (Return specific enthalpy).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
SpecificEnthalpyhSpecific enthalpy [J/kg]

Modelica definition

redeclare function extends specificEnthalpy "Return specific enthalpy" algorithm h := cp_const*(state.T - T0); end specificEnthalpy;

Modelica.Media.Interfaces.PartialSimpleMedium.specificHeatCapacityCp Modelica.Media.Interfaces.PartialSimpleMedium.specificHeatCapacityCp

Return specific heat capacity at constant pressure

Information

Extends from (Return specific heat capacity at constant pressure).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
SpecificHeatCapacitycpSpecific heat capacity at constant pressure [J/(kg.K)]

Modelica definition

redeclare function extends specificHeatCapacityCp "Return specific heat capacity at constant pressure" algorithm cp := cp_const; end specificHeatCapacityCp;

Modelica.Media.Interfaces.PartialSimpleMedium.specificHeatCapacityCv Modelica.Media.Interfaces.PartialSimpleMedium.specificHeatCapacityCv

Return specific heat capacity at constant volume

Information

Extends from (Return specific heat capacity at constant volume).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
SpecificHeatCapacitycvSpecific heat capacity at constant volume [J/(kg.K)]

Modelica definition

redeclare function extends specificHeatCapacityCv "Return specific heat capacity at constant volume" algorithm cv := cv_const; end specificHeatCapacityCv;

Modelica.Media.Interfaces.PartialSimpleMedium.isentropicExponent Modelica.Media.Interfaces.PartialSimpleMedium.isentropicExponent

Return isentropic exponent

Information

Extends from (Return isentropic exponent).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
IsentropicExponentgammaIsentropic exponent [1]

Modelica definition

redeclare function extends isentropicExponent "Return isentropic exponent" algorithm gamma := cp_const/cv_const; end isentropicExponent;

Modelica.Media.Interfaces.PartialSimpleMedium.velocityOfSound Modelica.Media.Interfaces.PartialSimpleMedium.velocityOfSound

Return velocity of sound

Information

Extends from (Return velocity of sound).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
VelocityOfSoundaVelocity of sound [m/s]

Modelica definition

redeclare function extends velocityOfSound "Return velocity of sound" algorithm a := a_const; end velocityOfSound;

Modelica.Media.Interfaces.PartialSimpleMedium.specificEnthalpy_pTX Modelica.Media.Interfaces.PartialSimpleMedium.specificEnthalpy_pTX

Return specific enthalpy from p, T, and X or Xi

Information

This function computes the specific enthalpy of the fluid, but neglects the (small) influence of the pressure term p/d.

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

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
TemperatureT Temperature [K]
MassFractionX[nX] Mass fractions [kg/kg]

Outputs

TypeNameDescription
SpecificEnthalpyhSpecific enthalpy [J/kg]

Modelica definition

redeclare function specificEnthalpy_pTX "Return specific enthalpy from p, T, and X or Xi" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input Temperature T "Temperature"; input MassFraction X[nX] "Mass fractions"; output SpecificEnthalpy h "Specific enthalpy"; algorithm h := cp_const*(T - T0); end specificEnthalpy_pTX;

Modelica.Media.Interfaces.PartialSimpleMedium.temperature_phX Modelica.Media.Interfaces.PartialSimpleMedium.temperature_phX

Return temperature from p, h, and X or Xi

Information

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

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
SpecificEnthalpyh Specific enthalpy [J/kg]
MassFractionX[nX] Mass fractions [kg/kg]

Outputs

TypeNameDescription
TemperatureTTemperature [K]

Modelica definition

redeclare function temperature_phX "Return temperature from p, h, and X or Xi" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input SpecificEnthalpy h "Specific enthalpy"; input MassFraction X[nX] "Mass fractions"; output Temperature T "Temperature"; algorithm T := T0 + h/cp_const; end temperature_phX;

Modelica.Media.Interfaces.PartialSimpleMedium.density_phX Modelica.Media.Interfaces.PartialSimpleMedium.density_phX

Return density from p, h, and X or Xi

Information

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

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
SpecificEnthalpyh Specific enthalpy [J/kg]
MassFractionX[nX] Mass fractions [kg/kg]

Outputs

TypeNameDescription
DensitydDensity [kg/m3]

Modelica definition

redeclare function density_phX "Return density from p, h, and X or Xi" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input SpecificEnthalpy h "Specific enthalpy"; input MassFraction X[nX] "Mass fractions"; output Density d "Density"; algorithm d := density(setState_phX( p, h, X)); end density_phX;

Modelica.Media.Interfaces.PartialSimpleMedium.specificInternalEnergy Modelica.Media.Interfaces.PartialSimpleMedium.specificInternalEnergy

Return specific internal energy

Information

This function computes the specific internal energy of the fluid, but neglects the (small) influence of the pressure term p/d.

Extends from Modelica.Icons.Function (Icon for functions), (Return specific internal energy).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
SpecificEnergyuSpecific internal energy [J/kg]

Modelica definition

redeclare function extends specificInternalEnergy "Return specific internal energy" extends Modelica.Icons.Function; algorithm // u := cv_const*(state.T - T0) - reference_p/d_const; u := cv_const*(state.T - T0); end specificInternalEnergy;

Modelica.Media.Interfaces.PartialSimpleMedium.specificEntropy Modelica.Media.Interfaces.PartialSimpleMedium.specificEntropy

Return specific entropy

Information

Extends from Modelica.Icons.Function (Icon for functions), (Return specific entropy).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
SpecificEntropysSpecific entropy [J/(kg.K)]

Modelica definition

redeclare function extends specificEntropy "Return specific entropy" extends Modelica.Icons.Function; algorithm s := cv_const*Modelica.Math.log(state.T/T0); end specificEntropy;

Modelica.Media.Interfaces.PartialSimpleMedium.specificGibbsEnergy Modelica.Media.Interfaces.PartialSimpleMedium.specificGibbsEnergy

Return specific Gibbs energy

Information

Extends from Modelica.Icons.Function (Icon for functions), (Return specific Gibbs energy).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
SpecificEnergygSpecific Gibbs energy [J/kg]

Modelica definition

redeclare function extends specificGibbsEnergy "Return specific Gibbs energy" extends Modelica.Icons.Function; algorithm g := specificEnthalpy(state) - state.T*specificEntropy(state); end specificGibbsEnergy;

Modelica.Media.Interfaces.PartialSimpleMedium.specificHelmholtzEnergy Modelica.Media.Interfaces.PartialSimpleMedium.specificHelmholtzEnergy

Return specific Helmholtz energy

Information

Extends from Modelica.Icons.Function (Icon for functions), (Return specific Helmholtz energy).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
SpecificEnergyfSpecific Helmholtz energy [J/kg]

Modelica definition

redeclare function extends specificHelmholtzEnergy "Return specific Helmholtz energy" extends Modelica.Icons.Function; algorithm f := specificInternalEnergy(state) - state.T*specificEntropy(state); end specificHelmholtzEnergy;

Modelica.Media.Interfaces.PartialSimpleMedium.isentropicEnthalpy Modelica.Media.Interfaces.PartialSimpleMedium.isentropicEnthalpy

Return isentropic enthalpy

Information

Extends from (Return isentropic enthalpy).

Inputs

TypeNameDefaultDescription
AbsolutePressurep_downstream Downstream pressure [Pa]
ThermodynamicStaterefState Reference state for entropy

Outputs

TypeNameDescription
SpecificEnthalpyh_isIsentropic enthalpy [J/kg]

Modelica definition

redeclare function extends isentropicEnthalpy "Return isentropic enthalpy" algorithm h_is := cp_const*(temperature(refState) - T0); end isentropicEnthalpy;

Modelica.Media.Interfaces.PartialSimpleMedium.isobaricExpansionCoefficient Modelica.Media.Interfaces.PartialSimpleMedium.isobaricExpansionCoefficient

Returns overall the isobaric expansion coefficient beta

Information

Extends from (Return overall the isobaric expansion coefficient beta).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
IsobaricExpansionCoefficientbetaIsobaric expansion coefficient [1/K]

Modelica definition

redeclare function extends isobaricExpansionCoefficient "Returns overall the isobaric expansion coefficient beta" algorithm beta := 0.0; end isobaricExpansionCoefficient;

Modelica.Media.Interfaces.PartialSimpleMedium.isothermalCompressibility Modelica.Media.Interfaces.PartialSimpleMedium.isothermalCompressibility

Returns overall the isothermal compressibility factor

Information

Extends from (Return overall the isothermal compressibility factor).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
IsothermalCompressibilitykappaIsothermal compressibility [1/Pa]

Modelica definition

redeclare function extends isothermalCompressibility "Returns overall the isothermal compressibility factor" algorithm kappa := 0; end isothermalCompressibility;

Modelica.Media.Interfaces.PartialSimpleMedium.density_derp_T Modelica.Media.Interfaces.PartialSimpleMedium.density_derp_T

Returns the partial derivative of density with respect to pressure at constant temperature

Information

Extends from (Return density derivative w.r.t. pressure at const temperature).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
DerDensityByPressureddpTDensity derivative w.r.t. pressure [s2/m2]

Modelica definition

redeclare function extends density_derp_T "Returns the partial derivative of density with respect to pressure at constant temperature" algorithm ddpT := 0; end density_derp_T;

Modelica.Media.Interfaces.PartialSimpleMedium.density_derT_p Modelica.Media.Interfaces.PartialSimpleMedium.density_derT_p

Returns the partial derivative of density with respect to temperature at constant pressure

Information

Extends from (Return density derivative w.r.t. temperature at constant pressure).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
DerDensityByTemperatureddTpDensity derivative w.r.t. temperature [kg/(m3.K)]

Modelica definition

redeclare function extends density_derT_p "Returns the partial derivative of density with respect to temperature at constant pressure" algorithm ddTp := 0; end density_derT_p;

Modelica.Media.Interfaces.PartialSimpleMedium.density_derX Modelica.Media.Interfaces.PartialSimpleMedium.density_derX

Returns the partial derivative of density with respect to mass fractions at constant pressure and temperature

Information

Extends from (Return density derivative w.r.t. mass fraction).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
DensitydddX[nX]Derivative of density w.r.t. mass fraction [kg/m3]

Modelica definition

redeclare function extends density_derX "Returns the partial derivative of density with respect to mass fractions at constant pressure and temperature" algorithm dddX := fill(0, nX); end density_derX;

Modelica.Media.Interfaces.PartialSimpleMedium.molarMass Modelica.Media.Interfaces.PartialSimpleMedium.molarMass

Return the molar mass of the medium

Information

Extends from (Return the molar mass of the medium).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
MolarMassMMMixture molar mass [kg/mol]

Modelica definition

redeclare function extends molarMass "Return the molar mass of the medium" algorithm MM := MM_const; end molarMass;

Automatically generated Mon May 4 10:33:21 2015.