You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For certain combinations of T and P, the method MixtureFugacityTP::solveCubic fails, issuing a warning like:
MixtureFugacityTP::solveCubic(T = 271.8109054527264, p = 19614005.835764904): WARNING root didn't converge V = 2174.003159636111
and leaving the phase in an invalid state with pressure and density at inf and -inf (or vice versa), which in turn results in all thermodynamic properties evaluating to NaN.
Steps to reproduce
Conditions where this error occurs are relatively rare, but occur on a set of related points.
These are points where the solver fails and issues a warning:
The error occurs along a line of points, approximately defined by the line $P=157285712-506093T$. The failures become less common as temperature goes up.
That is strange because up in the supercritical region there, the root finder shouldn't have any issues converging like it would potentially do in a subcritical case with a liquid/vapor region to contend with.
As an aside, I believe we should consider using a 'canned' root solver, e.g. boost's cubic_roots. Based on a cursory google search, there are other alternatives as well, e.g. ACM TOMS Algorithm 954. Unfortunately, there aren't any comments regarding what algorithm is currently used.Edit: Hiding in plain sight: Nickall's method. (Still) tagging @decaluwe and @gkogekar ....
Problem description
For certain combinations of T and P, the method
MixtureFugacityTP::solveCubic
fails, issuing a warning like:and leaving the phase in an invalid state with pressure and density at
inf
and-inf
(or vice versa), which in turn results in all thermodynamic properties evaluating toNaN
.Steps to reproduce
Conditions where this error occurs are relatively rare, but occur on a set of related points.
Behavior
These are points where the solver fails and issues a warning:
The error occurs along a line of points, approximately defined by the line$P=157285712-506093T$ . The failures become less common as temperature goes up.
System information
main
branch at d37a76bAdditional context
Originally reported on the Users' Group
The text was updated successfully, but these errors were encountered: