.Buildings.Media.Air.specificEntropy

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 Buildings.Media.Air.setState_psX.

Limitations

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

Revisions


Generated at 2024-04-26T18:16:04Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos