This medium model is identical to Modelica.Media.Air.SimpleAir, except the equation d = p/(R*T) has been replaced with d/dStp = p/pStp where pStd and dStp are constants for a reference temperature and density.
This new formulation often leads to smaller systems of nonlinear equations because pressure and temperature are decoupled, at the expense of accuracy.
As in Modelica.Media.Air.SimpleAir, the specific enthalpy h and specific internal energy u are only a function of temperature T and all other provided medium quantities are constant.
Name | Description |
---|---|
BaseProperties | Basic medium properties |
setState_dTX | Return thermodynamic state from d, T, and X or Xi |
density | return density of ideal gas |
specificEntropy | Return specific entropy |
Type | Name | Default | Description |
---|---|---|---|
Boolean | preferredMediumStates | false | = true if StateSelect.prefer shall be used for the independent property variables of the medium |
redeclare model BaseProperties "Basic medium properties" extends BasePropertiesRecord; ThermodynamicState state "thermodynamic state variables for optional functions"; parameter Boolean preferredMediumStates=false "= true if StateSelect.prefer shall be used for the independent property variables of the medium"; SI.Conversions.NonSIunits.Temperature_degC T_degC= Modelica.SIunits.Conversions.to_degC(T) "Temperature of medium in [degC]"; SI.Conversions.NonSIunits.Pressure_bar p_bar= Modelica.SIunits.Conversions.to_bar(p) "Absolute pressure of medium in [bar]"; constant AbsolutePressure pStp = 101325 "Pressure for which dStp is defined"; constant Density dStp = 1.2 "Fluid density at pressure pStp"; equation h = specificEnthalpy_pTX(p,T,X); u = h-R*T; R = R_gas; // d = p/(R*T); d*pStp = p*dStp; MM = MM_const; state.T = T; state.p = p; end BaseProperties;
Type | Name | Default | Description |
---|---|---|---|
Density | d | density [kg/m3] | |
Temperature | T | Temperature [K] | |
MassFraction | X[:] | fill(0, 0) | Mass fractions [kg/kg] |
Type | Name | Description |
---|---|---|
ThermodynamicState | state |
redeclare replaceable 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[:] = fill(0,0) "Mass fractions"; output ThermodynamicState state; algorithm state := ThermodynamicState(p=d/dStp*pStd,T=T); end setState_dTX;
Type | Name | Default | Description |
---|---|---|---|
ThermodynamicState | state |
Type | Name | Description |
---|---|---|
Density | d | Density [kg/m3] |
redeclare replaceable function extends density "return density of ideal gas" algorithm d := dStp*state.p/pStp; end density;
Type | Name | Default | Description |
---|---|---|---|
ThermodynamicState | state |
Type | Name | Description |
---|---|---|
SpecificEntropy | s | Specific entropy [J/(kg.K)] |
redeclare replaceable function extends specificEntropy "Return specific entropy" extends Modelica.Icons.Function; algorithm s := cp_const*Modelica.Math.log(state.T/T0);// - R_gas*Modelica.Math.log(state.p/reference_p); end specificEntropy;