Parameter estimation and its tutorial #336
-
|
Hi devs So I am wanting to start using Clapeyron as a full suite - including parameterisation - to encourage my students to do the same outside of our in-house software. As it stands though, I am struggling to reproduce even simple literature SAFT parameter sets - even using the .ipynb tutorial file for methane. There are a couple of things that stand out as potential sources here:
Any help would be much appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
|
Hi Jamie, Happy to hear you're interested in using Clapeyron! To answer each of your questions:
I'm not sure what you mean by the fitting is 'bad'. Do you mean in comparison to the base PC-SAFT parameters for methane? In which case, that's to be expected since the data used is not the same and, in this case, we're allowing the segment number to vary. If you're comparing to experimental data, then the same logic can be applied, with the added caveat that the fitting didn't use experimental data close to the critical point. And this is before one considers the degeneracies present when doing fitting of PC-SAFT parameters. If you want more information regarding Metaheuristics.jl, they have an excellent set of docs: https://jmejia8.github.io/Metaheuristics.jl/stable/. In general, they provide global optimization algorithms using heuristic methods.
Best regards, Pierre |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for your feedback Pierre! I am getting the hang of the different aspects, but have two further questions I'd appreciated your help on with the parameterisation aspect:
Am I missing a simpler solution? Is there a way to instead feed a multicomponent EOSmodel object to the pure component algorithms to allow me to include both pure component properties and mixture data in the regression? Thank you! |
Beta Was this translation helpful? Give feedback.
-
|
Thanks Pierre, that helps - I understand your point on the association kernels, and I can see how the divergent paths would make it difficult to cater to all approaches, I will just note for future for SAFT VR Mie. Your example was helpful, but in many unexpected ways! The most notable being that you removed the pure component measurements from the binary mixture data set, and this made all the difference in the parameterisation. For some reason, if the pure component points are there, the optimisation seems to diverge (perhaps its the "0" composition?) - the Besides that, a couple of questions for my own clarity on the data in the csv files:
And thanks again for your responsiveness - I think it makes all the difference with adoption of open source packages. |
Beta Was this translation helpful? Give feedback.




Hi Jaime,
I now see what you mean. Yes, the data is definitely not that for methane (honestly, it's been so long since I wrote that code, I don't remember what molecule it was supposed to correspond to). I've now changed the data to correspond to methane and I am able to reproduce the PC-SAFT parameters.
As for the units, we've documented most of the units in our docs. You'll see that there is a
mass_densityfunction that obtains the density in mass units. You might also want to check out Unitful.jl which allows for easy unit conversions (we've also added an extension to make Clapeyron compatible with it).The way the parameterisation is presented in the docs, we use the Clapeyron-Metaheu…