Open fliphkd778 opened 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 .
@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.
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:
SolutionData
that extends LiquidData
from https://github.com/ibell/coolprop/blob/master/dev/IncompressibleLiquids/data_incompressible.py. The you simply have to copy your experimental data to that file and save it.IncompLiquidFit
from https://github.com/ibell/coolprop/blob/master/dev/IncompressibleLiquids/fit_incompressible.py in order to allow for a 2-dimensional fitting. The C++ code automatically adjusts the polynomial to the amount of coefficients given. You can change the order of the fitting polynomial in lines https://github.com/ibell/coolprop/blob/master/dev/IncompressibleLiquids/fit_incompressible.py#L24 ff. 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!
@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...
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?