packageSingleGasNasa
Extends from ThermalSeparation.Media.IdealGasMixtures.BaseClasses.PartialPureSubstance (base class for pure substances of one chemical substance).
Information
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.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| String | mediumName (from PartialMediumPure) | "unusablePartialMedium" | Name of the medium |
| String[:] | substanceNames (from PartialMediumPure) | {mediumName} | Names of the mixture substances. Set substanceNames={mediumName} if only one substance. |
| String[:] | extraPropertiesNames (from PartialMediumPure) | fill("", 0) | Names of the additional (extra) transported properties. Set extraPropertiesNames=fill("",0) if unused |
| Boolean | singleState (from PartialMediumPure) | = true, if u and d are not a function of pressure | |
| Boolean | reducedX (from PartialMediumPure) | true | = true if medium contains the equation sum(X) = 1.0; set reducedX=true if only one substance (see docu for details) |
| Boolean | fixedX (from PartialMediumPure) | false | = true if medium contains the equation X = reference_X |
| AbsolutePressure | reference_p (from PartialMediumPure) | 101325 | Reference pressure of Medium: default 1 atmosphere |
| Temperature | reference_T (from PartialMediumPure) | 298.15 | Reference temperature of Medium: default 25 deg Celsius |
| MassFraction[nX] | reference_X (from PartialMediumPure) | if nX == 0 then fill(0, nX) else fill(1/nX, nX) | Default mass fractions of medium |
| AbsolutePressure | p_default (from PartialMediumPure) | 101325 | Default value for pressure of medium (for initialization) |
| Temperature | T_default (from PartialMediumPure) | Modelica.Units.Conversions.from_degC(20) | Default value for temperature of medium (for initialization) |
| SpecificEnthalpy | h_default (from PartialMediumPure) | specificEnthalpy_pTX(p_default, T_default, X_default) | Default value for specific enthalpy of medium (for initialization) |
| MassFraction[nX] | X_default (from PartialMediumPure) | reference_X | Default value for mass fractions of medium (for initialization) |
| Integer | nS (from PartialMediumPure) | size(substanceNames, 1) | Number of substances |
| Integer | nX (from PartialMediumPure) | if nS == 1 then 0 else nS | Number of mass fractions (= 0, if only one substance) |
| Integer | nXi (from PartialMediumPure) | if fixedX then 0 else if reducedX then nS - 1 else nX | Number of structurally independent mass fractions (see docu for details) |
| Integer | nC (from PartialMediumPure) | size(extraPropertiesNames, 1) | Number of extra (outside of standard mass-balance) transported properties |
| Boolean | excludeEnthalpyOfFormation | true | If true, enthalpy of formation Hf is not included in specific enthalpy h |
| ReferenceEnthalpy.Temp | referenceChoice | Choices.ReferenceEnthalpy.ZeroAt0K | Choice of reference enthalpy |
| SpecificEnthalpy | h_offset | 0.0 | User defined offset for reference enthalpy, if referenceChoice = UserDefined |
| ThermalSeparation.Media.IdealGasMixtures.BaseClasses.Common.DataRecord | data | Data record of ideal gas substance | |
| FluidConstants | fluidConstants | constant data for the fluid |
Contents
| Name | Description |
|---|---|
| thermodynamic state variables for ideal gases | |
| Extended fluid constants | |
| Base properties of ideal gas medium | |
| Return thermodynamic state as function of p, T and composition X | |
| Return thermodynamic state as function of p, h and composition X | |
| Return thermodynamic state as function of p, s and composition X | |
| Return thermodynamic state as function of d, T and composition X | |
| return pressure of ideal gas | |
| return temperature of ideal gas | |
| return density of ideal gas | |
| Return specific enthalpy | |
| Return specific internal energy | |
| Return specific entropy | |
| Return specific Gibbs energy | |
| Return specific Helmholtz energy | |
| Return specific heat capacity at constant pressure | |
| Compute specific heat capacity at constant volume from temperature and gas data | |
| Return isentropic exponent | |
| Return velocity of sound | |
| approximate method of calculating h_is from upstream properties and downstream pressure | |
| Return isentropic enthalpy | |
| Returns overall the isobaric expansion coefficient beta | |
| Returns overall the isothermal compressibility factor | |
| Returns the partial derivative of density with respect to pressure at constant temperature | |
| Returns the partial derivative of density with respect to temperature at constant pressure | |
| Returns the partial derivative of density with respect to mass fractions at constant pressure and temperature | |
| Compute specific heat capacity at constant pressure from temperature and gas data | |
| Compute specific heat capacity at constant pressure, low T region | |
| Compute specific heat capacity at constant pressure, low T region | |
| Compute specific enthalpy from temperature and gas data; reference is decided by the refChoice input, or by the referenceChoice package constant by default | |
| derivative function for h_T | |
| Compute specific enthalpy, low T region; reference is decided by the refChoice input, or by the referenceChoice package constant by default | |
| Compute specific enthalpy, low T region; reference is decided by the refChoice input, or by the referenceChoice package constant by default | |
| Compute specific entropy from temperature and gas data | |
| Compute specific entropy, low T region | |
| Dynamic viscosity of low pressure gases | |
| dynamic viscosity | |
| Thermal conductivity of polyatomic gases(Eucken and Modified Eucken correlation) | |
| thermal conductivity of gas | |
| return the molar mass of the medium | |
| T_h | Compute temperature from specific enthalpy |
| T_ps | Compute temperature from pressure and specific entropy |