Shared thermodynamic equations used by activity-coefficient model implementations.
Implements the Huron-Vidal-modified NRTL excess Gibbs energy and its
derivatives with respect to mole amounts and temperature, plus helpers
for the temperature dependence of . These kernels are used
internally by the public NRTL and NRTLHV models.
The NRTL and NRTLHV models call these kernels; application code
should use their model methods.
This subroutine calculates the excess Gibbs energy and its derivatives for a mixture using the NRTL model modified by Huron and Vidal. The NRTL model accounts for non-ideal interactions between components in a mixture. The expression for the excess Gibbs energy is:
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=pr), | intent(in) | :: | n(:) |
Number of moles vector. |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(in) | :: | b(:) |
parameter |
||
| real(kind=pr), | intent(in) | :: | alpha(:,:) |
matrix |
||
| real(kind=pr), | intent(in) | :: | tau(:,:) |
matrix |
||
| real(kind=pr), | intent(in) | :: | dtaudt(:,:) |
First derivative of with respect to temperature |
||
| real(kind=pr), | intent(in) | :: | dtaudt2(:,:) |
Second derivative of with respect to temperature |
||
| real(kind=pr), | intent(out), | optional | :: | Ge |
Excess Gibbs energy |
|
| real(kind=pr), | intent(out), | optional | :: | Gen(:) |
Excess Gibbs energy derivative with repect to number of moles |
|
| real(kind=pr), | intent(out), | optional | :: | GeT |
Excess Gibbs energy derivative with respect to temperature |
|
| real(kind=pr), | intent(out), | optional | :: | GeT2 |
Excess Gibbs energy second derivative with respect to temperature |
|
| real(kind=pr), | intent(out), | optional | :: | GeTn(:) |
Excess Gibbs energy derivative with respect to temperature and number of moles |
|
| real(kind=pr), | intent(out), | optional | :: | Gen2(:,:) |
Excess Gibbs energy second derivative with respect to number of moles |
Temperature dependent parameters for NRTL model
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(in) | :: | gij |
Interaction parameters |
||
| real(kind=pr), | intent(out) | :: | tau |
matrix |
||
| real(kind=pr), | intent(out) | :: | dtaudt |
First derivative of with respect to temperature |
||
| real(kind=pr), | intent(out) | :: | dtaudt2 |
Second derivative of with respect to temperature |
Temperature dependent parameters for NRTL model. The temperature dependence is linear:
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| real(kind=pr), | intent(in) | :: | A |
Interaction parameters |
||
| real(kind=pr), | intent(in) | :: | B |
Interaction parameters |
||
| real(kind=pr), | intent(out) | :: | tau |
matrix |
||
| real(kind=pr), | intent(out) | :: | dtaudt |
First derivative of with respect to temperature |
||
| real(kind=pr), | intent(out) | :: | dtaudt2 |
Second derivative of with respect to temperature |