feos-org/feos

bug in the peng robinson helmholtz implementation

iurisegtovich opened this issue ยท 1 comments

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 Iuri,

thanks for the issue and the nice notebook. We will look into the details and come up with a solution/fix soon.