feos-org / feos

FeOs - A Framework for Equations of State and Classical Density Functional Theory
Other
110 stars 22 forks source link

Phase equilibria in pores #165

Closed prehner closed 1 year ago

prehner commented 1 year ago

With the recent changes in #158 the algorithm for the determination of phase euqilibria in pores needed to be rewritten somewhat. The new implementation uses bulk densities rather than Gibbs energies as iteration variable, which is appealing because it avoids additional iterations of the bulk states. However, it appears to have regressed in terms of robustness.

prehner commented 1 year ago

Switching to the Newton solver and forcing the density to be positive in the Newton solver (same is done for Anderson Mixing) resolves most of the convergence troubles. Fixed in 78f6038e17546263e3dde7837782300ab39293a8