libICEpost.src.thermophysicalModels.specie.thermo.Thermo ======================================================== .. py:module:: libICEpost.src.thermophysicalModels.specie.thermo.Thermo Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/libICEpost/src/thermophysicalModels/specie/thermo/Thermo/Thermo/index /autoapi/libICEpost/src/thermophysicalModels/specie/thermo/Thermo/constantCp/index /autoapi/libICEpost/src/thermophysicalModels/specie/thermo/Thermo/janaf7/index Classes ------- .. autoapisummary:: libICEpost.src.thermophysicalModels.specie.thermo.Thermo.Thermo libICEpost.src.thermophysicalModels.specie.thermo.Thermo.janaf7 libICEpost.src.thermophysicalModels.specie.thermo.Thermo.constantCp Package Contents ---------------- .. py:class:: Thermo(Rgas: float) Bases: :py:obj:`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) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. attribute:: Rgas float The mass specific gas constant .. py:attribute:: Rgas .. py:method:: __str__() .. py:method:: cp(p: float, T: float) -> float :abstractmethod: Constant pressure heat capacity [J/kg/K] .. py:method:: hf() -> float :abstractmethod: Enthalpy of formation [J/kg] .. py:method:: ha(p: float, T: float) -> float Absolute enthalpy [J/kg] .. py:method:: ua(p: float, T: float) -> float Absolute internal energy [J/kg] us = ua + hf .. py:method:: us(p: float, T: float) -> float Sensible internal energy [J/kg] .. py:method:: hs(p: float, T: float) -> float Sensible enthalpy [J/kg] hs = ha - hf .. py:method:: dcpdT(p: float, T: float) -> float :abstractmethod: dcp/dT [J/kg/K^2] .. py:class:: janaf7(Rgas: float, cpLow: Iterable[float], cpHigh: Iterable[float], Tth: float, Tlow: float, Thigh: float) Bases: :py:obj:`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. .. py:attribute:: __WARNING__ :type: bool :value: True If True, a warning is displayed when the temperature is outside of the range of validity. .. py:attribute:: numCoeffs :type: int :value: 7 Number of coefficients .. py:attribute:: _cpLow :type: list[float] Low-temperature coefficients .. py:attribute:: _cpHigh :type: list[float] High-temperature coefficients .. py:attribute:: _Tlow :type: float Lower-limit of validity .. py:attribute:: _Thigh :type: float Higher-limit of validity .. py:attribute:: _Tth :type: float Threshold temperature for changing between low-T and high-T coefficients .. py:property:: cpLow :type: list[float] Low-temperature coefficients .. py:property:: cpHigh :type: list[float] High-temperature coefficients .. py:property:: Tlow :type: float Lower-limit of validity .. py:property:: Thigh :type: float Higher-limit of validity .. py:property:: Tth :type: float Threshold temperature for changing between low-T and high-T coefficients .. py:method:: copy() Create a copy with the same coefficients. :returns: The copied object. :rtype: janaf7 .. py:method:: __str__() .. py:method:: __repr__() .. py:method:: coeffs(T: float) -> Iterable[float] Get coefficients, depending on temperature range. - If T < Tth, returns cpLow - If T >= Tth, returns cpHigh :param T: Temperature [K]. :type T: float :returns: The coefficients to be used for the computation of cp. :rtype: Iterable[float] .. py:method:: cp(p: float, T: float) -> float 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 ) .. py:method:: ha(p: float, T: float) -> float 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} .. py:method:: hf() -> float Enthalpy of formation [J/kg] hf = ha(Tstd) .. py:method:: dcpdT(p: float, T: float) -> float 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)) .. py:method:: fromDictionary(dictionary) :classmethod: 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. :param dictionary: Dictionary for construction. :type dictionary: dict :returns: The constructed object. :rtype: janaf7 .. py:class:: constantCp(Rgas, cp, hf=float('nan')) Bases: :py:obj:`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 .. py:method:: fromDictionary(dictionary) :classmethod: 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) :param dictionary: The dictionary containing the data :type dictionary: dict .. py:attribute:: _cp .. py:attribute:: _hf .. py:method:: __str__() .. py:method:: __repr__() .. py:method:: cp(p: float, T: float) -> float Constant pressure heat capacity [J/kg/K] .. py:method:: ha(p: float, T: float) -> float Absolute enthalpy [J/kg] ha(T) = cp * (T - Tstd) + hf .. py:method:: hf() -> float Enthalpy of formation [J/kg] hf = ha(Tstd) .. py:method:: dcpdT(p: float, T: float) -> float dcp/dT [J/kg/K^2]