gustavochm / sgtpy

Other
38 stars 14 forks source link

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

Open funkvps opened 1 year ago

funkvps commented 1 year ago

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))

gustavochm commented 1 year ago

Hey funkvps,

Could you provide the script to reproduce that error?

Gustavo

funkvps commented 1 year ago

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

gustavochm commented 1 year ago

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.