In this sections we will describe the equations and its derivatives of UNIFAC models.
Each UNIFAC model is differentiated by the list of available functional groups, the interaction parameters between functional groups, the value of the exponent in the combinatorial term, and the function of temperature used in the residual term. Check the section of each model for more specific details of each model. Let’s begin:
UNIFAC (UNIQUAC Functional-group Activity Coefficients) is an Excess Gibbs free energy model used to estimate activity coefficients in non-ideal mixtures. It is particularly useful for predicting the phase behavior of chemical mixtures, including liquid-liquid equilibrium (LLE) and vapor-liquid equilibrium (VLE). In this model the Excess Gibbs free energy is calculated from the contribution of a combinatorial term and a residual term.
Being:
Combinatorial: Accounts for the size and shape of the molecules.
Residual: Accounts for the energy interactions between different functional groups.
Each substance of a mixture modeled with UNIFAC must be represented by a list a functional groups and other list with the ocurrence of each functional group on the substance.
Combinatorial term has two parameters and that could be modified.
The parameter is always set to 10, and the parameter is set to 1
for the Classic Liquid-Vapor UNIFAC model and the PSRK-UNIFAC model, and 3/4
for the Dortmund-UNIFAC model. Both could be changed (they are attributes of
the UNIFAC objects (z and d respectively)).
Calculate the UNIFAC combinatorial term of reduced Gibbs excess energy. The subroutine uses the Flory-Huggins and Staverman-Guggenheim combinatory terms as follows:
The complete combinatorial term is given by the sum of the Flory-Huggins and Staverman-Guggenheim terms:
Evaluate the UNIFAC residual term. Check the temperature function . This temperature function is different for each UNIFAC model. The residual Gibbs excess energy and its derivatives are evaluated as:
With:
In the UNIFAC model, the values are calculated assuming that the molecule “i” is pure, hence only the subgroups of the molecule “i” must be considered for the calculation. On the other hand, for the values, all the system’s subgroups are considered.
With:
With:
With:
On each specific UNIFAC model section we will give more examples of each specific model. Here we leave a simple example for the classic Liquid-Vapor UNIFAC model.
We can instantiate a UNIFAC model with a mixture ethanol-water and evaluate the logarithm of activity coefficients of the model for a 0.5 mole fraction of each, and a temperature of 298.0 K.
use yaeos__constants, only: pr
use yaeos__models_ge_group_contribution_unifac, only: Groups, UNIFAC, setup_unifac
! Variables declarations
type(UNIFAC) :: model
type(Groups) :: molecules(2)
real(pr) :: ln_gammas(2)
! Variables instances
! Ethanol definition [CH3, CH2, OH]
molecules(1)%groups_ids = [1, 2, 14] ! Subgroups ids
molecules(1)%number_of_groups = [1, 1, 1] ! Subgroups occurrences
! Water definition [H2O]
molecules(2)%groups_ids = [16]
molecules(2)%number_of_groups = [1]
! Model setup
model = setup_unifac(molecules)
! Calculate ln_gammas
call model%ln_activity_coefficient([0.5_pr, 0.5_pr], 298.0_pr, ln_gammas)
print *, ln_gammas
You will obtain:
>>> 0.18534142000449058 0.40331395945417559