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

Assoc options #57

Merged
merged 4 commits into from
Dec 4, 2021
Merged

Assoc options #57

merged 4 commits into from
Dec 4, 2021

Conversation

longemen3000
Copy link
Member

fixes #54
to each site EoS model, there is now a new keyword, assoc_options containing an AssocOptions struct of the form:

assoc_options = AssocOptions(atol = 1e-12,rtol = 1e-12,max_iters = 1000, dampingfactor = 0.5)

if one need to increase the max iterations of an specific model, now you could just do:

model = PCSAFT(components,assoc_options = AssocOptions(max_iters = 10000))

as a byproduct, split_model was refactored to be a little bit more general. the only special case we do now is the references field.

Also, there is take 3 of trying to improve NaN handling. the problem was that ForwardDiff.Duals wasn't being processed by our custom log (and now sqrt). with the new definitions, NaNMath is no longer used, and can be safely removed in a subsequent commit.
It seems that our previous saturation pressure solver wasn't robust enough, as now there aren't any errors in the test suite with the default log implementation.

i will merge after #56

@codecov-commenter
Copy link

Codecov Report

Merging #57 (c4ff7d3) into master (8d105fb) will increase coverage by 0.05%.
The diff coverage is 95.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #57      +/-   ##
==========================================
+ Coverage   84.35%   84.41%   +0.05%     
==========================================
  Files         112      112              
  Lines        6878     6871       -7     
==========================================
- Hits         5802     5800       -2     
+ Misses       1076     1071       -5     
Impacted Files Coverage Δ
src/Clapeyron.jl 100.00% <ø> (ø)
src/utils/split_model.jl 81.73% <87.50%> (+2.42%) ⬆️
src/solvers/Solvers.jl 87.27% <88.88%> (+6.91%) ⬆️
src/models/eos/SAFT/BACKSAFT/BACKSAFT.jl 100.00% <100.00%> (ø)
src/models/eos/SAFT/CKSAFT/CKSAFT.jl 100.00% <100.00%> (ø)
src/models/eos/SAFT/CKSAFT/variants/sCKSAFT.jl 100.00% <100.00%> (ø)
src/models/eos/SAFT/CPA/CPA.jl 100.00% <100.00%> (ø)
src/models/eos/SAFT/LJSAFT/LJSAFT.jl 100.00% <100.00%> (ø)
src/models/eos/SAFT/PCSAFT/PCSAFT.jl 85.50% <100.00%> (ø)
src/models/eos/SAFT/PCSAFT/variants/sPCSAFT.jl 90.32% <100.00%> (ø)
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d105fb...c4ff7d3. Read the comment docs.

@pw0908 pw0908 merged commit bfbe967 into master Dec 4, 2021
@longemen3000 longemen3000 deleted the AssocOptions branch January 12, 2022 05:09
pw0908 added a commit that referenced this pull request Apr 28, 2022
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.

better association handling
3 participants