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
{{ message }}
Repository navigation
bug in the peng robinson helmholtz implementation #146
hi, i put together the following notebook 🔗 colab
to show a bug in the expression for the helmholtz energy of the peng robinson eos
(both the python version of the examples " core_user_defined_eos.ipynb" and "core_working_with_units.ipynb" as the rust version of the package)
in summary, the current version does give the correct pressure, but the helmholtz energy is not correct
(or at least not consistent with the conventional definition of "A_fluid(state) - A_idealgas(same T, same V)", isometric residual)
the bug can be observed as $\ln \phi$ does not go to zero at infinite volume (zero density) with the current pr implementation,
the notebook shows a proposed correction to the helmholtz energy, and shows that the proposed correction has the same trend as the current pcsaft implementation.
the notebook does not contain the complete derivation for the correct helmholtz energy, but points to three references (smith van ness & abbott; elliott & lira; reid praunitz & poling)
Activity
g-bauer commentedon Mar 22, 2023
Hi Iuri,
thanks for the issue and the nice notebook. We will look into the details and come up with a solution/fix soon.