Transform the base residual Helmholtz energy and requested derivatives.
Applies the chain rule at , including the ideal-reference correction. Base derivatives are requested according to the outputs and their chain-rule dependencies.
call model%residual_helmholtz(n, V, T, ArT2=ArT2)
| 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]. |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=pr), | private | :: | ArTV_base |
Base residual temperature/volume derivative [bar/K]. |
|||
| real(kind=pr), | private | :: | ArV2_base |
Base residual second volume derivative [bar/L]. |
|||
| real(kind=pr), | private | :: | ArV_base |
Base residual volume derivative [bar]. |
|||
| real(kind=pr), | private | :: | ArVn_base(size(n)) |
Base residual volume/amount gradient [bar/mol]. |
|||
| real(kind=pr), | private | :: | C |
Extensive volume translation [L]. |
|||
| real(kind=pr), | private | :: | CT |
Translation temperature derivative [L/K]. |
|||
| real(kind=pr), | private | :: | CT2 |
Translation second temperature derivative [L/K^2]. |
|||
| real(kind=pr), | private | :: | CTn(size(n)) |
Translation temperature/amount gradient [L/(K mol)]. |
|||
| real(kind=pr), | private | :: | C_VW |
Stable difference 1/V-1/W [1/L]. |
|||
| real(kind=pr), | private | :: | Cn(size(n)) |
Translation amount gradient [L/mol]. |
|||
| real(kind=pr), | private | :: | Cn2(size(n),size(n)) |
Translation amount Hessian [L/mol^2]. |
|||
| real(kind=pr), | private | :: | NR |
Total amount times R [bar L/K]. |
|||
| real(kind=pr), | private | :: | NRT |
Total amount times RT [bar L]. |
|||
| real(kind=pr), | private | :: | W |
Base-model total volume V+C [L]. |
|||
| logical, | private | :: | dT |
Temperature derivative ArT was requested. |
|||
| logical, | private | :: | dT2 |
Second temperature derivative ArT2 was requested. |
|||
| logical, | private | :: | dTV |
Temperature/volume derivative ArTV was requested. |
|||
| logical, | private | :: | dTn |
Temperature/amount gradient ArTn was requested. |
|||
| logical, | private | :: | dV |
Volume derivative ArV was requested. |
|||
| logical, | private | :: | dV2 |
Second volume derivative ArV2 was requested. |
|||
| logical, | private | :: | dVn |
Volume/amount gradient ArVn was requested. |
|||
| logical, | private | :: | dn |
Amount gradient Arn was requested. |
|||
| logical, | private | :: | dn2 |
Amount Hessian Arn2 was requested. |
|||
| logical, | private | :: | energy_requested |
Residual energy Ar was requested. |
|||
| integer, | private | :: | i |
Row index of the amount Hessian. |
|||
| integer, | private | :: | j |
Column index of the amount Hessian. |
|||
| real(kind=pr), | private | :: | log_ratio |
Logarithm of physical/base total volume ratio, log(V/W). |