ibell / coolprop

Deprecated version - go to
https://github.com/CoolProp/CoolProp
MIT License
24 stars 16 forks source link

Defining a new fluid #213

Open fliphkd778 opened 10 years ago

fliphkd778 commented 10 years ago

I would like to define a new fluid in coolprop, is there a method of doing so? The new fluid is a brine, similar to a lithium bromide solution. Perhaps an existing brine may be modified and saved as a new fluid?

ibell commented 10 years ago

@jowr, care to answer this one? Can you send me the information you have on this brine?

On Fri, Apr 25, 2014 at 4:25 PM, fliphkd778 notifications@github.comwrote:

I would like to define a new fluid in coolprop, is there a method of doing so? The new fluid is a brine, similar to a lithium bromide solution. Perhaps an existing brine may be modified and saved as a new fluid?

— Reply to this email directly or view it on GitHubhttps://github.com/ibell/coolprop/issues/213 .

fliphkd778 commented 10 years ago

@ibell, I do not have any solid thermodynamic correlations at the moment but will have them in the future after experimental data has been collected. The brine will be an ionic liquid/water solution. I will be calling for fluid properties from either Matlab or EES, whichever is easiest to create a new user defined fluid in.

jowr commented 10 years ago

Hi, defining a new mixture should be straight forward and we can definitely assist you.

Since you will end up with data points, let me describe the procedure I have in mind for fitting parameters. We have fitting scripts in Python, but they are only applicable for pure fluids. I started working on a script for solutions, but never finished it. You are more than welcome to contribute that part. Here is a rough guideline:

Please do not hesitate to contact us for assistance. I think it is great that you consider using CoolProp to fit equations to experimental data. This illustrates how useful an open framework for these kind of calculations can be.

Considering your last post, adding a new fluid to the C++ code would allow you to use all the wrappers. Hence, it should not make a difference if you end up using EES or Matlab. Good luck!

jowr commented 10 years ago

@fliphkd778, just for your information, CoolProp 5 will include all the facilities needed for a 2D fit of polynomials. The current approach can create a JSON file that is read by CoolProp at compile time...

http://nbviewer.ipython.org/github/CoolProp/CoolProp/blob/master/dev/IncompressibleLiquids/LinearAlgebra.ipynb