Simulate Step-Growth Polymerization
Prerequisites
- You have completed the Getting Started tutorial.
matplotlib
is installed (pip install matplotlib
).
This guide demonstrates how to simulate step-growth polymerization, where bifunctional monomers with reactive sites A and B react to form linear chains. In polymcsim
, you model this by assigning every monomer two reactive sites—one A and one B—that consume each other.
This guide shows you how to:
- Define a typical A–B step-growth system.
- Run the simulation until a target conversion is reached.
- Inspect the molecular-weight distribution (MWD).
- Export the resulting polymer graph for external analysis.
1 Create the Simulation Input
2 Run the Simulation
run_step_growth.py | |
---|---|
The conversion control in SimParams
stops the simulation early, preventing you from wasting CPU cycles once the desired extent of reaction is achieved.
3 Analyse the Molecular-Weight Distribution
analyse_mwd.py | |
---|---|
At high conversions step-growth systems generate a broad, often log-normal MWD with high polydispersity index (PDI ≈ 2).
4 Export the Polymer Graph
You now have CSV files containing node, edge, and summary data that can be loaded into Excel, Pandas, or your favourite plotting tool.
Next Steps
- Vary the
max_conversion
parameter to investigate the Carothers equation predictions. - Introduce a small amount of mono-functional chain-stoppers to study how they limit molar mass.
- Use different
rate
constants for multiple reactions to explore selectivity.