DLR-SR / ThermofluidStream

The DLR Thermofluid Stream Library
BSD 3-Clause "New" or "Revised" License
55 stars 26 forks source link

Limit ThermofluidStream.Media.myMedia.Air.MoistAir isentropic exponent kappa and entropy to relative humidity phi<1 #169

Open RaphaelGebhart opened 4 months ago

RaphaelGebhart commented 4 months ago

To calculate the isentropic exponent Medium.isentropicExponent() uses kappa=cp/cv, but since Medium.specificHeatCapacityCp() jumps at saturation, the isentropic exponent kappa should be limited to relative humidity phi < 1 (it took us some time to find the reason for weird compressor results, but in the end, we noticed that they were wrong because the inlet air was set to be saturated (x=x_saturation) and resulted in an isentropic exponent kappa=6, changing the relative humidity phi=0.99 gave correct results with an isentropic exponent kappa≈1.4.

Therefore i suggest the Medium itself should test, whether the assumptions made are correct, because saturation at inlet/outlet might occur and one might not always be aware, that this would cause completely wrong results using Medium.isentropicExponent().

Unfortunatly also Medium.specificEntropy(state) is (according to its documentation) only valid for relative humidity phi < 1, and should probably also be limited. Although i expect Medium.specificEntropy() might not be as sensitive as Medium.isentropicExponent() when humidity x >= x_saturation.

Probably extending Medium.specificEntropy(state) to take liquid/solid water into account might be more complex, therefor i suggest first to limit its usage according to its assumptions.