feos-org / feos

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

Some jupyter notebooks throwing error #222

Closed defencedog closed 8 months ago

defencedog commented 8 months ago

From examples: 1- https://github.com/feos-org/feos/blob/main/examples/core_dual_numbers.ipynb Cell2 throws error


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[2], line 8
      5 molar_weight = SIArray1(44.0962 * GRAM / MOL)
      7 # create an instance of our python class and hand it over to rust
----> 8 eos = EquationOfState.python(PyPengRobinson(tc, pc, omega, molar_weight))

AttributeError: type object 'builtins.EquationOfState' has no attribute 'python'

2- https://github.com/feos-org/feos/blob/main/examples/core_user_defined_eos.ipynb Cell7 throws error


thread '<unnamed>' panicked at src/ideal_gas/mod.rs:18:22:
No ideal gas model initialized!
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---------------------------------------------------------------------------
PanicException                            Traceback (most recent call last)
Cell In[7], line 1
----> 1 s_ph = State(
      2     eos, 
      3     pressure=1*BAR, 
      4     molar_enthalpy=s_pt.molar_enthalpy(Contributions.Residual)
      5 )

PanicException: No ideal gas model initialized!

I installed feos using pip install git+https://github.com/feos-org/feos

g-bauer commented 8 months ago

Thank you very much for reporting those errors. We didn't update all notebooks to reflect our latest changes, yet. For the above mentioned notebooks, I added fixes in this branch. Let me know if anything is unclear or other errors arise.

defencedog commented 8 months ago

Extremely thanks. I am closing this issue however if I needed help in any other example notebook, I will request here.