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

use more residual properties when available #297

Merged
merged 24 commits into from
Sep 26, 2024
Merged

use more residual properties when available #297

merged 24 commits into from
Sep 26, 2024

Conversation

longemen3000
Copy link
Member

this PR:

  • changes some methods to only use residual properties (single and multicomponent equilibria), we were wasting extra time evaluating ideal models that were then substracted away (15% improvement on saturation_pressure(PCSAFT("water"),373.15). In multicomponent equilibria, there is a problem with just equating the chemical potentials: the ideal term is of the form f(T) + log(x[i]/v[i]) and their substraction causes numerical problems. combining the two logarithms in one expression seems to stabilize the solver.
  • adds a default method for p_scale that uses lb_volume and T_scale. fixes some scaling errors found with p_scale methods for some EoS.
  • fix custom definition of virial coefficient for cubics
  • merges GroupParam and StructGroupParam into one struct (GroupParam)
  • adds the PPDS ideal correlation (PPDSIdeal)
  • adds EoSPhase as a potential struct to use for representing phases (the infraestructure to use it across the methods is not yet there, probably we can use a macro to transform between our current methods return type and returning lists of phases)

Copy link

codecov bot commented Sep 25, 2024

Codecov Report

Attention: Patch coverage is 79.96604% with 118 lines in your changes missing coverage. Please review.

Project coverage is 76.86%. Comparing base (878c810) to head (92fd3d3).
Report is 24 commits behind head on master.

Files with missing lines Patch % Lines
src/methods/phase.jl 0.00% 61 Missing ⚠️
src/modules/solvers/Solvers.jl 59.37% 13 Missing ⚠️
.../property_solvers/multicomponent/multicomponent.jl 94.11% 5 Missing ⚠️
src/database/database_rawparam.jl 63.63% 4 Missing ⚠️
src/database/database_utils.jl 0.00% 4 Missing ⚠️
src/methods/VT.jl 0.00% 4 Missing ⚠️
...ty_solvers/multicomponent/solids/eutectic_point.jl 0.00% 4 Missing ⚠️
src/database/params/GroupParam.jl 83.33% 3 Missing ⚠️
src/methods/initial_guess.jl 86.36% 3 Missing ⚠️
...rc/methods/property_solvers/multicomponent/VLLE.jl 95.83% 2 Missing ⚠️
... and 14 more
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #297   +/-   ##
=======================================
  Coverage   76.86%   76.86%           
=======================================
  Files         321      321           
  Lines       24049    23993   -56     
=======================================
- Hits        18485    18442   -43     
+ Misses       5564     5551   -13     

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

@longemen3000 longemen3000 merged commit 75c7fb8 into master Sep 26, 2024
19 of 24 checks passed
@longemen3000 longemen3000 deleted the general_eq branch September 26, 2024 02:47
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.

1 participant