mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-23 03:00:17 -04:00
* Add extrapolating secant solver Sometimes, the backwards ancillary solver fails near the critical point. This can happen if the ancillary function at its limit (i.e., critical temperature) does not reach the desired seek value (e.g., density). Because we are only usually using these to get a guess value, we can extrapolate them without issue to avoid a crash near the critical point. This helps to resolve #2154. * Stabilize saturation curve solution Solving for the saturation curve near the critical point can be unstable. This commit fixes that in a few ways. 1) Prevent the solver from overshooting and prevent a negative temperature or density. 2) If it does fail, try again with a smaller omega value. If the solver fails after all of this, we will still throw to allow something downstream to handle it. This helps to address issue #2154. * Move saturation_D_pure max iterations to options
4.1 KiB
4.1 KiB