WOLFRAM SYSTEM MODELER

MixtureGasNasa

Medium model of a mixture of ideal gases based on NASA source

Package Contents

ThermodynamicState

Thermodynamic state variables

BaseProperties

Base properties (p, d, T, h, u, R_s, 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

specificEntropyOfpTX Protected

Return specific entropy from pressure, temperature and mass fractions

Package Constants (27)

ThermoStates

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

Type: IndependentVariables

Description: Enumeration type for independent variables

mediumName

Value: "unusablePartialMedium"

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: false

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: false

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

fluidConstants

Value: redeclare replaceable record FluidConstants = Modelica.Media.Interfaces.Types.IdealGas.FluidConstants

Type: FluidConstants[nS]

Description: Constant data for the fluid

data

Value:

Type: DataRecord[:]

Description: Data records of ideal gas substances

excludeEnthalpyOfFormation

Value: true

Type: Boolean

Description: If true, enthalpy of formation Hf is not included in specific enthalpy h

referenceChoice

Value: ReferenceEnthalpy.ZeroAt0K

Type: ReferenceEnthalpy

Description: Choice of reference enthalpy

h_offset

Value: 0.0

Type: SpecificEnthalpy (J/kg)

Description: User defined offset for reference enthalpy, if referenceChoice = UserDefined

MMX

Value: data[:].MM

Type: MolarMass[nX] (kg/mol)

Description: Molar masses of components

methodForThermalConductivity

Value: 1

Type: Integer

Information

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

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.

Wolfram Language

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

Extended by (5)

SimpleNaturalGas

Modelica.Media.IdealGases.MixtureGases

Simple natural gas mix with 6 components

FlueGasSixComponents

Modelica.Media.IdealGases.MixtureGases

Simplest flue gas for over-and understochiometric combustion of hydrocarbons

FlueGasLambdaOnePlus

Modelica.Media.IdealGases.MixtureGases

Simple flue gas for overstochiometric O2-fuel ratios

AirSteam

Modelica.Media.IdealGases.MixtureGases

Air and steam mixture (no condensation!, pseudo-mixture)

CombustionAir

Modelica.Media.IdealGases.MixtureGases

Air as mixture of N2 and O2