Skip to content

polykin.thermo.acm¤

FloryHuggins_activity ¤

FloryHuggins_activity(
    phi: FloatVector, m: FloatVector, chi: FloatSquareMatrix
) -> FloatVector

Calculate the activities of a multicomponent mixture according to the Flory-Huggins model.

\[ \ln{a_i} = \ln{\phi_i} + 1 - m_i \left(\sum_j \frac{\phi_j}{m_j} - \sum_j \phi_j \chi_{ij} + \sum_j \sum_{k>j} \phi_j \phi_k \chi_{jk} \right) \]

where \(\phi_i\) are the volume, mass or segment fractions of the components, \(\chi_{ij}\) are the interaction parameters, and \(m_i\) is the characteristic size of the components.

Note

The Flory-Huggins model was originally formulated using the volume fraction as primary composition variable, but many authors prefer mass fractions in order to skip issues with densities, etc. This equation can be used in all cases, as long as \(\phi\) is taken to be the same variable used to estimate \(\chi\). In this particular implementation, the matrix of interaction parameters is independent of molecular size and, thus, symmetric.

References

  • P.J. Flory, Principles of polymer chemistry, 1953.
  • Lindvig, Thomas, et al. "Modeling of multicomponent vapor-liquid equilibria for polymer-solvent systems." Fluid phase equilibria 220.1 (2004): 11-20.
PARAMETER DESCRIPTION
phi

Volume, mass or segment fractions of all components, \(\phi_i\). The composition variable must match the one used in the determination of \(\chi_{ij}\).

TYPE: FloatVector

m

Characteristic size of all components, typically equal to 1 for small molecules and equal to the average degree of polymerization for polymers.

TYPE: FloatVector

chi

Matrix (N,N) of interaction parameters, \(\chi_{ij}\). It is expected (but not checked) that \(\chi_{ij}=\chi_{ji}\) and \(\chi_{ii}=0\).

TYPE: FloatSquareMatrix

RETURNS DESCRIPTION
FloatVector

Activities of all components.

See also
Source code in src/polykin/thermo/acm/floryhuggins.py
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
def FloryHuggins_activity(phi: FloatVector,
                          m: FloatVector,
                          chi: FloatSquareMatrix
                          ) -> FloatVector:
    r"""Calculate the activities of a multicomponent mixture according to the
    Flory-Huggins model.

    $$ 
    \ln{a_i} = \ln{\phi_i} + 1 - m_i \left(\sum_j \frac{\phi_j}{m_j} - 
    \sum_j \phi_j \chi_{ij} + \sum_j \sum_{k>j} \phi_j \phi_k \chi_{jk} \right)
    $$

    where $\phi_i$ are the volume, mass or segment fractions of the
    components, $\chi_{ij}$ are the interaction parameters, and $m_i$ is the
    characteristic size of the components. 

    !!! note

        The Flory-Huggins model was originally formulated using the volume
        fraction as primary composition variable, but many authors prefer mass
        fractions in order to skip issues with densities, etc. This equation
        can be used in all cases, as long as $\phi$ is taken to be the same
        variable used to estimate $\chi$.
        In this particular implementation, the matrix of interaction parameters
        is independent of molecular size and, thus, symmetric.

    **References**

    *   P.J. Flory, Principles of polymer chemistry, 1953.
    *   Lindvig, Thomas, et al. "Modeling of multicomponent vapor-liquid
        equilibria for polymer-solvent systems." Fluid phase equilibria 220.1
        (2004): 11-20.

    Parameters
    ----------
    phi : FloatVector
        Volume, mass or segment fractions of all components, $\phi_i$. The
        composition variable must match the one used in the determination of
        $\chi_{ij}$.
    m : FloatVector
        Characteristic size of all components, typically equal to 1 for small
        molecules and equal to the average degree of polymerization for
        polymers.
    chi : FloatSquareMatrix
        Matrix (N,N) of interaction parameters, $\chi_{ij}$. It is expected
        (but not checked) that $\chi_{ij}=\chi_{ji}$ and $\chi_{ii}=0$.

    Returns
    -------
    FloatVector
        Activities of all components.

    See also
    --------
    * [`FloryHuggins2_activity`](FloryHuggins2_activity.md): equivalent
      method for binary solvent-polymer systems.

    """
    A = dot(phi, 1/m)
    B = dot(chi, phi)
    C = 0.5*dot(phi, dot(phi, chi))
    return phi*exp(1 - m*(A - B + C))