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

Add a new fluid #42

Closed
sdaix opened this issue Mar 19, 2021 · 7 comments
Closed

Add a new fluid #42

sdaix opened this issue Mar 19, 2021 · 7 comments

Comments

@sdaix
Copy link

sdaix commented Mar 19, 2021

Hello,

I want to add a new helmholtz media like hydrogen.
I have find these properties in google and I want create a new media.
https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=832374

I don't understand how could I do this ?
Can you help me ?

Thank you

@thorade
Copy link
Owner

thorade commented Mar 19, 2021

Great! Happy to help you with it, until it is done.
The definition of fluids happens here:
https://github.com/thorade/HelmholtzMedia/tree/master/HelmholtzMedia/HelmholtzFluids
For example, the coefficients for Ethanol are in this file:
https://github.com/thorade/HelmholtzMedia/blob/master/HelmholtzMedia/HelmholtzFluids/Ethanol/package.mo

As a start, you can just copy any of the fluids, then start adding the correct coefficients.
These coefficients can be taken from the original publication, or from CoolProp, or from RefProp. The easiest is to take it from RefProp - do you have it installed and a license? In the installation directory, you can find .fld files, these can be opened with any text editor.

Do you know how to use Github, git, Forking, Pull Requests?

@sdaix
Copy link
Author

sdaix commented Mar 19, 2021

I am sorry
I am beginner on github (also on oenmodelica). 
No I have not access at refprop directly. But I access at these fld file by fluent database software.

I don't retrieve the same coefficient that my fld file for your helium for example.

If it is not good place to discuss this, don't hesitate to advice me

Thank you for your help
Steven

@sdaix
Copy link
Author

sdaix commented Mar 20, 2021

Hello

I am some difficulties to code the right viscosity or thermal conductivity from fld file.
I can send you the new file package for hydrogen and fld file if you want. (I can't add these files inside this post)

Steven``

@thorade
Copy link
Owner

thorade commented Mar 20, 2021

Please do not add fld files here, they are part of RefProp and should not be shared. I removed the fld.zip file from your post. Also, I have a RefProp license, so I already have the fld files anyway.

The transport properties (viscosity, thermal conductivity) are usually more difficult to add than the equation of state, and they partly depend on the equation of state. So, as first step, you have to get the equation of state implemented correctly, and then once that is done and tested, do the transport properties.
Some special fluids do not use any of the general forms for transport properties, and if that is the case for hydrogen, you would have to add the full correlation, and not just some coefficients. You can see helium as an example.

@thorade
Copy link
Owner

thorade commented Mar 20, 2021

Here are the main steps for collaborating on an open-source repository on github:

  • Make a fork of the repository
  • Clone the fork to your local computer
  • Do the changes, start adding new fluid, edit files
  • Commit the changes (Locally)
  • Push the changes to your fork
  • Then make a Pull Request (PR)
  • I will review the changes, and if it looks good, accept the PR, and then your code is integrated in this repository

This might sound complicated first, so if you prefer you can also just send the new files by email. But learnign git and github is probably time very well spent, in the long term!

@thorade
Copy link
Owner

thorade commented Sep 19, 2021

Please also see #43 for more fluids

@thorade
Copy link
Owner

thorade commented Nov 18, 2021

Closing this for now, happy to reopen later and continue discussion

@thorade thorade closed this as completed Nov 18, 2021
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