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

Convergence improvement for tp_flash #219

Merged
merged 2 commits into from
Jan 11, 2024
Merged

Convergence improvement for tp_flash #219

merged 2 commits into from
Jan 11, 2024

Conversation

prehner
Copy link
Contributor

@prehner prehner commented Jan 11, 2024

In some cases, when the different solutions found by a stability analysis are right above the equality threshold, an almost trivial solution is used to initialize the tp flash for cases that could otherwise be solved very robustly.

MRE:

from feos.si import *
from feos.pcsaft import *
from feos.eos import *
import numpy as np

pcsaft = PcSaftParameters.from_json(['cyclopentane', 'propylene'], '../input/esper2023.json')
eos = EquationOfState.pcsaft(pcsaft)

state = State(eos, 343.7964273175933*KELVIN, partial_density=np.array([78.77667866249813, 423.48238669680353])*MOL/METER**3)
state.tp_flash()

@prehner prehner requested a review from g-bauer January 11, 2024 09:06
@prehner prehner merged commit 7335de9 into main Jan 11, 2024
14 checks passed
@prehner prehner deleted the tp_flash_initialization branch January 11, 2024 15:29
@prehner prehner added this to the v0.7.0 milestone Mar 17, 2024
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.

2 participants