Skip to content

bug in the peng robinson helmholtz implementation  #146

Closed

Description

@iurisegtovich

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

  1. g-bauer commented on Mar 22, 2023

    @g-bauer
    Contributor

    Hi Iuri,

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

  2. linked a pull request that will close this issueFix error in Peng-Robinson equation of state #151on Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions