The exergy of the system is the maximal amount of useful work that the system can generate, during a process which brings it to equilibrium with its environment, or the amount of energy available. During an irreversible process, such as heat exchanges with reservoirs, exergy is destroyed. Generally, the theorem states that ψ ψ ˙ ˙ d = T 0 S g ˙ ˙ where ψ ψ ˙ ˙ d is the rate at which exergy is destroyed, and S g ˙ ˙ is the rate at which entropy is generated. As above, time derivatives are denoted by dots.