You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Water media models given in Modelica.Media.Water are defined based on the reference at 273.15K and 1bar. As far as I can see there is no way of changing the reference state, for example, to 298.15K and 1bar. On the other hand this is possible for gas models; for gas media models we can set to excludeEnthalpyOfFormation=false and referenceChoice=Modelica.Media.Interfaces.Choices.ReferenceEnthalpy.ZeroAt25C. I had to edit the source code of Modelica.Media.Water to fix this issue and this is a messy solution, there are must be better solution. I think Modelica.Media.Water media models should also have the possibility of changing the reference state. Any thoughts?
In the documentation of Modelica.Media.Water (IF97.pdf) it says that how u, h, rho, etc. are calculated. There are 5 regions defined, for example for region 1, thermodynamic properties are calculated using appropriate partial derivatives of the specific Gibbs free energy g, here the reference state defined at T=273.15K. g should be changed to g* = g + h_0 - T*s_0 where h_0 and s_0 are reference specific enthalpy and entropy at some given reference temperature, for example T0 = 273.15 + 25. I think Modelica.Media.Water library should be updated with this correction.
Water media models given in Modelica.Media.Water are defined based on the reference at 273.15K and 1bar. As far as I can see there is no way of changing the reference state, for example, to 298.15K and 1bar. On the other hand this is possible for gas models; for gas media models we can set to excludeEnthalpyOfFormation=false and referenceChoice=Modelica.Media.Interfaces.Choices.ReferenceEnthalpy.ZeroAt25C. I had to edit the source code of Modelica.Media.Water to fix this issue and this is a messy solution, there are must be better solution. I think Modelica.Media.Water media models should also have the possibility of changing the reference state. Any thoughts?
In the documentation of Modelica.Media.Water (IF97.pdf) it says that how u, h, rho, etc. are calculated. There are 5 regions defined, for example for region 1, thermodynamic properties are calculated using appropriate partial derivatives of the specific Gibbs free energy g, here the reference state defined at T=273.15K. g should be changed to g* = g + h_0 - T*s_0 where h_0 and s_0 are reference specific enthalpy and entropy at some given reference temperature, for example T0 = 273.15 + 25. I think Modelica.Media.Water library should be updated with this correction.
https://stackoverflow.com/questions/76326366/how-can-i-change-the-reference-state-in-modelica-media-water
The text was updated successfully, but these errors were encountered: