libICEpost.src.thermophysicalModels.thermoModels.thermoMixture.mixingRules.Thermo ================================================================================= .. py:module:: libICEpost.src.thermophysicalModels.thermoModels.thermoMixture.mixingRules.Thermo .. autoapi-nested-parse:: @author: F. Ramognino Last update: 17/10/2023 Package for handling mixing rules for combining thermodynamic data of specie into a multi-component mixture Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/libICEpost/src/thermophysicalModels/thermoModels/thermoMixture/mixingRules/Thermo/ThermoMixing/index /autoapi/libICEpost/src/thermophysicalModels/thermoModels/thermoMixture/mixingRules/Thermo/constantCpMixing/index /autoapi/libICEpost/src/thermophysicalModels/thermoModels/thermoMixture/mixingRules/Thermo/janaf7Mixing/index Classes ------- .. autoapisummary:: libICEpost.src.thermophysicalModels.thermoModels.thermoMixture.mixingRules.Thermo.ThermoMixing libICEpost.src.thermophysicalModels.thermoModels.thermoMixture.mixingRules.Thermo.janaf7Mixing libICEpost.src.thermophysicalModels.thermoModels.thermoMixture.mixingRules.Thermo.constantCpMixing Package Contents ---------------- .. py:class:: ThermoMixing(mix: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture) Bases: :py:obj:`libICEpost.src.base.BaseClass.BaseClass` Class handling mixing rule to combine thermodynamic data of specie into a multi-component mixture. Defines a moethod to generate the thermodynamic data of a mixture of gasses. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. attribute:: ThermoType Type of thermodynamic data for which it is implemented :type: str .. attribute:: Thermo The Thermo of the mixture :type: Thermo .. attribute:: thermos Link to database of thermodynamic properties (database.chemistry.thermo.Thermo) :type: _DatabaseClass .. attribute:: ThermoType str .. py:method:: ThermoType() -> str :staticmethod: :abstractmethod: The type of thermodynamic data to lookup for in the database .. py:attribute:: thermos :type: libICEpost.Database._DatabaseClass Link to database of thermodynamic data .. py:property:: mix :type: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture The mixture composition .. py:attribute:: _mix .. py:property:: Thermo :type: libICEpost.src.thermophysicalModels.specie.thermo.Thermo.Thermo The thermodynamic data of the mixture. .. py:method:: update(mix: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture = None) -> bool Method to update the equation of state based on the mixture composition (interface). :param mix: Change the mixture. Defaults to None. :type mix: Mixture, optional :returns: If something changed :rtype: bool .. py:method:: _update(mix: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture = None) -> bool :abstractmethod: Method to update the equation of state based on the mixture composition (implementation). :param mix: Change the mixture. Defaults to None. :type mix: Mixture, optional :returns: If something changed :rtype: bool .. py:class:: janaf7Mixing(mix: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture) Bases: :py:obj:`libICEpost.src.thermophysicalModels.thermoModels.thermoMixture.mixingRules.Thermo.ThermoMixing.ThermoMixing` Class handling mixing of multi-component mixture: thermodynamic data in janaf7 definition. .. attribute:: ThermoType Type of thermodynamic data for which it is implemented :type: str .. attribute:: Thermo The Thermo of the mixture :type: Thermo .. py:attribute:: ThermoType :value: 'janaf7' The type of thermodynamic data to lookup for in the database .. py:class:: janaf7(mix: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture) Bases: :py:obj:`libICEpost.src.thermophysicalModels.specie.thermo.Thermo.janaf7.janaf7` Thermodynamic data of mixture with NASA-7 polinomial coefficients consistent with janaf7 class. .. py:method:: fromDictionary(dictionary: dict) :classmethod: :abstractmethod: Not to be used! .. py:property:: Rgas The mass-specific gas constant [J/kgK] .. py:attribute:: _mix .. py:method:: _combineMethod(func: str, *fargs, **fkwargs) Method for macro-ization of combination of properties based on mixture composition :param func: the name of the method to combine :type func: str :returns: returns sum(y_i * thermo[specie_i].func(*fargs, **fkwargs)) :rtype: Thermo.func@ReturnType .. 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:: 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:: hs(p: float, T: float) -> float Sensible enthalpy [J/kg] hs = ha - hf .. py:method:: hf() -> float Enthalpy of formation [J/kg] hf = ha(Tstd) .. 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:: update(mix: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture = None) -> None .. py:method:: fromDictionary(dictionary) :classmethod: Create from dictionary. .. py:attribute:: _Thermo .. py:method:: _update(mix: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture = None) -> bool No class data to be updated. :param mix: Change the mixture. Defaults to None. :type mix: Mixture, optional :returns: If something changed :rtype: bool .. py:class:: constantCpMixing(mix: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture) Bases: :py:obj:`libICEpost.src.thermophysicalModels.thermoModels.thermoMixture.mixingRules.Thermo.ThermoMixing.ThermoMixing` Class handling mixing of multi-component mixture: thermodynamic data in constantCp definition. .. attribute:: ThermoType Type of thermodynamic data for which it is implemented :type: str .. attribute:: Thermo The Thermo of the mixture :type: Thermo .. py:attribute:: ThermoType :value: 'constantCp' The type of thermodynamic data to lookup for in the database .. py:attribute:: _oldMix :type: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture The old mixture composition .. py:method:: fromDictionary(dictionary) :classmethod: Create from dictionary. .. py:attribute:: _Thermo .. py:method:: _update(mix: libICEpost.src.thermophysicalModels.specie.specie.Mixture.Mixture = None) -> bool Compute new properties as mass-weighted from individual specie in mixture. :param mix: Change the mixture. Defaults to None. :type mix: Mixture, optional :returns: If something changed :rtype: bool