AixLib.Media.Air.specificEntropy

# .AixLib.Media.Air.specificEntropy

Return the specific entropy, only valid for phi<1

## Information

This function computes the specific entropy.

The specific entropy of the mixture is obtained from

s = ss + sm,

where ss is the entropy change due to the state change (relative to the reference temperature) and sm is the entropy change due to mixing of the dry air and water vapor.

The entropy change due to change in state is obtained from

ss = cv ln(T/T0) + R ln(v/v0)
= cv ln(T/T0) + R ln(ρ0/ρ)

If we assume ρ = p0/(R T), and because cp = cv + R, we can write

ss = cv ln(T/T0) + R ln(T/T0)
=cp ln(T/T0).

Next, the entropy of mixing is obtained from a reversible isothermal expansion process. Hence,

sm = -R ∑i( Xi ⁄ Mi ln(Yi p/p0)),

where R is the gas constant, X is the mass fraction, M is the molar mass, and Y is the mole fraction.

To obtain the state for a given pressure, entropy and mass fraction, use AixLib.Media.Air.setState_psX.

#### Limitations

This function is only valid for a relative humidity below 100%.

## Revisions

- November 27, 2013, by Michael Wetter:
  First implementation.

Generated at 2026-05-12T20:19:03Z by OpenModelicaOpenModelica 1.26.7 using GenerateDoc.mos