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