polykin.copolymerization¤
transitions_multi ¤
transitions_multi(
f: FloatVectorLike, r: FloatSquareMatrix
) -> FloatSquareMatrix
Calculate the instantaneous transition probabilities for a multicomponent system.
For a multicomponent system, the transition probabilities are given by:
where \(f_i\) is the molar fraction of monomer \(i\) and \(r_{ij}=k_{ii}/k_{ij}\) is the multicomponent reactivity ratio matrix.
References
- NA Dotson, R Galván, RL Laurence, and M Tirrel. Polymerization process modeling, Wiley, 1996, p. 178.
PARAMETER | DESCRIPTION |
---|---|
f
|
Vector of instantaneous monomer compositions, \(f_i\).
TYPE:
|
r
|
Matrix of reactivity ratios, \(r_{ij}=k_{ii}/k_{ij}\).
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FloatSquareMatrix(N, N)
|
Matrix of transition probabilities, \(P_{ij}\). |
See also
inst_copolymer_multi
: instantaneous copolymer composition.sequence_multi
: instantaneous sequence lengths.tuples_multi
: instantaneous tuple fractions.
Examples:
>>> from polykin.copolymerization import transitions_multi
>>> import numpy as np
Define reactivity ratio matrix.
>>> r = np.ones((3, 3))
>>> r[0, 1] = 0.2
>>> r[1, 0] = 2.3
>>> r[0, 2] = 3.0
>>> r[2, 0] = 0.9
>>> r[1, 2] = 0.4
>>> r[2, 1] = 1.5
Evaluate transition probabilities.
>>> f = [0.5, 0.3, 0.2]
>>> P = transitions_multi(f, r)
>>> P
array([[0.24193548, 0.72580645, 0.03225806],
[0.21367521, 0.29487179, 0.49145299],
[0.58139535, 0.20930233, 0.20930233]])
Source code in src/polykin/copolymerization/multicomponent.py
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 |
|