Skip to content

Convergence improvement for tp_flash#219

Merged
prehner merged 2 commits into
mainfrom
tp_flash_initialization
Jan 11, 2024
Merged

Convergence improvement for tp_flash#219
prehner merged 2 commits into
mainfrom
tp_flash_initialization

Conversation

@prehner

@prehner prehner commented Jan 11, 2024

Copy link
Copy Markdown
Contributor

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
@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