thorade / HelmholtzMedia

Modelica library for the calculation of fluid properties from a Helmholtz energy equation of state (EoS).
BSD 3-Clause "New" or "Revised" License
35 stars 16 forks source link

Virial EoS #11

Open thorade opened 11 years ago

thorade commented 11 years ago

For the gas region (not liquid!!), a virial equation could be used to calculate start values. See http://en.wikipedia.org/wiki/Compressibility_factor for an introduction

Add four new properties: Compressibility factor Z Second virial coefficient B Third virial coefficient C Fourth virial coefficient D

Usually, the input properties are temperature and volume. Kabelac 1991 shows how to solve for volume, when temperature and pressure are given: http://dx.doi.org/10.1016/0140-7007(91)90006-3 (in the appendix)

thorade commented 11 years ago

The virial coefficients are calculated at lim d->0 http://books.google.de/books?id=dd410GGw8wUC&pg=PA40 Therefore, f_rd, f_rdd and f_rddd should check for delta<Modelica.Constants.small.

Also see this discussion: https://trac.modelica.org/Modelica/ticket/605 https://github.com/modelica/Modelica/issues/605

thorade commented 11 years ago

RefProp 9.1 has two subroutines (in PROP_SUB.FOR): subroutine VIRB uses rho=1e-8 for B and C and rho=1e-4 for D, subroutine VIRBCD uses rho=0