Calculate natural logarithm of activity coefficients and its derivatives given pressure and temperature.
The activity coefficient is ,
where the mixture uses root_type and each pure fluid
uses its stable root at the same and .
eos = gerg_2008([G2008Components%methane, G2008Components%ethane])
n = [1.0_pr, 1.0_pr]
T = 300.0_pr
P = 1.0_pr
call eos%ln_activity_coefficient(&
n, P, T, root_type="stable", &
lngamma=lngamma, dlngammadP=dlngammadP, &
dlngammadT=dlngammadT, dlngammadn=dlngammadn &
)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Gerg2008), | intent(in) | :: | eos |
Model |
||
| real(kind=pr), | intent(in) | :: | n(:) |
Moles number vector |
||
| real(kind=pr), | intent(in) | :: | P |
Pressure [bar] |
||
| real(kind=pr), | intent(in) | :: | T |
Temperature [K] |
||
| character(len=*), | intent(in) | :: | root_type |
Desired root-type to solve. Options are:
|
||
| real(kind=pr), | intent(out), | optional | :: | lngamma(size(n)) |
Natural logarithm of activity coefficient |
|
| real(kind=pr), | intent(out), | optional | :: | dlngammadP(size(n)) |
|
|
| real(kind=pr), | intent(out), | optional | :: | dlngammadT(size(n)) |
|
|
| real(kind=pr), | intent(out), | optional | :: | dlngammadn(size(n),size(n)) |
|
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=pr), | public | :: | dPdV | ||||
| real(kind=pr), | public | :: | dPdn(size(n)) | ||||
| real(kind=pr), | public | :: | dVdn(size(n)) | ||||
| real(kind=pr), | public | :: | dlnPhi_i_dT(size(n)) | ||||
| real(kind=pr), | public | :: | dlnPhi_i_dT_temp(1) | ||||
| real(kind=pr), | public | :: | dlnPhidT(size(n)) | ||||
| real(kind=pr), | public | :: | dlnPhidn(size(n),size(n)) | ||||
| logical, | public | :: | dn | ||||
| logical, | public | :: | dp | ||||
| logical, | public | :: | dt | ||||
| type(Gerg2008), | public | :: | eos_temp | ||||
| logical, | public | :: | gam | ||||
| integer, | public | :: | i |
Loop/index variable. |
|||
| real(kind=pr), | public | :: | lnPhi(size(n)) |
Log fugacity coefficients. |
|||
| real(kind=pr), | public | :: | lnPhi_i(size(n)) | ||||
| real(kind=pr), | public | :: | lnPhi_i_temp(1) | ||||
| real(kind=pr), | public | :: | npure(size(n)) | ||||
| logical, | public | :: | present_derivs | ||||
| real(kind=pr), | public | :: | vi(size(n)) | ||||
| real(kind=pr), | public | :: | vi_temp |