This model calculates the medium properties for single component ideal gases.
Sources for model and literature:
Original Data: Computer program for calculation of complex chemical
equilibrium compositions and applications. Part 1: Analysis
Document ID: 19950013764 N (95N20180) File Series: NASA Technical Reports
Report Number: NASA-RP-1311 E-8017 NAS 1.61:1311
Authors: Gordon, Sanford (NASA Lewis Research Center)
Mcbride, Bonnie J. (NASA Lewis Research Center)
Published: Oct 01, 1994.
Known limits of validity: The data is valid for temperatures between 200 K and 6000 K. A few of the data sets for monatomic gases have a discontinuous 1st derivative at 1000 K, but this never caused problems so far.
This model has been copied from the ThermoFluid library. It has been developed by Hubertus Tummescheit.
Extends from Modelica.Media.Interfaces.PartialMixtureMedium (Base class for pure substances of several chemical substances).Name | Description |
---|---|
ThermodynamicState | Thermodynamic state variables |
data | Data records of ideal gas substances |
excludeEnthalpyOfFormation=true | If true, enthalpy of formation Hf is not included in specific enthalpy h |
referenceChoice=ReferenceEnthalpy.ZeroAt0K | Choice of reference enthalpy |
h_offset=0.0 | User defined offset for reference enthalpy, if referenceChoice = UserDefined |
MMX=data[:].MM | Molar masses of components |
methodForThermalConductivity=1 | |
BaseProperties | Base properties (p, d, T, h, u, R, MM, X, and Xi of NASA mixture gas |
setState_pTX | Return thermodynamic state as function of p, T and composition X |
setState_phX | Return thermodynamic state as function of p, h and composition X |
setState_psX | Return thermodynamic state as function of p, s and composition X |
setState_dTX | Return thermodynamic state as function of d, T and composition X |
setSmoothState | Return thermodynamic state so that it smoothly approximates: if x > 0 then state_a else state_b |
pressure | Return pressure of ideal gas |
temperature | Return temperature of ideal gas |
density | Return density of ideal gas |
specificEnthalpy | Return specific enthalpy |
specificInternalEnergy | Return specific internal energy |
specificEntropy | Return specific entropy |
specificGibbsEnergy | Return specific Gibbs energy |
specificHelmholtzEnergy | Return specific Helmholtz energy |
h_TX | Return specific enthalpy |
h_TX_der | Return specific enthalpy derivative |
gasConstant | Return gasConstant |
specificHeatCapacityCp | Return specific heat capacity at constant pressure |
specificHeatCapacityCv | Return specific heat capacity at constant volume from temperature and gas data |
MixEntropy | Return mixing entropy of ideal gases / R |
s_TX | Return temperature dependent part of the entropy, expects full entropy vector |
isentropicExponent | Return isentropic exponent |
velocityOfSound | Return velocity of sound |
isentropicEnthalpyApproximation | Approximate method of calculating h_is from upstream properties and downstream pressure |
isentropicEnthalpy | Return isentropic enthalpy |
gasMixtureViscosity | Return viscosities of gas mixtures at low pressures (Wilke method) |
dynamicViscosity | Return mixture dynamic viscosity |
mixtureViscosityChung | Return the viscosity of gas mixtures without access to component viscosities (Chung, et. al. rules) |
lowPressureThermalConductivity | Return thermal conductivities of low-pressure gas mixtures (Mason and Saxena Modification) |
thermalConductivity | Return thermal conductivity for low pressure gas mixtures |
isobaricExpansionCoefficient | Return isobaric expansion coefficient beta |
isothermalCompressibility | Return isothermal compressibility factor |
density_derp_T | Return density derivative by pressure at constant temperature |
density_derT_p | Return density derivative by temperature at constant pressure |
density_derX | Return density derivative by mass fraction |
molarMass | Return molar mass of mixture |
T_hX | Return temperature from specific enthalpy and mass fraction |
T_psX | Return temperature from pressure, specific entropy and mass fraction |
Inherited | |
fluidConstants | Constant data for the fluid |
moleToMassFractions | Return mass fractions X from mole fractions |
massToMoleFractions | Return mole fractions from mass fractions X |
ThermoStates | Enumeration type for independent variables |
mediumName="unusablePartialMedium" | Name of the medium |
substanceNames={mediumName} | Names of the mixture substances. Set substanceNames={mediumName} if only one substance. |
extraPropertiesNames=fill("", 0) | Names of the additional (extra) transported properties. Set extraPropertiesNames=fill("",0) if unused |
singleState | = true, if u and d are not a function of pressure |
reducedX=true | = true if medium contains the equation sum(X) = 1.0; set reducedX=true if only one substance (see docu for details) |
fixedX=false | = true if medium contains the equation X = reference_X |
reference_p=101325 | Reference pressure of Medium: default 1 atmosphere |
reference_T=298.15 | Reference temperature of Medium: default 25 deg Celsius |
reference_X=fill(1/nX, nX) | Default mass fractions of medium |
p_default=101325 | Default value for pressure of medium (for initialization) |
T_default=Modelica.SIunits.Conversions.from_degC(20) | Default value for temperature of medium (for initialization) |
h_default=specificEnthalpy_pTX(p_default, T_default, X_default) | Default value for specific enthalpy of medium (for initialization) |
X_default=reference_X | Default value for mass fractions of medium (for initialization) |
nS=size(substanceNames, 1) | Number of substances |
nX=nS | Number of mass fractions |
nXi=if fixedX then 0 else if reducedX then nS - 1 else nS | Number of structurally independent mass fractions (see docu for details) |
nC=size(extraPropertiesNames, 1) | Number of extra (outside of standard mass-balance) transported properties |
C_nominal=1.0e-6*ones(nC) | Default for the nominal values for the extra properties |
FluidConstants | Critical, triple, molecular and other standard data of fluid |
prandtlNumber | Return the Prandtl number |
heatCapacity_cp | Alias for deprecated name |
heatCapacity_cv | Alias for deprecated name |
beta | Alias for isobaricExpansionCoefficient for user convenience |
kappa | Alias of isothermalCompressibility for user convenience |
density_derp_h | Return density derivative w.r.t. pressure at const specific enthalpy |
density_derh_p | Return density derivative w.r.t. specific enthalpy at constant pressure |
specificEnthalpy_pTX | Return specific enthalpy from p, T, and X or Xi |
specificEntropy_pTX | Return specific enthalpy from p, T, and X or Xi |
density_pTX | Return density from p, T, and X or Xi |
temperature_phX | Return temperature from p, h, and X or Xi |
density_phX | Return density from p, h, and X or Xi |
temperature_psX | Return temperature from p,s, and X or Xi |
density_psX | Return density from p, s, and X or Xi |
specificEnthalpy_psX | Return specific enthalpy from p, s, and X or Xi |
MassFlowRate | Type for mass flow rate with medium specific attributes |
AbsolutePressure | Type for absolute pressure with medium specific attributes |
Density | Type for density with medium specific attributes |
DynamicViscosity | Type for dynamic viscosity with medium specific attributes |
EnthalpyFlowRate | Type for enthalpy flow rate with medium specific attributes |
MassFraction | Type for mass fraction with medium specific attributes |
MoleFraction | Type for mole fraction with medium specific attributes |
MolarMass | Type for molar mass with medium specific attributes |
MolarVolume | Type for molar volume with medium specific attributes |
IsentropicExponent | Type for isentropic exponent with medium specific attributes |
SpecificEnergy | Type for specific energy with medium specific attributes |
SpecificInternalEnergy | Type for specific internal energy with medium specific attributes |
SpecificEnthalpy | Type for specific enthalpy with medium specific attributes |
SpecificEntropy | Type for specific entropy with medium specific attributes |
SpecificHeatCapacity | Type for specific heat capacity with medium specific attributes |
SurfaceTension | Type for surface tension with medium specific attributes |
Temperature | Type for temperature with medium specific attributes |
ThermalConductivity | Type for thermal conductivity with medium specific attributes |
PrandtlNumber | Type for Prandtl number with medium specific attributes |
VelocityOfSound | Type for velocity of sound with medium specific attributes |
ExtraProperty | Type for unspecified, mass-specific property transported by flow |
CumulativeExtraProperty | Type for conserved integral of unspecified, mass specific property |
ExtraPropertyFlowRate | Type for flow rate of unspecified, mass-specific property |
IsobaricExpansionCoefficient | Type for isobaric expansion coefficient with medium specific attributes |
DipoleMoment | Type for dipole moment with medium specific attributes |
DerDensityByPressure | Type for partial derivative of density with respect to pressure with medium specific attributes |
DerDensityByEnthalpy | Type for partial derivative of density with respect to enthalpy with medium specific attributes |
DerEnthalpyByPressure | Type for partial derivative of enthalpy with respect to pressure with medium specific attributes |
DerDensityByTemperature | Type for partial derivative of density with respect to temperature with medium specific attributes |
DerTemperatureByPressure | Type for partial derivative of temperature with respect to pressure with medium specific attributes |
SaturationProperties | Saturation properties of two phase medium |
FluidLimits | Validity limits for fluid model |
FixedPhase | Phase of the fluid: 1 for 1-phase, 2 for two-phase, 0 for not known, e.g., interactive use |
Basic | The most basic version of a record used in several degrees of detail |
IdealGas | The ideal gas version of a record used in several degrees of detail |
TwoPhase | The two phase fluid version of a record used in several degrees of detail |
Name | Description |
---|---|
standardOrderComponents | If true, and reducedX = true, the last element of X will be computed from the other ones |
Advanced | |
preferredMediumStates | = true if StateSelect.prefer shall be used for the independent property variables of the medium |
Name | Description |
---|---|
p | Pressure [Pa] |
T | Temperature [K] |
X[:] | Mass fractions [kg/kg] |
Name | Description |
---|---|
state |
Name | Description |
---|---|
p | Pressure [Pa] |
h | Specific enthalpy [J/kg] |
X[:] | Mass fractions [kg/kg] |
Name | Description |
---|---|
state |
Name | Description |
---|---|
p | Pressure [Pa] |
s | Specific entropy [J/(kg.K)] |
X[:] | Mass fractions [kg/kg] |
Name | Description |
---|---|
state |
Name | Description |
---|---|
d | Density [kg/m3] |
T | Temperature [K] |
X[:] | Mass fractions [kg/kg] |
Name | Description |
---|---|
state |
Name | Description |
---|---|
x | m_flow or dp |
state_a | Thermodynamic state if x > 0 |
state_b | Thermodynamic state if x < 0 |
x_small | Smooth transition in the region -x_small < x < x_small |
Name | Description |
---|---|
state | Smooth thermodynamic state for all x (continuous and differentiable) |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
p | Pressure [Pa] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
T | Temperature [K] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
d | Density [kg/m3] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
h | Specific enthalpy [J/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
u | Specific internal energy [J/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
s | Specific entropy [J/(kg.K)] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
g | Specific Gibbs energy [J/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
f | Specific Helmholtz energy [J/kg] |
Name | Description |
---|---|
T | Temperature [K] |
X[:] | Independent Mass fractions of gas mixture [kg/kg] |
exclEnthForm | If true, enthalpy of formation Hf is not included in specific enthalpy h |
refChoice | Choice of reference enthalpy |
h_off | User defined offset for reference enthalpy, if referenceChoice = UserDefined [J/kg] |
Name | Description |
---|---|
h | Specific enthalpy at temperature T [J/kg] |
Name | Description |
---|---|
T | Temperature [K] |
X[nX] | Independent Mass fractions of gas mixture [kg/kg] |
exclEnthForm | If true, enthalpy of formation Hf is not included in specific enthalpy h |
refChoice | Choice of reference enthalpy |
h_off | User defined offset for reference enthalpy, if referenceChoice = UserDefined [J/kg] |
dT | Temperature derivative |
dX[nX] | Independent mass fraction derivative |
Name | Description |
---|---|
h_der | Specific enthalpy at temperature T |
Name | Description |
---|---|
state | Thermodynamic state |
Name | Description |
---|---|
R | Mixture gas constant [J/(kg.K)] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
cp | Specific heat capacity at constant pressure [J/(kg.K)] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
cv | Specific heat capacity at constant volume [J/(kg.K)] |
Name | Description |
---|---|
x[:] | Mole fraction of mixture [1] |
Name | Description |
---|---|
smix | Mixing entropy contribution, divided by gas constant |
Name | Description |
---|---|
T | Temperature [K] |
X[nX] | Mass fraction [kg/kg] |
Name | Description |
---|---|
s | Specific entropy [J/(kg.K)] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
gamma | Isentropic exponent [1] |
Name | Description |
---|---|
state | Properties at upstream location |
Name | Description |
---|---|
a | Velocity of sound [m/s] |
Name | Description |
---|---|
p2 | Downstream pressure [Pa] |
state | Thermodynamic state at upstream location |
Name | Description |
---|---|
h_is | Isentropic enthalpy [J/kg] |
Name | Description |
---|---|
exact | Flag whether exact or approximate version should be used |
p_downstream | Downstream pressure [Pa] |
refState | Reference state for entropy |
Name | Description |
---|---|
h_is | Isentropic enthalpy [J/kg] |
Simplification of the kinetic theory (Chapman and Enskog theory)
approach neglecting the second-order effects.
This equation has been extensively tested (Amdur and Mason, 1958;
Bromley and Wilke, 1951; Cheung, 1958; Dahler, 1959; Gandhi and Saxena,
1964; Ranz and Brodowsky, 1962; Saxena and Gambhir, 1963a; Strunk, et
al., 1964; Vanderslice, et al. 1962; Wright and Gray, 1962). In most
cases, only nonpolar mixtures were compared, and very good results
obtained. For some systems containing hydrogen as one component, less
satisfactory agreement was noted. Wilke's method predicted mixture
viscosities that were larger than experimental for the H2-N2 system,
but for H2-NH3, it underestimated the viscosities.
Gururaja, et al. (1967) found that this method also overpredicted in
the H2-O2 case but was quite accurate for the H2-CO2 system.
Wilke's approximation has proved reliable even for polar-polar gas
mixtures of aliphatic alcohols (Reid and Belenyessy, 1960). The
principal reservation appears to lie in those cases where Mi>>Mj
and etai>>etaj.
Name | Description |
---|---|
yi[:] | Mole fractions [mol/mol] |
M[:] | Mole masses [kg/mol] |
eta[:] | Pure component viscosities [Pa.s] |
Name | Description |
---|---|
etam | Viscosity of the mixture [Pa.s] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
eta | Dynamic viscosity [Pa.s] |
Equation to estimate the viscosity of gas mixtures at low pressures.
It is a simplification of an extension of the rigorous kinetic theory
of Chapman and Enskog to determine the viscosity of multicomponent
mixtures, at low pressures and with a factor to correct for molecule
shape and polarity.
The input argument Kappa is a special correction for highly polar substances such as
alcohols and acids.
Values of kappa for a few such materials:
Compound |
Kappa |
Compound |
Kappa |
Methanol |
0.215 |
n-Pentanol |
0.122 |
Ethanol |
0.175 |
n-Hexanol |
0.114 |
n-Propanol |
0.143 |
n-Heptanol |
0.109 |
i-Propanol |
0.143 |
Acetic Acid |
0.0916 |
n-Butanol |
0.132 |
Water |
0.076 |
i-Butanol |
0.132 |
Chung, et al. (1984) suggest that for other alcohols not shown in the
table:
kappa = 0.0682 + 4.704*[(number of -OH
groups)]/[molecular weight]
S.I. units relation for the
debyes:
1 debye = 3.162e-25 (J.m^3)^(1/2)
[1] THE PROPERTIES OF GASES AND LIQUIDS, Fifth Edition,
Bruce E. Poling, John M.
Prausnitz, John P. O'Connell.
[2] Chung, T.-H., M. Ajlan, L. L. Lee, and K. E. Starling: Ind. Eng.
Chem. Res., 27: 671 (1988).
[3] Chung, T.-H., L. L. Lee, and K. E. Starling; Ing. Eng. Chem.
Fundam., 23: 3 ()1984).
Name | Description |
---|---|
T | Temperature [K] |
Tc[:] | Critical temperatures [K] |
Vcrit[:] | Critical volumes (m3/mol) [m3/mol] |
w[:] | Acentric factors |
mu[:] | Dipole moments (debyes) |
MolecularWeights[:] | Molecular weights (kg/mol) [kg/mol] |
y[:] | Molar Fractions [mol/mol] |
kappa[:] | Association Factors |
Name | Description |
---|---|
etaMixture | Mixture viscosity (Pa.s) [Pa.s] |
This function applies the Masson and Saxena modification of the Wassiljewa Equation for the thermal conductivity for gas mixtures of n elements at low pressure.
For nonpolar gas mixtures errors will generally be less than 3 to 4%. For mixtures of nonpolar-polar and polar-polar gases, errors greater than 5 to 8% may be expected. For mixtures in which the sizes and polarities of the constituent molecules are not greatly different, the thermal conductivity can be estimated satisfactorily by a mole fraction average of the pure component conductivities.
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
y[:] | Mole fraction of the components in the gas mixture [mol/mol] |
T | Temperature [K] |
Tc[:] | Critical temperatures [K] |
Pc[:] | Critical pressures [Pa] |
M[:] | Molecular weights [kg/mol] |
lambda[:] | Thermal conductivities of the pure gases [W/(m.K)] |
Name | Description |
---|---|
lambdam | Thermal conductivity of the gas mixture [W/(m.K)] |
Name | Description |
---|---|
method | Method to compute single component thermal conductivity |
state | Thermodynamic state record |
Name | Description |
---|---|
lambda | Thermal conductivity [W/(m.K)] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
beta | Isobaric expansion coefficient [1/K] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
kappa | Isothermal compressibility [1/Pa] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
ddpT | Density derivative w.r.t. pressure [s2/m2] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
ddTp | Density derivative w.r.t. temperature [kg/(m3.K)] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
dddX[nX] | Derivative of density w.r.t. mass fraction [kg/m3] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
MM | Mixture molar mass [kg/mol] |
Name | Description |
---|---|
h | Specific enthalpy [J/kg] |
X[:] | Mass fractions of composition [kg/kg] |
exclEnthForm | If true, enthalpy of formation Hf is not included in specific enthalpy h |
refChoice | Choice of reference enthalpy |
h_off | User defined offset for reference enthalpy, if referenceChoice = UserDefined [J/kg] |
Name | Description |
---|---|
T | Temperature [K] |
Name | Description |
---|---|
p | Pressure [Pa] |
s | Specific entropy [J/(kg.K)] |
X[:] | Mass fractions of composition [kg/kg] |
Name | Description |
---|---|
T | Temperature [K] |