UNIQUAC (universal quasichemical) Excess Gibbs free energy model.
With:
:
:
:
:
Differentiating each term of the first compositional derivative respect to $n_j$
Example from: Gmehling et al. (2012) [2]
An example of having a mixture of Water-Ethanol-Bezene at 298.15 K with constant [K]:
Water | Ethanol | Benzene |
---|---|---|
0 | 526.02 | 309.64 |
−318.06 | 0 | −91.532 |
1325.1 | 302.57 | 0 |
use yaeos, only: pr, setup_uniquac, UNIQUAC
integer, parameter :: nc = 3
real(pr) :: rs(nc), qs(nc)
real(pr) :: b(nc, nc)
real(pr) :: n(nc)
real(pr) :: ln_gammas(nc), T
type(UNIQUAC) :: model
rs = [0.92_pr, 2.1055_pr, 3.1878_pr]
qs = [1.4_pr, 1.972_pr, 2.4_pr]
T = 298.15_pr
! Calculate bij from DUij. We need -DU/R to get bij
b(1,:) = [0.0_pr, -526.02_pr, -309.64_pr]
b(2,:) = [318.06_pr, 0.0_pr, 91.532_pr]
b(3,:) = [-1325.1_pr, -302.57_pr, 0.0_pr]
model = setup_uniquac(qs, rs, bij=b)
n = [2.0_pr, 2.0_pr, 8.0_pr]
call model%ln_activity_coefficient(n, T, ln_gammas)
print *, exp(ln_gammas) ! [8.856, 0.860, 1.425]