modelAncillary_density_pT_Soave
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
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nT | 20 | number of temperatures between TMIN and TMAX |
| Integer | np | 20 | number of pressures between p_low and PMAX, logarithmically spaced |
| Real | tol_vap | 0.1 | tolerance for abs(log(d_RKS/d_EoS)) in the vapour region |
| Real | tol_dense | 1.0 | tolerance for abs(log(d_RKS/d_EoS)) in the liquid and supercritical region |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Real | maxErr_vap | largest abs(log(d_RKS/d_EoS)), vapour | |
| Real | maxErr_liq | largest abs(log(d_RKS/d_EoS)), liquid | |
| Real | maxErr_sup | largest abs(log(d_RKS/d_EoS)), supercritical | |
| Integer | nFailed | number of failed checks |
Contents
| Name | Description |
|---|---|