Open modelica-trac-importer opened 7 years ago
Comment by otter on 29 Jul 2013 16:15 UTC Replying to [ticket:1225 rfranke]:
ModelicaTest.Fluid.TestComponents.Vessels.TestInitialization
shows a negative specific enthalpy of aboutvol1.medium.h = -5000 J/kg
for regular ambient conditons of 20 °C, 1 bar.
Changing the medium model from
Modelica.Media.Air.SimpleAir
toModelica.Media.Air.MoistAir
, the specific enthalpy becomes about +45000 J/kg (the larger absolute value might be due to moisture).Is there a sign error or a wrong offset in
Modelica.Media.Air.SimpleAir
?
The reason is that specificEnthalpy of SimpleAir is computed as:
h = cp*(T-T0)
and T0 is not set, and therefore the default T0 = reference_T (= 25 degC) is used. Since in the simulation T=20 degC, h = cp*(20 - 25) = - 5*cp and therefore a negative value appears.
The fix is therefore to explicitly set T0. However, I do not know what value to use.
Comment by hubertus on 29 Jul 2013 16:25 UTC I think Martin explained this nicely. The NASA-values used in the full air model also have a number of different reference points for enthalpy that differ drastically (and one of the choices is close to the one used for simple Air.
I don't see any problem here, so I will close with resolution worksforme. 25 degC is a very common value for 0 enthalpy (but of course not the only possible one).
Comment by rfranke on 30 Jul 2013 07:06 UTC Thank you for the clarification. I changed the classification of the ticket because there it is no blocker. Nevertheless I don't like to consider it solved.
The results for different air models at the same temperature and pressure are:
SimpleAir: -5023 J/kg
MoistAir: 45267 J/kg
DryAirNASA: 293591 J/kg
To me this appears as if different models would use different physical units and ask users to look up conversions in the respective base libraries.
Isn't the only sensible choice to relate the specific enthalpy to 0K, cf. DryAirNASA?
I may be biased from power plants, where absolute values of specific enthalpies are documented in design specs and no-one questions the reference point. Other fluid applications can hardly be that far away, in particular as air may be used as working fluid as well, see e.g.:
http://www.csiro.au/en/Outcomes/Energy/Renewables-and-Smart-Systems/Solar-Brayton-Cycle.aspx
Shouldn't MSL go forward and avoid confusion with different physical units or reference points for one and the same thing?
Comment by otter on 31 Jul 2013 15:51 UTC There is no time to discuss and fix this for MSL 3.2.1, therefore changing the milestone.
Reported by rfranke on 29 Jul 2013 06:34 UTC
ModelicaTest.Fluid.TestComponents.Vessels.TestInitialization
shows a negative specific enthalpy of aboutfor regular ambient conditons of 20 °C, 1 bar.
Changing the medium model from
Modelica.Media.Air.SimpleAir
toModelica.Media.Air.MoistAir
, the specific enthalpy becomes about +45000 J/kg (the larger absolute value might be due to moisture).Is there a sign error or a wrong offset in
Modelica.Media.Air.SimpleAir
?Migrated-From: https://trac.modelica.org/Modelica/ticket/1225