StochSS / GillesPy2

Modeling toolkit for biochemical simulation
http://gillespy2.readthedocs.io/
GNU General Public License v3.0
72 stars 32 forks source link

Simulating Styrene polymerization using gillespy2 #619

Closed teddiclax closed 3 years ago

teddiclax commented 3 years ago

Good day. I hope you are all doing?

Good day. Based on a previous issue( #537) that involves the use of the Gillespie algorithm to simulate the stochastic trajectory of the polymerization of styrene in free radicals. I tried tweaking the existing code to mimic the trajectories from the publication. All efforts proved abortive. I intend to produce simultaneously, the deterministic and stochastic trajectories. That is a plot of the number of polymeric chains(Mn) versus residence time, the molecular weight of polymer (Mw ) versus time, and the polydispersity index (PDI) versus time.

My major challenge is applying the gyllespy2 python3 module to this problem to produce the trajectories. The modeled kinetic set of equations from 43-56 are a set of stiff ODEs. Also, theoretically, equations 45 -47 are equated to zero making the system a Differential Algebraic Equation(DAEs).

I am sorry for the lengthy write-up. I look forward to your urgent assistance.

briandrawert commented 3 years ago

Unfortunately we can not help you with your model without more information. You have quoted some equations number, but have not given any reference for these. What equations are you talking about? Can you clearly explain why the example Styrene model we created for you does not work?

teddiclax commented 3 years ago

Thank you for the response @briandrawert. Below is a sample code for the expected outcome for the polymerization of styrene model: samplecode_Logistic_Growth.txt .

Also, from the previous message, here is the reference material where the equations were quoted from: Curteanu, S., 2003. Modeling and simulation of free radical polymerization of styrene under semi-batch reactor conditions. Open Chemistry, 1(1), pp.69-90. I believe that the previously developed styrene model is okay but, the expected simulation outcome is/are differed from the expectations(for example: A plot of conversion of monomer vs time, polydispersity index,PDI versus time etc )

Furthermore, the major challenges encountered while trying the tweak( were the previously developed model :

  1. Foremost, the definition of the propensity at the initiation reaction step, appears to be different from the one defined in accordance with the Gillespie algorithm (please correct me if I am wrong as my programming skill is average): https://en.wikipedia.org/wiki/Gillespie_algorithm.(This is mine view perhaps, the module) .
  2. It is established that polymerization reactions involved a large number of molecules hence, the use of the principle of moments as well as assumptions like Large Chain Approximation(LCA) and the Pseudo Steady State Hypothesis(PSSH) -all live radical kinetics or differential equations are assumed to be zero.
  3. From the example in the .txt file; I intend to produce Stochastic and Deterministic Simulations of the : a. Polydispersity index(PDI) versus time b.Molecular weight(Mw) versus time c.average molecular number(Mn) versus time.

Please,let me know if my inquiry still needs further clarification. It would be gratifying to receive your response soon.

briandrawert commented 3 years ago

We are happy to help you with any GillesPy2, this forum is only for issues related to our software.