Abstract adapter for volume translations independent of volume and pressure.
With physical volume , base-model volume , and
, the translated residual energy is
Positive translations therefore reduce the physical volume at fixed pressure and temperature.
Volume shift and independent amount/temperature derivatives.
C is always requested. Every other output is optional and must be
computed when present, including when requested individually.
Derivatives hold independent mole amounts fixed, not normalized
mole fractions.
call model%translation(n, T, C, CT=CT)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VolumeTranslatedModel), | intent(in) | :: | self |
Translated model. |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Component mole amounts [mol]. |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K]. |
||
| real(kind=pr), | intent(out) | :: | C |
Total volume translation [L]. |
||
| real(kind=pr), | intent(out), | optional | :: | CT |
Temperature derivative [L/K]. |
|
| real(kind=pr), | intent(out), | optional | :: | CT2 |
Second temperature derivative [L/K^2]. |
|
| real(kind=pr), | intent(out), | optional | :: | Cn(size(n)) |
Amount gradient [L/mol]. |
|
| real(kind=pr), | intent(out), | optional | :: | CTn(size(n)) |
Temperature/amount derivatives [L/(K mol)]. |
|
| real(kind=pr), | intent(out), | optional | :: | Cn2(size(n),size(n)) |
Amount Hessian [L/mol^2]. |
Residual Helmholtz model with a configurable volume-translation law.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| class(ArModel), | public, | allocatable | :: | base |
Owned copy of the untranslated model, available to translation laws. |
||
| type(Substances), | public | :: | components |
Pure-component properties for the model’s component order. |
|||
| character(len=:), | public, | allocatable | :: | name |
Name of the model |
| procedure, public :: Cp_residual_pt | |
| procedure, public :: Cp_residual_vt | |
| procedure, public :: Cv_residual_pt | |
| procedure, public :: Cv_residual_vt | |
| procedure, public :: Psat_pure | |
| procedure, public :: enthalpy_excess | |
| procedure, public :: enthalpy_residual_pt | |
| procedure, public :: enthalpy_residual_vt | |
| procedure, public :: entropy_excess | |
| procedure, public :: entropy_residual_pt | |
| procedure, public :: entropy_residual_vt | |
| procedure, public :: get_v0 => translated_v0 | |
| procedure, public :: gibbs_excess | |
| procedure, public :: gibbs_residual_pt | |
| procedure, public :: gibbs_residual_vt | |
| procedure, public :: helmholtz_excess | |
| procedure, public :: helmholtz_residual_pt | |
| procedure, public :: init | |
| procedure, public :: internal_energy_excess | |
| procedure, public :: internal_energy_residual_pt | |
| procedure, public :: internal_energy_residual_vt | |
| procedure, public :: ln_activity_coefficient | |
| procedure, public :: lnfug_vt | |
| procedure, public :: lnphi_pt | |
| procedure, public :: lnphi_vt | |
| procedure, public :: pressure | |
| procedure, public :: residual_helmholtz => translated_helmholtz | |
| procedure(translation_interface), public, deferred :: translation | |
| procedure, public :: volume => translated_volume | |
| procedure, public :: volume_excess |
Translate the base model’s liquid-volume initializer.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VolumeTranslatedModel), | intent(in) | :: | self |
Translated model. |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Component mole amounts [mol]. |
||
| real(kind=pr), | intent(in) | :: | p |
Pressure [bar]. |
||
| real(kind=pr), | intent(in) | :: | t |
Temperature [K]. |
Translated initial volume [L].
Store an owned copy of the base EOS and its component metadata.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VolumeTranslatedModel), | intent(inout) | :: | self |
Model being initialized. |
||
| class(ArModel), | intent(in) | :: | base |
Untranslated model in the same component order. |
Transform the base residual Helmholtz energy and requested derivatives.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VolumeTranslatedModel), | intent(in) | :: | self |
Translated model. |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Component mole amounts [mol]. |
||
| real(kind=pr), | intent(in) | :: | V |
Physical total volume [L]. |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K]. |
||
| real(kind=pr), | intent(out), | optional | :: | Ar |
Residual Helmholtz energy [bar L]. |
|
| real(kind=pr), | intent(out), | optional | :: | ArV |
Volume derivative [bar]. |
|
| real(kind=pr), | intent(out), | optional | :: | ArT |
Temperature derivative [bar L/K]. |
|
| real(kind=pr), | intent(out), | optional | :: | ArTV |
Temperature/volume derivative [bar/K]. |
|
| real(kind=pr), | intent(out), | optional | :: | ArV2 |
Second volume derivative [bar/L]. |
|
| real(kind=pr), | intent(out), | optional | :: | ArT2 |
Second temperature derivative [bar L/K^2]. |
|
| real(kind=pr), | intent(out), | optional | :: | Arn(size(n)) |
Amount gradient [bar L/mol]. |
|
| real(kind=pr), | intent(out), | optional | :: | ArVn(size(n)) |
Volume/amount derivatives [bar/mol]. |
|
| real(kind=pr), | intent(out), | optional | :: | ArTn(size(n)) |
Temperature/amount derivatives [bar L/(K mol)]. |
|
| real(kind=pr), | intent(out), | optional | :: | Arn2(size(n),size(n)) |
Amount Hessian [bar L/mol^2]. |
Preserve the base model’s volume solver and translate its result.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VolumeTranslatedModel), | intent(in) | :: | eos |
Translated model. |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Component mole amounts [mol]. |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar]. |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K]. |
||
| real(kind=pr), | intent(out) | :: | V |
Physical total volume [L]. |
||
| character(len=*), | intent(in) | :: | root_type |
Desired root-type to solve. Options are: `[“liquid”, “vapor”, “stable”] |