Skip to content

polykin.copolymerization¤

convert_Qe_to_r ¤

convert_Qe_to_r(
    Qe_values: list[tuple[float, float]]
) -> FloatSquareMatrix

Convert Q-e values to reactivity ratios.

According to the Q-e scheme proposed by Alfrey and Price, the reactivity ratios of the terminal model can be estimated using the relationship:

\[ r_{ij} = \frac{Q_i}{Q_j}\exp{\left(-e_i(e_i -e_j)\right)} \]

where \(Q_i\) and \(e_i\) are monomer-specific constants, and \(r_{ij}=k_{ii}/k_{ij}\) is the multicomponent reactivity ratio matrix.

References

  • T Alfrey, CC Price. J. Polym. Sci., 1947, 2: 101-106.
PARAMETER DESCRIPTION
Qe_values

List (N) of Q-e values.

TYPE: list[tuple[float, float]]

RETURNS DESCRIPTION
FloatSquareMatrix(N, N)

Reactivity ratio matrix.

Examples:

Estimate the reactivity ratio matrix for styrene (1), methyl methacrylate (2), and vinyl acetate(3) using Q-e values from the literature.

>>> from polykin.copolymerization import convert_Qe_to_r
>>>
>>> Qe1 = (1.0, -0.80)    # Sty
>>> Qe2 = (0.78, 0.40)    # MMA
>>> Qe3 = (0.026, -0.88)  # VAc
>>>
>>> convert_Qe_to_r([Qe1, Qe2, Qe3])
array([[1.00000000e+00, 4.90888315e-01, 4.10035538e+01],
       [4.82651046e-01, 1.00000000e+00, 1.79788736e+01],
       [2.42325444e-02, 1.08066091e-02, 1.00000000e+00]])
Source code in src/polykin/copolymerization/multicomponent.py
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
def convert_Qe_to_r(Qe_values: list[tuple[float, float]]
                    ) -> FloatSquareMatrix:
    r"""Convert Q-e values to reactivity ratios.

    According to the Q-e scheme proposed by Alfrey and Price, the reactivity
    ratios of the terminal model can be estimated using the relationship:

    $$ r_{ij} = \frac{Q_i}{Q_j}\exp{\left(-e_i(e_i -e_j)\right)} $$

    where $Q_i$ and $e_i$ are monomer-specific constants, and
    $r_{ij}=k_{ii}/k_{ij}$ is the multicomponent reactivity ratio matrix.

    **References**

    *   T Alfrey, CC Price. J. Polym. Sci., 1947, 2: 101-106.

    Parameters
    ----------
    Qe_values : list[tuple[float, float]]
        List (N) of Q-e values.

    Returns
    -------
    FloatSquareMatrix (N, N)
        Reactivity ratio matrix.

    Examples
    --------
    Estimate the reactivity ratio matrix for styrene (1), methyl
    methacrylate (2), and vinyl acetate(3) using Q-e values from the
    literature.

    >>> from polykin.copolymerization import convert_Qe_to_r
    >>>
    >>> Qe1 = (1.0, -0.80)    # Sty
    >>> Qe2 = (0.78, 0.40)    # MMA
    >>> Qe3 = (0.026, -0.88)  # VAc
    >>>
    >>> convert_Qe_to_r([Qe1, Qe2, Qe3])
    array([[1.00000000e+00, 4.90888315e-01, 4.10035538e+01],
           [4.82651046e-01, 1.00000000e+00, 1.79788736e+01],
           [2.42325444e-02, 1.08066091e-02, 1.00000000e+00]])

    """

    Q = [x[0] for x in Qe_values]
    e = [x[1] for x in Qe_values]
    N = len(Q)

    r = np.empty((N, N))
    for i in range(N):
        for j in range(N):
            r[i, j] = Q[i]/Q[j]*exp(-e[i]*(e[i] - e[j]))

    return r