gustavochm / sgtpy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error while running example 3_pure_fluid_calculations in GC_SAFT--Gamma-Mie example

funkvps opened this issue · comments

error like below

C:\Users\cools\AppData\Roaming\Python\Python311\site-packages\sgtpy\sgt\sgtpure.py:65: RuntimeWarning: invalid value encountered in sqrt
tenint = np.nan_to_num(np.sqrt(2*dOm))

Hey funkvps,

Could you provide the script to reproduce that error?

Gustavo

Hello, I'm just running the example from sgtpy. As attached.
3_pure_fluid_calculations.zip

I see, I just checked the example and that warning is due to the Grand Potential Difference being negative. This usually happens when the liquid and vapour phases do not have exactly the same chemical potential (due to tolerance errors). The warning doesn't affect the result due to the np.nan_to_num function.