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

The difference between HelmholtzMedia and Modelica.Media? #41

Closed
Satinelamp opened this issue Feb 4, 2021 · 4 comments
Closed

The difference between HelmholtzMedia and Modelica.Media? #41

Satinelamp opened this issue Feb 4, 2021 · 4 comments

Comments

@Satinelamp
Copy link

I am planning to choose a base media library for my model, I am interested in this library, but I am not sure what the difference is between HelmholtzMedia and Modelica.Media, could you give me some clue about it?
I read the paper about this library but didn't get a clue. It would be more user-friendly with an illustration about why we need this new library other than Modelica.Media.

@thorade
Copy link
Owner

thorade commented Feb 4, 2021

Hi,
Modelica.Media defines interfaces for different types of fluids, and implements some fluids also (water, R134a, many gases, ...).
HelmholtzMedia extends from one Modelica.Media interface:
https://github.com/thorade/HelmholtzMedia/blob/master/HelmholtzMedia/Interfaces/PartialHelmholtzMedium/package.mo#L9
Based on this interface, it implements some refrigerants (R134a, butane, CO2, others) , using similar or identical algorithms as RefProp. These algorithms are assumed to be very accurate, but also computationally heavy, so not super fast.

So the first question is: What fluid are you interested in? And do you need to model phase change?

@Satinelamp
Copy link
Author

I am using supercritical CO2 as my working fluid, but there are gonna be transcritical and phase change processes in the loop, such as evaporation and condensation, and so on.

@thorade
Copy link
Owner

thorade commented Feb 4, 2021

OK, that sounds like PartialTwoPhaseMedium is the interface that you want (pure fluid, with phase change). CO2 is already implemented in HelmholtzMedia. CO2 with phase-change is not available in Modelica.Media. You could also investigate using ExternalMedia+CoolProp. Both HelmholtzMedia and ExternalMedia extend from Modelica.Media, so that you can also switch between them later on with acceptable effort.
You could also try to get input on the best approach from @casella, he is also interested in CO2 (as probably many more researchers).

@Satinelamp
Copy link
Author

I also notice the MultiPhaseMixtureMedia, I see that it is a try to extend the scope of Modelica.Media. Considering there are a few different libraries such as Modelica.Media, ExternalMedia, MultiPhaseMixtureMedia, and some new libraries like FreeFluidsModelica, BrineProp, the media modeling is definitely evolving, I remember that there is a ppt from Casella showing that there is a modification plan about Modelica.Media, but I am not sure if there is a schedule to finish it. Now let's just wait and see what it is gonna be evolving into.

Future of Modelica Media

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants