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

Improved initial point for saturation pressure #246

Merged
merged 9 commits into from
Jan 4, 2024

Conversation

longemen3000
Copy link
Member

at the cost of one additional gas pressure evaluation (but probably compensated by less evaluations in the liquid branch), x0_sat_pure now interpolates a vdW EoS between a liquid point and a gas point near the spinodal (before, it did the same,but using the second virial coefficient directly). Using a correlation, we can now (mostly, but couldn't found cases were this didn't hold) evade the old branch where the liquid volume couldn't be calculated due to the predicted pressure being too low (happening specially near the critical point).
Furthermore, this now includes a dual spinodal solver that allows better initial points in 0.97 < Tr < 0.995, without the need of calculating the critical point, while still being faster than a crit_pure calculation.
this improves dramatically the calculation speed of eos with long chain components. the main focus was to calculate properties of model = PCSAFT("eicosane") near the critical point without the need to actually calculate it.

It also adds some utility functions, mainly an quintic hermite interpolator, used for the spinodal solver

Copy link

codecov bot commented Jan 3, 2024

Codecov Report

Attention: 17 lines in your changes are missing coverage. Please review.

Comparison is base (8bf867e) 79.56% compared to head (2e37d82) 79.94%.
Report is 9 commits behind head on master.

Files Patch % Lines
src/methods/initial_guess.jl 91.08% 9 Missing ⚠️
...rty_solvers/singlecomponent/saturation/ChemPotV.jl 86.66% 4 Missing ⚠️
src/modules/solvers/poly.jl 83.33% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #246      +/-   ##
==========================================
+ Coverage   79.56%   79.94%   +0.37%     
==========================================
  Files         280      279       -1     
  Lines       19421    19484      +63     
==========================================
+ Hits        15453    15577     +124     
+ Misses       3968     3907      -61     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@longemen3000 longemen3000 merged commit e8d0646 into master Jan 4, 2024
22 checks passed
@longemen3000 longemen3000 deleted the sat_pure_improved branch January 13, 2024 04:25
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

Successfully merging this pull request may close these issues.

None yet

1 participant