libICEpost.src.thermophysicalModels.specie.thermo.Thermo

Submodules

Classes

Thermo

Base class for computation of thermodynamic properties of chemical specie (cp, cv, ...)

janaf7

Class for computation of thermophysical properties with NASA (janaf) 7-coefficient polynomials.

constantCp

Class for computation of thermophysical properties with constant cp.

Package Contents

class libICEpost.src.thermophysicalModels.specie.thermo.Thermo.Thermo(Rgas: float)[source]

Bases: libICEpost.src.base.BaseClass.BaseClass

Base class for computation of thermodynamic properties of chemical specie (cp, cv, …)

Note

-> For interal energy-based models, need to implement us (sensible) -> For entalpy-based models, need to implement ha (absolute)


Rgas

float The mass specific gas constant

Rgas
__str__()[source]
abstractmethod cp(p: float, T: float) float[source]

Constant pressure heat capacity [J/kg/K]

abstractmethod hf() float[source]

Enthalpy of formation [J/kg]

ha(p: float, T: float) float[source]

Absolute enthalpy [J/kg]

ua(p: float, T: float) float[source]

Absolute internal energy [J/kg]

us = ua + hf

us(p: float, T: float) float[source]

Sensible internal energy [J/kg]

hs(p: float, T: float) float[source]

Sensible enthalpy [J/kg]

hs = ha - hf

abstractmethod dcpdT(p: float, T: float) float[source]

dcp/dT [J/kg/K^2]

class libICEpost.src.thermophysicalModels.specie.thermo.Thermo.janaf7(Rgas: float, cpLow: Iterable[float], cpHigh: Iterable[float], Tth: float, Tlow: float, Thigh: float)[source]

Bases: libICEpost.src.thermophysicalModels.specie.thermo.Thermo.Thermo.Thermo

Class for computation of thermophysical properties with NASA (janaf) 7-coefficient polynomials.

cp(T) = sum_{i=0,4} ( a_{i} * T^i ) ha(T) = sum_{i=0,4} ( a_{i}/(i + 1) * T^i )*T + a_{5} s(T) = sum_{i=0,4} ( a_{i}/(i + 1) * T^i ) + a_{5} * ln(T) + a_{6}

Attibutes:
  • Rgas (float): The mass specific gas constant.

  • cpLow (Iterable[float]): List of polynomial coefficients to compute cp of the specie in the range of temperature below Tth.

  • cpHigh (Iterable[float]): List of polynomial coefficients to compute cp of the specie in the range of temperature above Tth.

  • Tth (float): Threshold temperature to change polynomial coefficient to be used to compute the cp of the specie.

  • Tlow (float): Lower limit of the range of validity of the polynomial coefficients for computation of cp.

  • Thigh (float): Higher limit of the range of validity of the polynomial coefficients for computation of cp.

__WARNING__: bool = True

If True, a warning is displayed when the temperature is outside of the range of validity.

numCoeffs: int = 7

Number of coefficients

_cpLow: list[float]

Low-temperature coefficients

_cpHigh: list[float]

High-temperature coefficients

_Tlow: float

Lower-limit of validity

_Thigh: float

Higher-limit of validity

_Tth: float

Threshold temperature for changing between low-T and high-T coefficients

property cpLow: list[float]

Low-temperature coefficients

property cpHigh: list[float]

High-temperature coefficients

property Tlow: float

Lower-limit of validity

property Thigh: float

Higher-limit of validity

property Tth: float

Threshold temperature for changing between low-T and high-T coefficients

copy()[source]

Create a copy with the same coefficients.

Returns:

The copied object.

Return type:

janaf7

__str__()[source]
__repr__()[source]
coeffs(T: float) Iterable[float][source]

Get coefficients, depending on temperature range. - If T < Tth, returns cpLow - If T >= Tth, returns cpHigh

Parameters:

T (float) – Temperature [K].

Returns:

The coefficients to be used for the computation of cp.

Return type:

Iterable[float]

cp(p: float, T: float) float[source]

Constant pressure heat capacity [J/kg/K]. If the temperature is not within Tlow and Thigh, and janaf7.__WARNING__ is True a warning is displayed.

cp(T) = sum_{i=0,4} ( a_{i} * T^i )

ha(p: float, T: float) float[source]

Absolute enthalpy [J/kg] If the temperature is not within Tlow and Thigh, a warning is displayed.

ha(T) = sum_{i=0,4} ( a_{i}/(i + 1) * T^i )*T + a_{5}

hf() float[source]

Enthalpy of formation [J/kg]

hf = ha(Tstd)

dcpdT(p: float, T: float) float[source]

dcp/dT [J/kg/K^2] If the temperature is not within Tlow and Thigh, a warning is displayed.

dcp/dT(T) = sum_{i=1,4}(i * a_{i} * T^(i - 1))

classmethod fromDictionary(dictionary)[source]
Create from dictionary with the following entries:
  • Rgas (float): The mass specific gas constant.

  • cpLow (Iterable[float]): List of polynomial coefficients to compute cp of the specie in the range of temperature below Tth.

  • cpHigh (Iterable[float]): List of polynomial coefficients to compute cp of the specie in the range of temperature above Tth.

  • Tth (float): Threshold temperature to change polynomial coefficient to be used to compute the cp of the specie.

  • Tlow (float): Lower limit of the range of validity of the polynomial coefficients for computation of cp.

  • Thigh (float): Higher limit of the range of validity of the polynomial coefficients for computation of cp.

Parameters:

dictionary (dict) – Dictionary for construction.

Returns:

The constructed object.

Return type:

janaf7

class libICEpost.src.thermophysicalModels.specie.thermo.Thermo.constantCp(Rgas, cp, hf=float('nan'))[source]

Bases: libICEpost.src.thermophysicalModels.specie.thermo.Thermo.Thermo.Thermo

Class for computation of thermophysical properties with constant cp.

Attibutes:
  • Rgas (float): The mass specific gas constant

classmethod fromDictionary(dictionary)[source]

Construct from dictionary containing the following keys: - Rgas (float): The mass specific gas constant - cp (float): Constant pressure heat capacity [J/kg/K] - hf (float): Enthalpy of formation [J/kg] (Optional)

Parameters:

dictionary (dict) – The dictionary containing the data

_cp
_hf
__str__()[source]
__repr__()[source]
cp(p: float, T: float) float[source]

Constant pressure heat capacity [J/kg/K]

ha(p: float, T: float) float[source]

Absolute enthalpy [J/kg]

ha(T) = cp * (T - Tstd) + hf

hf() float[source]

Enthalpy of formation [J/kg]

hf = ha(Tstd)

dcpdT(p: float, T: float) float[source]

dcp/dT [J/kg/K^2]