Group Contribution Methods
Group contribution methods (GCMs) estimate the properties of a pure compound from the structural groups that make up its molecule. Each group contributes a predefined value to a target property, and the property is a function of the sum of these contributions. GCMs need only the structure of a compound, so they can predict properties of compounds that have not been measured. FuelLib uses GCMs for the compound properties that are not available as reference data (see FuelLib’s property prediction methodology).
Notation
A tilde denotes a molar property (e.g., \(\tilde{C}_{p,i}\) in J/mol/K and \(\Delta\tilde{H}_{v,i}\) in J/mol), while the same symbol without a tilde denotes the corresponding mass-based property (e.g., \(C_{p,i}\) in J/kg/K and \(\Delta H_{v,i}\) in J/kg). The subscript i denotes the i-th compound in a mixture.
Core concepts
The groups of a GCM are defined by the method. First-order groups describe
each atom with its attached hydrogens and bonds (e.g., CH3, CH2,
ACH), and every non-hydrogen atom of a compound belongs to exactly one
first-order group. Second-order groups describe larger structures, such as
rings or adjacent branches, and correct the first-order estimate. For a
mixture of \(N_c\) compounds, the group decomposition is a matrix whose
entry in row i and column k is the number of groups k in compound i.
FuelLib includes four GCMs, each in its own module of fuellib.gcm:
Method |
Module |
Properties |
Decomposition |
|---|---|---|---|
|
Critical properties, boiling and melting points, enthalpies, acentric factor, molar volume, and heat capacity |
|
|
|
Liquid viscosity parameters |
|
|
|
Volume and surface parameters, activity coefficients |
|
|
|
Entropy of fusion |
|
The group contributions of each method are stored in fuellib/gcm/<method>.csv,
and the group decompositions of the Reference Compounds are stored in
fuellib/data/ref_<method>.csv. Each method is registered in a
GCMRegistry that evaluates its properties for a
Fuel (see GCM Registry):
from fuellib import Fuel
from fuellib.gcm import GCMRegistry
fuel = Fuel("posf10325")
gani = GCMRegistry.get_gcm("gani")
gani.predict("tc", fuel) # Quantity1D of critical temperatures
Decomposing SMILES strings
The gani, nannoolal, and unifac modules each provide a
decompose function that builds a group decomposition from a SMILES string
with RDKit SMARTS patterns. It returns a single-row pandas.DataFrame,
indexed by the SMILES string, with a column for every group of the method:
from fuellib.gcm.gani import decompose
counts = decompose("CCc1ccccc1")
counts.loc[:, (counts != 0).any()]
A ValueError is raised if the SMILES cannot be parsed or an atom is
not matched to a first-order group. The same functionality is available from
the command line as fl decompose (see Command-Line Interface (CLI) Tools). The
decompositions are used to add custom compounds (see
Adding Custom Fuels).
Warning
Automated decompositions must be verified. A known shortcoming of the
gani decomposition is indene, where the non-aromatic C=C bond is
categorized as a CH group.
Constantinou and Gani
fuellib.gcm.gani implements the GCM of Constantinou and
Gani[1][2], with
additions from Govindaraju and Ihme[3]. It
predicts most of the compound properties at standard conditions. The
properties that can be measured (e.g., tc)
use reference values from ref_compounds.csv when available and the
gani predictions otherwise (see Reference Property Data).
Table of Constantinou and Gani properties
Table of Constantinou and Gani properties outlines the properties of the i-th compound in a
mixture, which depend on the k-th first-order and j-th second-order group
contributions. Each property is registered as a gani property function
(e.g., \(T_{c,i}\) as tc and \(\Delta\tilde{H}_{f,i}\) as hf).
Property |
Units |
Group Contributions |
Units |
Description |
|---|---|---|---|---|
\(T_{c,i}\) |
K |
\(t_{c1k}\), \(t_{c2j}\) |
1 |
Critical temperature[1]. |
\(p_{c,i}\) |
Pa |
\(p_{c1k}\), \(p_{c2j}\) |
bar-0.5 |
Critical pressure[1]. |
\(V_{c,i}\) |
m3/mol |
\(v_{c1k}\), \(v_{c2j}\) |
m3/kmol |
Critical volume[1]. |
\(T_{b,i}\) |
K |
\(t_{b1k}\), \(t_{b2j}\) |
1 |
Normal boiling point[1]. |
\(T_{m,i}\) |
K |
\(t_{m1k}\), \(t_{m2j}\) |
1 |
Normal melting point[1]. |
\(\Delta\tilde{H}_{f,i}\) |
J/mol |
\(h_{f1k}\), \(h_{f2j}\) |
kJ/mol |
Enthalpy of formation at 298 K[1]. |
\(\Delta\tilde{G}_{f,i}\) |
J/mol |
\(g_{f1k}\), \(g_{f2j}\) |
kJ/mol |
Standard Gibbs free energy at 298 K[1]. |
\(\Delta\tilde{H}_{v,\textit{stp},i}\) |
J/mol |
\(h_{v1k}\), \(h_{v2j}\) |
kJ/mol |
Enthalpy of vaporization at 298 K[1]. |
\(\omega_i\) |
1 |
\(\omega_{1k}\), \(\omega_{2j}\) |
1 |
Acentric factor[2]. |
\(V_{m,\textit{stp},i}\) |
m3/mol |
\(v_{m1k}\), \(v_{m2j}\) |
m3/kmol |
Liquid molar volume at 298 K[2]. |
\(\tilde{C}_{p,i}\) |
J/mol/K |
\(C_{pA1_k}\), \(C_{pA2_k}\),… |
J/mol/K |
The gani method also registers the Ruzicka-Domalski heat capacity
coefficients rd_a, rd_b, and rd_d[6]
and the flash point contributions alibakhshi_phi[7],
which are used by the Individual component properties (fuellib.correlate.components).
Equations for Constantinou and Gani properties
The properties of each compound in a mixture can be calculated as the sum of contributions from the first- and second-order groups that make up the compound. For a given mixture, let \(\mathbf{N}\) be an \(N_c \times N_{g_1}\) matrix that represents the number of first-order groups in each compound, where \(N_c\) is the number of compounds in the mixture and \(N_{g_1}\) is the total number of first-order groups as defined by Constantinou and Gani[1][2]. Similarly, let \(\mathbf{M}\) be an \(N_c \times N_{g_2}\) matrix that specifies the number of second-order groups in each compound, where \(N_{g_2}\) is the total number of second-order groups. The total number of groups \(N_g = N_{g_1} + N_{g_2} = 121\). The GCM properties for the i-th compound in the mixture are calculated as follows[1] [2] [5]:
The decomposition matrices \(\mathbf{N}\) and \(\mathbf{M}\) are read
from ref_gani.csv as Fuel._gani_decomp, and the group contributions
(\(t_{c1k}\), \(t_{b1k}\), …) are read from fuellib/gcm/gani.csv.
Nannoolal
fuellib.gcm.nannoolal implements the saturated liquid viscosity GCM of
Nannoolal et al.[8]. The group
contributions are read from fuellib/gcm/nannoolal.csv, which has one row
per first- or second-order group and columns for the group Order, matching
Priority, and the dBv and Tv contributions. The decomposition
matrix \(\mathbf{N}\) contains both first- and second-order groups and is
read from ref_nannoolal.csv as Fuel._nannoolal_decomp.
Table of Nannoolal properties
Property |
Units |
Group Contributions |
Units |
Description |
|---|---|---|---|---|
\(dBv_i\) |
1 |
\(\widetilde{dBv}_k\) |
1 |
Slope of the viscosity curve[8]. |
\(T_{v,i}\) |
K |
\(\widetilde{T}_{v,k}\) |
1 |
Viscosity reference temperature[8]. |
The nannoolal method registers the dimensionless group sums as dbv and
tv:
from fuellib.gcm import nannoolal_gcm
nannoolal_gcm.predict("dbv", fuel) # dimensionless Quantity1D
nannoolal_gcm.predict("tv", fuel) # dimensionless Quantity1D
Equations for Nannoolal properties
The tabulated group contributions are \(\widetilde{dBv}_k\) and \(\widetilde{T}_{v,k}\), whereas \(dBv_i\) and \(T_{v,i}\) are compound parameters calculated from the group sums and the normal boiling point:
where \(n_i\) is the number of non-hydrogen atoms of the compound. These
corrections are applied by
viscosity_dynamic_nannoolal(), which gives
the dynamic viscosity (see Kinematic viscosity).
Some groups have no published viscosity contribution. Groups stored as
0.0 (>C=C=C<, -C#C-C#C-, C2C-CC2, and Ortho-pair(s))
trigger a UserWarning listing the affected compounds. Groups with no
value (C3C-CC2 and C3C-CC3) propagate NaN to the compounds that
contain them.
Nannoolal decomposition
fuellib.gcm.nannoolal.decompose() matches first-order groups with RDKit
SMARTS patterns in order of the Nannoolal priority, and each atom is assigned
to only one first-order group. Second-order groups are additive and are
counted from SMARTS matches and structural checks: the number of hydrogens
(No hydrogen, One hydrogen), non-aromatic three-, four-, and
five-membered rings (3/4 ring, 5 ring), and ortho, meta, or para
substituent pairs on benzene rings (counted only when a single pair type is
present). The same functionality is available as
fl decompose --method nannoolal.
UNIFAC
fuellib.gcm.unifac implements the UNIFAC 2.0 activity coefficient
model of Hayer et al.[9]. UNIFAC 2.0 keeps the
UNIFAC subgroup volume and surface parameters, \(R_k\) and \(Q_k\), and
replaces the main-group interaction parameters \(a_{mn}\) with a complete
table obtained with machine learning. The parameters are read from two files:
fuellib/gcm/unifac.csv: one column per subgroup with its subgroup number, name, main group number and name, and theRandQparameters. The table has two subgroups namedCHO; the second is renamedCHO.1.fuellib/gcm/unifac_amn.csv: the interaction parameters \(a_{mn}\) in K, with rows \(m\) and columns \(n\) indexed by main group number.
The decomposition matrix \(\boldsymbol{\nu}\), where \(\nu_{ki}\) is
the number of subgroups \(k\) in compound \(i\), is read from
ref_unifac.csv as Fuel._unifac_decomp.
Table of UNIFAC properties
Property |
Units |
Group Contributions |
Units |
Description |
|---|---|---|---|---|
\(r_i\) |
1 |
\(R_k\) |
1 |
Volume parameter[9]. |
\(q_i\) |
1 |
\(Q_k\) |
1 |
Surface parameter[9]. |
\(\ln \gamma_i\) |
1 |
\(a_{mn}\) |
K |
Activity coefficient in the liquid mixture[9]. |
The unifac method registers \(r_i\) and \(q_i\) as r and q:
from fuellib.gcm import unifac_gcm
unifac_gcm.predict("r", fuel) # dimensionless Quantity1D
unifac_gcm.predict("q", fuel) # dimensionless Quantity1D
Equations for UNIFAC properties
The volume and surface parameters of the i-th compound are
The activity coefficient of the i-th compound is the sum of a combinatorial and a residual part, \(\ln \gamma_i = \ln \gamma_i^C + \ln \gamma_i^R\). The combinatorial part accounts for differences in molecular size and shape:
where \(x_j\) are the liquid mole fractions. The residual part accounts for the interactions between subgroups:
where \(\Gamma_k\) is the residual activity coefficient of subgroup
\(k\) in the mixture and \(\Gamma_k^{(i)}\) is the same quantity in pure
compound \(i\). The interaction parameter \(a_{mn}\) of two subgroups
is that of their main groups, and \(a_{mm} = 0\). Subgroups of the same
main group (for example CH3 and CH2) therefore do not contribute to the
residual part.
fuellib.gcm.unifac.ln_gamma() evaluates \(\ln \gamma_i\) for a fuel at
temperature temp. The composition is given as liquid mass fractions yi
(default: y0) and converted to mole fractions.
For repeated evaluations, such as in a solver loop,
parameters() collects the arrays
\(\boldsymbol{\nu}\), \(R_k\), \(Q_k\), and \(a_{mn}\) for the
subgroups present in the fuel once, and
ln_gamma_x() evaluates \(\ln \gamma_i\) with
plain NumPy arrays from mole fractions and a temperature in K:
from fuellib import Fuel, Units
from fuellib.gcm import unifac
fuel = Fuel("posf10325")
unifac.ln_gamma(fuel, Units.Quantity(300.0, "K")) # dimensionless Quantity1D
params = unifac.parameters(fuel)
x = fuel.comps.y2x(fuel.y0).to("dimensionless").magnitude
unifac.ln_gamma_x(x, 300.0, *params) # NumPy array
UNIFAC decomposition
fuellib.gcm.unifac.decompose() matches only the hydrocarbon subgroups,
in order of priority: ACCH3, ACCH2, ACCH, ACH, AC,
CH2=CH, CH=CH, CH2=C, CH=C, C=C, CH3, CH2, CH,
and C. A ValueError is raised if an atom is not matched to a
subgroup, for example a heteroatom. The same functionality is available as
fl decompose --method unifac.
Boehm
fuellib.gcm.boehm provides the entropy of fusion of each compound
following Boehm et al.[10], which is used by the
mixture freeze point (see Mixture freeze point). Rather than a
group decomposition, it uses the hydrocarbon family from the Family column
of ref_compounds.csv (available as fuel.components_data["Family"]) and
the carbon number of each compound. The families are n-alkane,
isoalkane, alkene, monocycloalkane, dicycloalkane,
tricycloalkane, alkylbenzene, cycloaromatic, and diaromatic.
Table of Boehm properties
Property |
Units |
Family Parameters |
Units |
Description |
|---|---|---|---|---|
\(\Delta S_{\textit{fus},i}\) |
J/mol/K |
\(A_f\), \(B_f\), \(C_{\textit{ref},f}\) |
J/mol/K |
Entropy of fusion[10]. |
The boehm method registers \(\Delta S_{\textit{fus},i}\) as ds_fus:
from fuellib.gcm import boehm_gcm
boehm_gcm.predict("ds_fus", fuel) # Quantity1D in J/(mol*K)
Equations for Boehm properties
The entropy of fusion is a linear function of the carbon number
\(n_{C,i}\), with parameters \(A_f\), \(B_f\), and
\(C_{\textit{ref},f}\) for family \(f\) read from
fuellib/gcm/boehm.csv:
Compounds whose family is not in the table fall back to the Walden-rule value of 56.5 J/mol/K.