ThermofluidStream.Processes.Compressor, ThermofluidStream.Processes.Fan and ThermofluidStream.Processes.Turbine checks if ideal gas law is applicable using:
Real R_in(unit="J/(kg.K)") = p_in/Medium.temperature(inlet.state)/Medium.density(inlet.state);
Real R_out(unit="J/(kg.K)") = p_out/Medium.temperature(outlet.state)/Medium.density(outlet.state);
equation
// test for ideal gas
assert(abs(R_in- R_in)/R_in < max_rel_R, "Medium in compressor is assumed to be ideal gas, but check failed", dropOfCommons.assertionLevel);
1) It should probably be abs(R_out- R_in)/R_in < max_rel_R instead of abs(R_in- R_in)/R_in < max_rel_R
2) We should rather base that check on compressibility factor, i.e. something like
ThermofluidStream.Processes.Compressor
,ThermofluidStream.Processes.Fan
andThermofluidStream.Processes.Turbine
checks if ideal gas law is applicable using:1) It should probably be
abs(R_out- R_in)/R_in < max_rel_R
instead ofabs(R_in- R_in)/R_in < max_rel_R
2) We should rather base that check on compressibility factor, i.e. something like