WOLFRAM SYSTEM MODELER

SingleGasNasa

Medium model of an ideal gas based on NASA source

Package Contents

ThermodynamicState

Thermodynamic state variables for ideal gases

BaseProperties

Base properties of ideal gas medium

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

specificHeatCapacityCp

Return specific heat capacity at constant pressure

specificHeatCapacityCv

Compute specific heat capacity at constant volume from temperature and gas data

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

isobaricExpansionCoefficient

Returns overall the isobaric expansion coefficient beta

isothermalCompressibility

Returns overall the isothermal compressibility factor

density_derp_T

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

density_derT_p

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

density_derX

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

dynamicViscosity

Dynamic viscosity

thermalConductivity

Thermal conductivity of gas

molarMass

Return the molar mass of the medium

T_h

Compute temperature from specific enthalpy

T_ps

Compute temperature from pressure and specific entropy

dynamicViscosityLowPressure

Dynamic viscosity of low pressure gases

thermalConductivityEstimate

Thermal conductivity of polyatomic gases(Eucken and Modified Eucken correlation)

Package Constants (22)

ThermoStates

Value: Modelica.Media.Interfaces.Choices.IndependentVariables.pT

Type: IndependentVariables

Description: Enumeration type for independent variables

mediumName

Value: data.name

Type: String

Description: Name of the medium

substanceNames

Value: {data.name}

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

data

Value:

Type: DataRecord

Description: Data record of ideal gas substance

fluidConstants

Value:

Type: FluidConstants[nS]

Description: Constant data for the fluid

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

This model calculates medium properties for an ideal gas of a single substance, or for an ideal gas consisting of several substances where the mass fractions are fixed. Independent variables are temperature T and pressure p. Only density is a function of T and p. All other quantities are solely a function of T. The properties are valid in the range:

200 K ≤ T ≤ 6000 K

The following quantities are always computed:

Variable Unit Description
h J/kg specific enthalpy h = h(T)
u J/kg specific internal energy u = u(T)
d kg/m^3 density d = d(p,T)

For the other variables, see the functions in Modelica.Media.IdealGases.Common.SingleGasNasa. Note, dynamic viscosity and thermal conductivity are only provided for gases that use a data record from Modelica.Media.IdealGases.FluidData. Currently these are the following gases:

Ar
C2H2_vinylidene
C2H4
C2H5OH
C2H6
C3H6_propylene
C3H7OH
C3H8
C4H8_1_butene
C4H9OH
C4H10_n_butane
C5H10_1_pentene
C5H12_n_pentane
C6H6
C6H12_1_hexene
C6H14_n_heptane
C7H14_1_heptene
C8H10_ethylbenz
CH3OH
CH4
CL2
CO
CO2
F2
H2
H2O
He
N2
N2O
NH3
NO
O2
SO2
SO3

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 200K and 6000K. A few of the data sets for monatomic gases have a discontinuous 1st derivative at 1000K, but this never caused problems so far.

This model has been copied from the ThermoFluid library and adapted to the Modelica.Media package.

Wolfram Language

In[1]:=
SystemModel["Modelica.Media.IdealGases.Common.SingleGasNasa"]
Out[1]:=

Extended by (38)

SO3

Modelica.Media.IdealGases.SingleGases

Ideal gas "SO3" from NASA Glenn coefficients

SO2

Modelica.Media.IdealGases.SingleGases

Ideal gas "SO2" from NASA Glenn coefficients

O2

Modelica.Media.IdealGases.SingleGases

Ideal gas "O2" from NASA Glenn coefficients

Ne

Modelica.Media.IdealGases.SingleGases

Ideal gas "Ne" from NASA Glenn coefficients

N2O

Modelica.Media.IdealGases.SingleGases

Ideal gas "N2O" from NASA Glenn coefficients

N2

Modelica.Media.IdealGases.SingleGases

Ideal gas "N2" from NASA Glenn coefficients

NO2

Modelica.Media.IdealGases.SingleGases

Ideal gas "NO2" from NASA Glenn coefficients

NO

Modelica.Media.IdealGases.SingleGases

Ideal gas "NO" from NASA Glenn coefficients

NH3

Modelica.Media.IdealGases.SingleGases

Ideal gas "NH3" from NASA Glenn coefficients

He

Modelica.Media.IdealGases.SingleGases

Ideal gas "He" from NASA Glenn coefficients

H2O

Modelica.Media.IdealGases.SingleGases

Ideal gas "H2O" from NASA Glenn coefficients

H2

Modelica.Media.IdealGases.SingleGases

Ideal gas "H2" from NASA Glenn coefficients

F2

Modelica.Media.IdealGases.SingleGases

Ideal gas "F2" from NASA Glenn coefficients

CL2

Modelica.Media.IdealGases.SingleGases

Ideal gas "Cl2" from NASA Glenn coefficients

C8H18_n_octane

Modelica.Media.IdealGases.SingleGases

Ideal gas "C8H18_n_octane" from NASA Glenn coefficients

C8H10_ethylbenz

Modelica.Media.IdealGases.SingleGases

Ideal gas "C8H10_ethylbenz" from NASA Glenn coefficients

C7H16_n_heptane

Modelica.Media.IdealGases.SingleGases

Ideal gas "C7H16_n_heptane" from NASA Glenn coefficients

C7H14_1_heptene

Modelica.Media.IdealGases.SingleGases

Ideal gas "C7H14_1_heptene" from NASA Glenn coefficients

C6H14_n_hexane

Modelica.Media.IdealGases.SingleGases

Ideal gas "C6H14_n_hexane" from NASA Glenn coefficients

C6H12_1_hexene

Modelica.Media.IdealGases.SingleGases

Ideal gas "C6H12_1_hexene" from NASA Glenn coefficients

C6H6

Modelica.Media.IdealGases.SingleGases

Ideal gas "C6H6" from NASA Glenn coefficients

C5H12_n_pentane

Modelica.Media.IdealGases.SingleGases

Ideal gas "C5H12_n_pentane" from NASA Glenn coefficients

C5H10_1_pentene

Modelica.Media.IdealGases.SingleGases

Ideal gas "C5H10_1_pentene" from NASA Glenn coefficients

C4H10_n_butane

Modelica.Media.IdealGases.SingleGases

Ideal gas "C4H10_n_butane" from NASA Glenn coefficients

C4H8_1_butene

Modelica.Media.IdealGases.SingleGases

Ideal gas "C4H8_1_butene" from NASA Glenn coefficients

C3H8O_1propanol

Modelica.Media.IdealGases.SingleGases

Ideal gas "C3H8O_1propanol" from NASA Glenn coefficients

C3H8

Modelica.Media.IdealGases.SingleGases

Ideal gas "C3H8" from NASA Glenn coefficients

C3H6_propylene

Modelica.Media.IdealGases.SingleGases

Ideal gas "C3H6_propylene" from NASA Glenn coefficients

C2H6

Modelica.Media.IdealGases.SingleGases

Ideal gas "C2H6" from NASA Glenn coefficients

C2H5OH

Modelica.Media.IdealGases.SingleGases

Ideal gas "C2H5OH" from NASA Glenn coefficients

C2H4

Modelica.Media.IdealGases.SingleGases

Ideal gas "C2H4" from NASA Glenn coefficients

C2H2_vinylidene

Modelica.Media.IdealGases.SingleGases

Ideal gas "C2H2_vinylidene" from NASA Glenn coefficients

CO2

Modelica.Media.IdealGases.SingleGases

Ideal gas "CO2" from NASA Glenn coefficients

CO

Modelica.Media.IdealGases.SingleGases

Ideal gas "CO" from NASA Glenn coefficients

CH3OH

Modelica.Media.IdealGases.SingleGases

Ideal gas "CH3OH" from NASA Glenn coefficients

CH4

Modelica.Media.IdealGases.SingleGases

Ideal gas "CH4" from NASA Glenn coefficients

Ar

Modelica.Media.IdealGases.SingleGases

Ideal gas "Ar" from NASA Glenn coefficients

DryAirNasa

Modelica.Media.Air

Air: Detailed dry air model as ideal gas (200..6000 K)