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

MultiPhase TP-Flash #272

Merged
merged 92 commits into from
Jun 3, 2024
Merged

MultiPhase TP-Flash #272

merged 92 commits into from
Jun 3, 2024

Conversation

longemen3000
Copy link
Member

this PR adds a new multiphase tp-flash.
it is based on the michelsen multiphase method (tpd + RR + gibbs minimization) with some modifications, listed below:

  • the RR calculation of phase fractions was based on a paper by Okuno et al. (2010), it has a good definition of a guarded newton step that allows easy convergence.
  • the gibbs minimization was done in lnK-β-v space (volume solver) instead of mole numbers.
  • the creation of new phases is done by using the result of the stability calculation to create a new phase, instead of using wilson k values. if we don't have critical points, this is faster.

This PR also speeds up tpd significantly, to the point it is safe to call it multiple times.
supercedes #108

@@ -57,6 +57,7 @@ ForwardDiff = "^0.10"
JSON3 = "1"
LinearAlgebra = "1"
LogExpFunctions = "^0.3.24"
Metaheuristics = "2, 3"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, why did we add Metaheuristics as a dependency?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is just as compat, it only applies when the extension is loaded

@longemen3000 longemen3000 merged commit 6096b04 into master Jun 3, 2024
18 of 22 checks passed
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

2 participants