Calculate excess Gibbs energy and its derivatives given pressure and temperature.
eos = PengRobinson76(Tc, Pc, w)
n = [1.0_pr, 1.0_pr]
T = 300.0_pr
P = 1.0_pr
call eos%gibbs_excess(&
n, P, T, root_type="stable", &
Ge=Ge, GeP=GeP, GeT=GeT, Gen=Gen &
)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ArModel), | 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 | :: | Ge |
Excess Gibbs energy [bar L] |
|
| real(kind=pr), | intent(out), | optional | :: | GeP |
|
|
| real(kind=pr), | intent(out), | optional | :: | GeT |
|
|
| real(kind=pr), | intent(out), | optional | :: | Gen(size(n)) |
|
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=pr), | private | :: | dlngammadP(size(n)) | ||||
| real(kind=pr), | private | :: | dlngammadT(size(n)) | ||||
| real(kind=pr), | private | :: | dlngammadn(size(n),size(n)) | ||||
| logical, | private | :: | dn | ||||
| logical, | private | :: | dp | ||||
| logical, | private | :: | dt | ||||
| integer, | private | :: | j | ||||
| real(kind=pr), | private | :: | lngamma(size(n)) | ||||
| logical, | private | :: | present_derivs |