Base type for hyperdual excess-Gibbs models.
Concrete extensions implement the hyperdual-valued Ge function.
This adapter evaluates it with derivative seeds in composition and
temperature, then provides the GeModel excess-Gibbs derivative API.
See the UNIFAC implementation for a model using hyperdual AD.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(Substances), | public | :: | components |
Pure-component properties for the model’s component order. |
Evaluate the model’s primal excess-Gibbs energy in hyperdual form.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(GeModelAdiff) | :: | self |
Concrete GE model; passed-object dummy. |
|||
| type(hyperdual), | intent(in) | :: | n(:) |
Component mole amounts as hyperdual values. |
||
| type(hyperdual), | intent(in) | :: | t |
Temperature as a hyperdual value. |
Calculate Excess heat capacity.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(GeModel), | intent(in) | :: | self |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles vector |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(out) | :: | Cpe |
Excess heat capacity [bar L / K] |
Calculate Excess enthalpy and its derivatives.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(GeModel), | intent(in) | :: | self |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles vector |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(out), | optional | :: | He |
Excess enthalpy |
|
| real(kind=pr), | intent(out), | optional | :: | HeT |
|
|
| real(kind=pr), | intent(out), | optional | :: | Hen(:) |
|
Calculate Excess entropy and its derivatives.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(GeModel), | intent(in) | :: | self |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles vector |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(out), | optional | :: | Se |
Excess entropy |
|
| real(kind=pr), | intent(out), | optional | :: | SeT |
|
|
| real(kind=pr), | intent(out), | optional | :: | Sen(:) |
|
Evaluate excess Gibbs energy and requested derivatives by AD.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(GeModelAdiff), | intent(in) | :: | self |
Model providing the hyperdual |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Component mole amounts [mol]. |
||
| real(kind=pr), | intent(in) | :: | t |
Temperature [K]. |
||
| real(kind=pr), | intent(out), | optional | :: | Ge |
Excess Gibbs energy. |
|
| real(kind=pr), | intent(out), | optional | :: | GeT |
Temperature derivative of excess Gibbs energy. |
|
| real(kind=pr), | intent(out), | optional | :: | GeT2 |
Second temperature derivative of excess Gibbs energy. |
|
| real(kind=pr), | intent(out), | optional, | dimension(size(n)) | :: | Gen |
Mole-number gradient of excess Gibbs energy. |
| real(kind=pr), | intent(out), | optional, | dimension(size(n)) | :: | GeTn |
Mixed temperature/mole-number derivative of excess Gibbs energy. |
| real(kind=pr), | intent(out), | optional | :: | Gen2(size(n),size(n)) |
Hessian with respect to component mole amounts. |
Calculate natural logarithm of activity coefficients.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(GeModel), | intent(in) | :: | self |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles vector |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(out), | optional | :: | lngamma(:) |
Natural logarithm of activity coefficients |
|
| real(kind=pr), | intent(out), | optional | :: | dlngammadT(size(n)) |
|
|
| real(kind=pr), | intent(out), | optional | :: | dlngammadn(size(n),size(n)) |
|