Evaluate the reduced Gibbs energy, its gradient and its Hessian with respect to the heavy-phase mole numbers.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(BaseModel), | intent(in) | :: | model |
Thermodynamic model. |
||
| real(kind=pr), | intent(in) | :: | z(:) |
Global mole numbers (1 mol feed) |
||
| real(kind=pr), | intent(in) | :: | l(:) |
Heavy-phase mole numbers |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar] |
||
| character(len=*), | intent(in) | :: | light_root |
Volume-root choice for the light phase. |
||
| real(kind=pr), | intent(out) | :: | Gibbs |
|
||
| real(kind=pr), | intent(out) | :: | g(:) |
Gradient |
||
| real(kind=pr), | intent(out) | :: | H(:,:) |
Hessian |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=pr), | private | :: | Ltot | ||||
| real(kind=pr), | private | :: | Vtot | ||||
| real(kind=pr), | private | :: | dlnphi_l(size(z),size(z)) | ||||
| real(kind=pr), | private | :: | dlnphi_v(size(z),size(z)) | ||||
| integer, | private | :: | i |
Loop index |
|||
| integer, | private | :: | j |
Loop index |
|||
| real(kind=pr), | private | :: | lnphi_l(size(z)) | ||||
| real(kind=pr), | private | :: | lnphi_v(size(z)) | ||||
| integer, | private | :: | nc |
Number of components. |
|||
| real(kind=pr), | private | :: | v(size(z)) | ||||
| real(kind=pr), | private | :: | x(size(z)) | ||||
| real(kind=pr), | private | :: | y(size(z)) |
Light-phase composition. |