feos-org / feos

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

Convergence problems with SAFT-VRQ-Mie in pores #87

Open prehner opened 1 year ago

prehner commented 1 year ago

The SAFT-VRQ-Mie functional converges less robustly than PC-SAFT due to the calculation of local mole fractions. Due to the Gibbs phenomenon, it is almost unavoidable that the density within the pore wall becomes 0 at some point. In that case the calculation of local mole fractions generates NaN.

One remedy for pure components is to write a dedicated implementation of the functional specifically for pure components.

Other remedies would be to "clean" the values of the Helmholtz energy density in places where the (total) density is zero or rewrite the functional without calling the equation of state.