Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I change the reference state in Modelica.Media.Water? #4142

Open
anushkaperera opened this issue May 26, 2023 · 0 comments
Open

How can I change the reference state in Modelica.Media.Water? #4142

anushkaperera opened this issue May 26, 2023 · 0 comments
Assignees
Labels
L: Media Issue addresses Modelica.Media

Comments

@anushkaperera
Copy link

anushkaperera commented May 26, 2023

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

@beutlich beutlich added the L: Media Issue addresses Modelica.Media label Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: Media Issue addresses Modelica.Media
Projects
None yet
Development

No branches or pull requests

4 participants