Source code for engineeringkit.thermodynamics.systems.exergy
r"""Exergy: the work a heat flow could yield against the environment, and the work lost.
Gouy and Stodola showed that every irreversibility destroys work equal to
the environment temperature times the entropy it generates; Rant named the
remaining work potential *exergy*.
"""
from __future__ import annotations
from engineeringkit._validation import finite as _finite
from engineeringkit._validation import nonnegative as _nonnegative
from engineeringkit._validation import positive as _positive
__all__ = ["exergy_heat", "exergy_destruction"]
[docs]
def exergy_heat(Q, T_source, T0):
r"""Exergy of heat :math:`Q` available at :math:`T_s`, :math:`Q(1 - T_0/T_s)`.
Parameters
----------
Q : float or array_like
Heat [J or W].
T_source : float or array_like
Absolute temperature at which the heat is available [K], positive.
T0 : float or array_like
Absolute environment (dead-state) temperature [K], positive.
Returns
-------
float or ndarray
Maximum work obtainable from the heat [J or W, as ``Q``]; negative for
a source colder than the environment.
Notes
-----
Inputs are raw SI numbers with no dimensional metadata; see
:doc:`/guides/thermodynamics`.
References
----------
Z. Rant, "Exergie, ein neues Wort für 'technische Arbeitsfähigkeit',"
*Forsch. Ingenieurwes.* 22 (1956) 36-37.
"""
_finite(Q=Q, T_source=T_source, T0=T0)
_positive(T_source=T_source, T0=T0)
return Q * (1 - T0 / T_source)
[docs]
def exergy_destruction(T0, entropy_generation):
r"""Lost work by the Gouy-Stodola theorem, :math:`T_0 S_{gen}`.
Parameters
----------
T0 : float or array_like
Absolute environment temperature [K], positive.
entropy_generation : float or array_like
Entropy generated by the irreversibility [J/K or W/K], nonnegative.
Returns
-------
float or ndarray
Exergy destroyed [J or W].
Notes
-----
Inputs are raw SI numbers with no dimensional metadata; see
:doc:`/guides/thermodynamics`.
References
----------
G. Gouy, "Sur l'énergie utilisable," *J. Phys. Théor. Appl.* 8 (1889)
501-518; A. Stodola, *Die Dampfturbinen*, 3rd ed., Berlin: Springer
(1905).
"""
_finite(T0=T0, entropy_generation=entropy_generation)
_positive(T0=T0)
_nonnegative(entropy_generation=entropy_generation)
return T0 * entropy_generation