Skip to content

Fix error in Peng-Robinson equation of state#151

Merged
prehner merged 2 commits into
mainfrom
fix_peng_robinson
Mar 28, 2023
Merged

Fix error in Peng-Robinson equation of state#151
prehner merged 2 commits into
mainfrom
fix_peng_robinson

Conversation

@prehner

@prehner prehner commented Mar 27, 2023

Copy link
Copy Markdown
Contributor

This issue was raised in #146. The implementation of the Peng-Robinson equation of state in feos-core and two example notebooks did not align with expressions found in literature.

The implementation was tested on phase equilibria for which the results were satisfying. Upon further inspection the difference between the code and the references was found to come from the neglection of a lower bound in the integral

$$A^\mathrm{res}=N\int\limits_0^\rho\frac{p^\mathrm{res}}{\rho^2}\mathrm{d}\rho$$

Therefore most intensive properties (except for the pressure) had a constant offset and extensive properties like the Helmholtz energy a linear offset w.r.t. the number of moles. Phase equilibrium calculations were not affected by that and also the error should have cancelled for calculations of, e.g. enthalpy differences.

With this PR the implementation should be correct and align with other implementations.

Thank you @iurisegtovich for bringing this to our attention.

@prehner prehner linked an issue Mar 27, 2023 that may be closed by this pull request
@prehner prehner added bug documentation Improvements or additions to documentation core related to features in feos-core labels Mar 27, 2023
@prehner prehner requested a review from g-bauer March 27, 2023 13:38
@prehner prehner merged commit 947827b into main Mar 28, 2023
@prehner prehner deleted the fix_peng_robinson branch March 28, 2023 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core related to features in feos-core documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug in the peng robinson helmholtz implementation

2 participants