Skip to content

polykin.kinetics.emulsion¤

nbar_Ugelstad ¤

nbar_Ugelstad(
    alpha: float,
    m: float,
    *,
    tol: float = 1e-10,
    maxiter: int = 100
) -> float

Average number of radicals per particle according to the Ugelstad-Mørk exact quasi-steady-state solution.

\[ \bar{n} = \frac{1}{2} \frac{2 \alpha}{m + \frac{2 \alpha}{m + 1 + \frac{2 \alpha}{m + 2 + \frac{2 \alpha}{m + 3 + ...}}}} \]

The continued fraction is evaluated using Lentz's modified method.

References

  • Ugelstad J., Mörk P.C. and Aasen J.O., Kinetics of emulsion polymerization. J. Polym. Sci. A-1 Polym. Chem., 1967; 5:2281-2288.
Note

Included mainly for historical completeness. Today, the Stockmayer-O'Toole solution is preferred: it is equally exact, simpler to evaluate, and numerically stable for large α and m.

PARAMETER DESCRIPTION
alpha

Dimensionless entry frequency.

TYPE: float

m

Dimensionless desorption frequency.

TYPE: float

tol

Tolerance for convergence of the continued fraction evaluation.

TYPE: float DEFAULT: 1e-10

maxiter

Maximum number of iterations for the continued fraction evaluation.

TYPE: int DEFAULT: 100

RETURNS DESCRIPTION
float

Average number of radicals per particle.

See Also

Examples:

Evaluate the average number of radicals per particle for α=1e-2 and m=1e-4.

>>> from polykin.kinetics import nbar_Ugelstad
>>> nbar = nbar_Ugelstad(alpha=1e-2, m=1e-4)
>>> print(f"nbar = {nbar:.2e}")
nbar = 5.02e-01
Source code in src/polykin/kinetics/emulsion/smithewart.py
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
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
def nbar_Ugelstad(
    alpha: float,
    m: float,
    *,
    tol: float = 1e-10,
    maxiter: int = 100,
) -> float:
    r"""Average number of radicals per particle according to the Ugelstad-Mørk exact
    quasi-steady-state solution.

    $$ \bar{n} = \frac{1}{2}
      \frac{2 \alpha}{m +
      \frac{2 \alpha}{m + 1 +
      \frac{2 \alpha}{m + 2 + \frac{2 \alpha}{m + 3 + ...}}}} $$

    The continued fraction is evaluated using Lentz's modified method.

    **References**

    *   Ugelstad J., Mörk P.C. and Aasen J.O., Kinetics of emulsion polymerization.
        J. Polym. Sci. A-1 Polym. Chem., 1967; 5:2281-2288.

    Note
    ----
    Included mainly for historical completeness. Today, the Stockmayer-O'Toole solution is
    preferred: it is equally exact, simpler to evaluate, and numerically stable for large
    α and m.

    Parameters
    ----------
    alpha : float
        Dimensionless entry frequency.
    m : float
        Dimensionless desorption frequency.
    tol : float
        Tolerance for convergence of the continued fraction evaluation.
    maxiter : int
        Maximum number of iterations for the continued fraction evaluation.

    Returns
    -------
    float
        Average number of radicals per particle.

    See Also
    --------
    * [`nbar_Stockmayer_OToole`](nbar_Stockmayer_OToole.md):
      Preferred exact solution; simpler and numerically robust.
    * [`nbar_Li_Brooks`](nbar_Li_Brooks.md):
      Approximate solution; typically an order of magnitude faster.

    Examples
    --------
    Evaluate the average number of radicals per particle for α=1e-2 and m=1e-4.
    >>> from polykin.kinetics import nbar_Ugelstad
    >>> nbar = nbar_Ugelstad(alpha=1e-2, m=1e-4)
    >>> print(f"nbar = {nbar:.2e}")
    nbar = 5.02e-01
    """
    tiny = 1e-30
    a = 2.0 * alpha
    delta = 1e99

    # Initial denominator term (b0 = m)
    f = max(m, tiny)
    C = f
    D = 0.0

    for k in range(1, maxiter + 1):
        b = m + k

        D = 1.0 / max(b + a * D, tiny)
        C = max(b + a / C, tiny)

        delta = C * D
        f *= delta

        if abs(delta - 1.0) < tol:
            return alpha / f

    raise ConvergenceError(
        f"Lentz method failed to converge after {maxiter} iterations "
        f"(alpha={alpha}, m={m}, tol={tol}). "
        f"Final |delta-1|={abs(delta - 1):.3e}, F={f:.6e}"
    )