modelAncillary_density_pT_Soave

check the Redlich-Kwong-Soave start values for density against the EoS in the whole validity range

Information

Compares the density from the Redlich-Kwong-Soave equation of state (Ancillary.density_pT_Soave), which is used as start value in setState_pTX, with the density from the Helmholtz EoS on a grid of nT temperatures between TMIN and TMAX and np pressures between 1e-6 Pa and PMAX (logarithmically spaced). States within 2 % of the saturation pressure are skipped.

The RKS density must be positive, smaller than the inverse covolume 1/b, and close to the EoS density: abs(log(d_RKS/d_EoS)) ≤ tol_vap in the vapour region and ≤ tol_dense in the liquid and supercritical region, where the cubic equation is only qualitatively correct. The largest deviations per region are available as variables and, together with all failed states, written to soave.txt. Use redeclare package Medium to check other fluids.

The test points include the case from issue #3 (Pentane at 1e-6 Pa and high temperature), where the previous implementation picked a root with a specific volume smaller than the covolume.

Parameters

TypeNameDefaultDescription
IntegernT20number of temperatures between TMIN and TMAX
Integernp20number of pressures between p_low and PMAX, logarithmically spaced
Realtol_vap0.1tolerance for abs(log(d_RKS/d_EoS)) in the vapour region
Realtol_dense1.0tolerance for abs(log(d_RKS/d_EoS)) in the liquid and supercritical region

Components

TypeNameDefaultDescription
RealmaxErr_vaplargest abs(log(d_RKS/d_EoS)), vapour
RealmaxErr_liqlargest abs(log(d_RKS/d_EoS)), liquid
RealmaxErr_suplargest abs(log(d_RKS/d_EoS)), supercritical
IntegernFailednumber of failed checks

Contents

NameDescription
Medium