FCSys.Characteristics.BaseClasses.CharacteristicNASA

Thermodynamic package with diffusive properties based on NASA CEA

Information

The correlations for transport properties are available in [McBride1996, McBride2002]. For more information, please see the Characteristic package.

Extends from Characteristic (Package of thermodynamic and diffusive properties).

Package Content

NameDescription
T_lim_eta_theta={0,Modelica.Constants.inf}Temperature limits for the rows of bη and bθ (Tlim η θ)
b_etaCorrelation constants for fluidity (bη)
b_thetaCorrelation constants for thermal resistivity (bθ)
FCSys.Characteristics.BaseClasses.CharacteristicNASA.fromNASAViscosity fromNASAViscosity Return constants for fluidity given NASA CEA constants for viscosity
FCSys.Characteristics.BaseClasses.CharacteristicNASA.fromNASAThermalConductivity fromNASAThermalConductivity Return constants for thermal resistivity given NASA CEA constants for thermal conductivity
FCSys.Characteristics.BaseClasses.CharacteristicNASA.eta eta Fluidity (η) as a function of temperature
FCSys.Characteristics.BaseClasses.CharacteristicNASA.theta theta Thermal resistivity (θ) as a function of temperature
Inherited
formulaChemical formula
phaseMaterial phase
mSpecific mass
dSpecific diameter
z=charge(formula)Charge number
referenceEnthalpy=ReferenceEnthalpy.enthalpyOfFormationAt25degCChoice of enthalpy reference
Deltah0_fEnthalpy of formation at 298.15 K, pohof)
Deltah0ho(298.15 K) - ho(0 K) (Δho)
h_offset=0Additional enthalpy offset (hoffset)
n_c=-2Power of T for 1st column of bc (nc)
T_lim_c={0,Modelica.Constants.inf}Temperature limits for the rows of bc and Bc (Tlim c)
b_cCoefficients of isobaric specific heat capacity at po as a polynomial in T (bc)
B_cIntegration constants for specific enthalpy and entropy (Bc)
alpha=1.5*U.pi^1.5*d^2*U.qScaled specific intercept area
FCSys.Characteristics.BaseClasses.Characteristic.omega omega Root mean square of thermal velocity in one dimension as a function of temperature (ω = √ T/m )
FCSys.Characteristics.BaseClasses.Characteristic.c_p c_p Isobaric specific heat capacity (cp) as a function of temperature and pressure
FCSys.Characteristics.BaseClasses.Characteristic.c_v c_v Isochoric specific heat capacity (cv) as a function of temperature and pressure
FCSys.Characteristics.BaseClasses.Characteristic.D D Diffusivity as a function of temperature and specific volume
FCSys.Characteristics.BaseClasses.Characteristic.g g Gibbs potential as a function of temperature and pressure
FCSys.Characteristics.BaseClasses.Characteristic.h h Specific enthalpy as a function of temperature and pressure
FCSys.Characteristics.BaseClasses.Characteristic.s s Specific entropy as a function of temperature and pressure
FCSys.Characteristics.BaseClasses.Characteristic.zeta zeta ** (ζ) as a function of temperature
FCSys.Characteristics.BaseClasses.Characteristic.tauprime tauprime Phase change interval (τ′) as a function of temperature and specific volume
FCSys.Characteristics.BaseClasses.Characteristic.mu mu Mobility (μ) as a function of temperature and specific volume
FCSys.Characteristics.BaseClasses.Characteristic.nu nu Thermal independity (ν) as a function of temperature and specific volume
p0=U.barReference pressure (po)
n_v={-1,0}Powers of p/T and T for 1st row and column of bv (nv)
b_v=[1]Coefficients for specific volume as a polynomial in p/T and T (bv)
isCompressible=anyTrue({anyTrue({abs(b_v[i, j]) > Modelica.Constants.small and n_v[1] + i - 1 <> 0 for i in 1:size(b_v, 1)}) for j in 1:size(b_v, 2)})true, if density depends on pressure
hasThermalExpansion=anyTrue({anyTrue({abs(b_v[i, j]) > Modelica.Constants.small and n_v[2] + j - n_v[1] - i <> 0 for i in 1:size(b_v, 1)}) for j in 1:size(b_v, 2)})true, if density depends on temperature
n_p={n_v[1] - size(b_v, 1) + 1,n_v[2] + 1}Powers of v and T for 1st row and column of bp
b_p=if size(b_v, 1) == 1 then b_v .^ (-n_p[1]) else {(if n_v[1] + i == 0 or n_v[1] + i == 1 or size(b_v, 1) == 1 then b_v[i, :] else (if n_v[1] + i == 2 and n_v[1] <= 0 then b_v[i, :] + b_v[i - 1, :] .^ 2 else (if n_v[1] + i == 3 and n_v[1] <= 0 then b_v[i, :] + b_v[i - 2, :] .* (b_v[i - 2, :] .^ 2 + 3*b_v[i - 1, :]) else zeros(size(b_v, 2))))) for i in size(b_v, 1):-1:1}Coefficients of p as a polynomial in v and T
FCSys.Characteristics.BaseClasses.CharacteristicEOS.dp_Tv dp_Tv Derivative of pressure as defined by pT v()
FCSys.Characteristics.BaseClasses.CharacteristicEOS.dv_Tp dv_Tp Derivative of specific volume as defined by vT p()
FCSys.Characteristics.BaseClasses.CharacteristicEOS.p_Tv p_Tv Pressure as a function of temperature and specific volume (pT v())
FCSys.Characteristics.BaseClasses.CharacteristicEOS.v_Tp v_Tp Specific volume as a function of temperature and pressure (vT p())
FCSys.Characteristics.BaseClasses.CharacteristicEOS.beta beta Isothermal compressibility as a function of temperature and pressure (β)

Types and constants

constant Q.TemperatureAbsolute T_lim_eta_theta[:]={0,Modelica.Constants.inf} 
  "Temperature limits for the rows of bη and bθ (Tlim η θ)";
constant Real b_eta[size(T_lim_eta_theta, 1) - 1, 4] 
  "Correlation constants for fluidity (bη)";
constant Real b_theta[size(T_lim_eta_theta, 1) - 1, 4] 
  "Correlation constants for thermal resistivity (bθ)";

FCSys.Characteristics.BaseClasses.CharacteristicNASA.fromNASAViscosity FCSys.Characteristics.BaseClasses.CharacteristicNASA.fromNASAViscosity

Return constants for fluidity given NASA CEA constants for viscosity

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
Realb[4] NASA CEA constants for viscosity

Outputs

TypeNameDescription
Realb_eta[4]Constants for fluidity

Modelica definition

function fromNASAViscosity 
  "Return constants for fluidity given NASA CEA constants for viscosity"
  extends Modelica.Icons.Function;

  input Real b[4] "NASA CEA constants for viscosity";
  output Real b_eta[4] "Constants for fluidity";

algorithm 
  b_eta := {-b[1],-b[2]*U.K,-b[3]*U.K^2,-b[4] + b[1]*log(U.K) + log(1e4*U.m*U.s/
    U.g)};
end fromNASAViscosity;

FCSys.Characteristics.BaseClasses.CharacteristicNASA.fromNASAThermalConductivity FCSys.Characteristics.BaseClasses.CharacteristicNASA.fromNASAThermalConductivity

Return constants for thermal resistivity given NASA CEA constants for thermal conductivity

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
Realb[4] NASA CEA constants for thermal conductivity

Outputs

TypeNameDescription
Realb_theta[4]Constants for thermal resistivity

Modelica definition

function fromNASAThermalConductivity 
  "Return constants for thermal resistivity given NASA CEA constants for thermal conductivity"
  extends Modelica.Icons.Function;

  input Real b[4] "NASA CEA constants for thermal conductivity";
  output Real b_theta[4] "Constants for thermal resistivity";

algorithm 
  b_theta := {-b[1],-b[2]*U.K,-b[3]*U.K^2,-b[4] + b[1]*log(U.K) + log(1e4*U.m*U.K
    /U.W)};
end fromNASAThermalConductivity;

FCSys.Characteristics.BaseClasses.CharacteristicNASA.eta FCSys.Characteristics.BaseClasses.CharacteristicNASA.eta

Fluidity (η) as a function of temperature

Information

This function is based on based on NASA CEA [McBride1996, Svehla1995]

Although specific volume is an input to this function, the result is independent of specific volume.

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
TemperatureAbsoluteT298.15*U.KTemperature [L2.M/(N.T2)]
VolumeSpecificv298.15*U.K/U.atmSpecific volume [L3/N]

Outputs

TypeNameDescription
ResistivityetaFluidity [L.T/N]

Modelica definition

redeclare function eta 
  "Fluidity (η) as a function of temperature"

  extends Modelica.Icons.Function;
  input Q.TemperatureAbsolute T=298.15*U.K "Temperature";
  input Q.VolumeSpecific v=298.15*U.K/U.atm "Specific volume";
  // Note:  Specific volume isn't used here but is included for generality.
  output Q.Resistivity eta "Fluidity";

algorithm 
  /*
    assert(T_lim_eta_theta[1] <= T and T <= T_lim_eta_theta[end], "Temperature "
     + String(T/(U.K)) + " K is out of range for the resistivities ([" +
    String(T_lim_eta_theta[1]/U.K) + ", " + String(T_lim_eta_theta[end]
    /U.K) + "] K).");
  */
  // Note:  This is commented out so that the function can be inlined.
  eta := smooth(0, exp(sum(if (T_lim_eta_theta[i] <= T or i == 1) and (T <
    T_lim_eta_theta[i + 1] or i == size(T_lim_eta_theta, 1) - 1) then b_eta[i, 1]
    *log(T) + (b_eta[i, 2] + b_eta[i, 3]/T)/T + b_eta[i, 4] else 0 for i in 1:
    size(T_lim_eta_theta, 1) - 1)));
end eta;

FCSys.Characteristics.BaseClasses.CharacteristicNASA.theta FCSys.Characteristics.BaseClasses.CharacteristicNASA.theta

Thermal resistivity (θ) as a function of temperature

Information

This function is based on based on NASA CEA [McBride1996, Svehla1995]

Although specific volume is an input to this function, the result is independent of specific volume.

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
TemperatureAbsoluteT298.15*U.KTemperature [L2.M/(N.T2)]
VolumeSpecificv298.15*U.K/U.atmSpecific volume [L3/N]

Outputs

TypeNameDescription
ResistivityThermalthetaThermal resistivity [L.T/N]

Modelica definition

redeclare function theta 
  "Thermal resistivity (θ) as a function of temperature"

  extends Modelica.Icons.Function;
  input Q.TemperatureAbsolute T=298.15*U.K "Temperature";
  input Q.VolumeSpecific v=298.15*U.K/U.atm "Specific volume";
  // Note:  Specific volume isn't used here but is included for generality.
  output Q.ResistivityThermal theta "Thermal resistivity";

algorithm 
  /*
    assert(T_lim_eta_theta[1] <= T and T <= T_lim_eta_theta[end], "Temperature "
     + String(T/(U.K)) + " K is out of range for the resistivities ([" +
    String(T_lim_eta_theta[1]/U.K) + ", " + String(T_lim_eta_theta[end]
    /U.K) + "] K).");
  */
  // Note:  This is commented out so that the function can be inlined.
  theta := smooth(0, exp(sum(if (T_lim_eta_theta[i] <= T or i == 1) and (T <
    T_lim_eta_theta[i + 1] or i == size(T_lim_eta_theta, 1) - 1) then b_theta[i,
    1]*log(T) + (b_theta[i, 2] + b_theta[i, 3]/T)/T + b_theta[i, 4] else 0 for 
    i in 1:size(T_lim_eta_theta, 1) - 1)));
end theta;