Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New model for randomly branched polycondensates #588

Open
gonzalezma opened this issue Jan 18, 2024 · 3 comments
Open

New model for randomly branched polycondensates #588

gonzalezma opened this issue Jan 18, 2024 · 3 comments

Comments

@gonzalezma
Copy link
Contributor

An ILL colleague (Apostolos Vagias, working now in D22) would like to have the model described in an old paper: "ANGULAR DISTRIBUTION OF RAYLEIGH SCATTERING FROM RANDOMLY BRANCHED POLYCONDENSATES", by K. KAJIWARA, W. BURCHARD* and M. GORDON, Br. Polym. J., 1970, Vol. 2, 110-115). I guess this one can be hard to find, so I added it below.

He also provided the C code used in Sasfit (also attached), which seems very simple (a single line formula?)

pi.4980020203.pdf

sasfit_sq_p_ra.c.txt

@butlerpd
Copy link
Member

Do we know which of the equations in the reference we are trying to implement? Equation 21a seems like the one but it does not seem to match the c code from SASfit. Does anybody know?

@pkienzle
Copy link
Contributor

The sasfit docs for the model say:

  • B = bond length of the polycondensates
  • F = functionality
  • NW = weight-average number of the complex units per polyelectrolyte complex

The paper gives the weight-averaged degree of polymerization as

  • D Pw = (1 + α) / (1 - α (f - 1))

Solving for α and substituting into 21a I get a different set of equations from sasfit:

  • numerator = 1 + (1-DPw)(f-1)/(2 - DPw)[1 - sin qb / qb]
  • denominator = 1 - (1-DPw)/(2 - f DPw)[1 - sin qb / qb]

@pkienzle
Copy link
Contributor

pkienzle commented Jan 30, 2025

My algebra above was incorrect. Redoing with wolframalpha:

solve w = (1+a)/(1 - a(f-1)) for a
=> a = (w-1)/((f-1)*w+1)

substitute a into numerator and denominator terms, then simplify
num = 1 + a * (f-1)/(1 - a * (f-1))*t
den = 1 - a / (1 + a)*t

simplify (w-1)/((f-1)*w+1) * (f-1)/(1 - (w-1)/((f-1)*w+1) * (f-1))
=> ((f - 1) (w - 1))/f
simplify (w-1)/((f-1)*w+1) / (1 + (w-1)/((f-1)*w+1))
=> (w - 1)/(f w)

multiply numerator and denominator by (f w)

The following reproduces curve (b) from Fig 4a,4b in the paper:

def do(q, B, f, w):
    t = 1 - np.sin(q*B)/(q*B)
    num = f*w + w*(f-1)*(w-1)*t
    den = f*w - (w-1)*t
    Pinv = num/den
    plt.plot(q, Pinv)
    plt.grid(True)
do(np.linspace(0, 10, 200)[1:], 1, 2, 1499.5)
do(np.linspace(0, 10, 200)[1:], 1, 4, 1499.5)

Noting that the paper uses $P^{-1}$, we swap the numerator and denominator to get the same equations as SASfit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants