Poly (methyl methacrylate) (PMMA) is a transparent thermoplastic used in a wide range of fields including medicine, art, and aesthetics. It is also used as an alternative to glass due to its shatter-resistance property  . There has been a widespread need to use PMMA based components in Uganda especially for construction and medicine purposes, however advancing the technology that addresses industrial polymerization processes is often hampered by a lack of fundamental research activities in academic and the few industrial labs available in the country.
Industrially, PMMA is obtained from the free-radical polymerization of methyl methacrylate  which may be produced via methanolysis of methylcrylamide sulphate  . The polymerization reaction is commonly initiated by thermal radical forming agents often employing organic peroxy compounds and azo-compounds  . Suspension polymerization is used for the commercial production of many important polymers other than PMMA such as polyvinyl chloride and polystyrene  with similar properties to those produced from bulk polymerization. The limitations of increased viscosity, reaction temperature, and volume contraction in the latter process are always avoided  . The process may be described as being operated batch-wise however, in essence it is often in a semi-batch mode since some material enters the reactor after the start of polymerization.
During the process, the monomer is stirred with about twice its volume of water and dispersants forming droplet-like distribution of the monomer phase in water. The mechanism of polymerization corresponds to that of bulk polymerization and as such, the droplets become increasingly viscous during the course of polymerization. Distributors such as gelatin stabilize the suspension and prevent the droplets from adhering to one another during collisions. The system is heterogeneous therefore the polymer is collected as granular beads on completion of polymerization and it is washed to remove adhering distributor and salts then dried  .
Various works have been published on the modeling of methyl methacrylate polymerization processes. A major feature of these studies is the observation in the increase of the mass reaction viscosity with monomer conversion resulting into a deviation from the “normal” kinetic. The severe reduction in the mobility of the macroradicals auto accelerates the reaction causing an increase in the gel effect and a decrease in the termination rate constant. If the polymerization is carried out at lower temperatures, the glass effect occurs when the transition state is reached at a certain conversion causing a decrease in the propagation rate constant. This results in the interruption of the reaction before the monomer is completely consumed. The increased viscosity at high monomer conversion leads to a decrease in the initiator efficiency due to the cage effect  . In most of the reviewed works, gel and glass effects are modeled according to Chiu et al.  and the cage effect is modeled according to Achilias-Kiparissides  . Most of the models considered are reported to have worked well for MMA polymerization  , however the general model developed by Seth and Gupta  and reworked by Ghosh et al.  using free volume theory is noted as being most superior  . Several simulation packages to assess the performance of the models under consideration have been used such as MATLAB  , gPROMS  , FORTRAN  , which are based on utilization of sequential quadratic programming, ordinary differential equations and fuzzy-neural modeling.
From the above, it can be seen that techniques applied in modeling polymerization processes are reasonably well developed and several commercial simulation packages are available. However a user of such techniques and packages should keep in mind that software cannot be a substitute for engineering judgement and its use without understanding is a dangerous abandonment of professional responsibility  .
The aim of this paper is to model and simulate the polymerization of methyl methacrylate to PMMA in an isothermal suspension reactor. The reactor performance is studied by modeling and simulation using Python 3.5 instead of using experimental assessment. This is because the procedure requires low computational demand in performing the reactor studies and besides high-quality data is available for validation and comparison with literature values.
2. Model Formulation
The kinetics of MMA polymerization are described basing on the free radical polymerization mechanism scheme in Table 1 below. The scheme map comprises the initiation step, where the initiator (I) decomposes to form reactive radicals (R), the addition of monomer molecules (M) to the reactive polymer chain formed from the reactive radicals and the termination step where deactivation of polymer radicals occur. The initiator used is Benzoyl Peroxide (BPO).
P and D represent the live and dead polymer with n and m monomeric units respectively; whereas the kinetic constants for the initiator decomposition, initiation, propagation and termination are Kd, Ki, Kp and Kt respectively.
In this work, the process model in   with slight adjustments was followed. The assumptions used in this work are:
1) The reactor operates isothermally at 70˚C
2) All reaction steps in the system are irreversible
3) Chain transfer to the monomer is negligible compared to other reaction steps
4) The dispersion generated in water isolates the monomer thus negligible evaporation rate
5) Each droplet behaves as a batch reactor operating in bulk
6) Termination is due to disproportionation only
7) The volume of the liquid phase is unaffected by the small amount of initiator
8) There is no polymer at the beginning of the process
Using the above assumptions, the initiator (I), monomer (M) and radical species (R) balances are;
Table 1. Kinetic scheme for the free-radical polymerization of MMA.
The method of moments is invoked in order to reduce the infinite system of molar balance equations required to describe the molecular weight distribution  that would have presented roughly 10,000 - 50,000 stiff differential equations to be solved simultaneously  . Therefore the first three radical species and dead polymer moment balances are;
where is the momentum i of the radical species and is the momentum i of the dead polymeric species summing to;
A detailed procedure of deriving the moment equations can be found elsewhere in the works of   .
The initial conditions used in this work: , , .
At any time and point within the system, predictions for the monomer conversion (Xm), number and weight average molecular weights (Mn and Mw) can be given as;
where MWm is the molecular weight of the MMA monomer. Then the polydispersity index can be written
The enthalpy change Q during the reaction progress can be defined as
In order to account for the cage, gel and glass effects,  reformulated the model of  basing on free volume theory and the equations below were used to define the variation of the initiator efficiency f, the termination and propagation rate constants with temperature
In the above equations, the volume of the mixture V is determined from;
With and as the densities of the monomer and polymer whereas the volume of the cage, gel and glass effects of the monomer Vfm and the corresponding volume of the polymer Vfp are calculated from;
The volumetric fraction of the monomer with respect to V, denoted as and the volumetric fraction of the polymer in respect to the same, are obtained from
From Equations (26) to (28); are best fit correlation parameters that are applied as adjustable parameters for the initiator efficiency, propagation constant rate and disproportion termination constant rate respectively and may be calculated from
The ratios of the critical volumes of monomer i = 1 and initiator i = I over the polymer are determined as
where , , are the critical volumes for the monomer, initiator and polymer respectively. The molecular weights for the monomer, polymer and initiator are denoted as , , respectively. The parameters used in solving the above equations are given in Table 2.
Table 2. Parameters used in this study   .
3. Results and Discussion
A program to solve the above equations was developed using the object-oriented language Python 3.5 installed via the Anaconda distro. The NumPy module  and a customized module were used to solve for the stiff ODEs and results were ported to matplotlib whose output has a close resemblance to the well-known MATLAB format. In order to simulate the performance of the model, it was assumed that 2 tonnes of monomer were fed to the reactor and the initiator (1% wt. of monomer) was added in 1 minute at constant rate after which the addition rate was stopped. The temperature was fixed at 70˚C. The reaction progressed for the 3 hours and the reactor profiles in Figures 1-8 were obtained.
Figure 1. Monomer conversion versus time.
Figure 2. Rate of change of initiator as the reaction progresses.
Figure 3. Monomer consumption with time.
Figure 4. Enthalpy change with time.
There is a fairly linear increase in the monomer conversion with time until the start of the gel effect as observed in Figure 1. The reaction rate is then auto-accelerated thus shifting the reaction to the limiting conversion. It should be noted that maximum monomer conversion and polymer production are limited by short reaction batch times, the existence of diffusional effects in the reaction medium and by the fast decay of the initiator as observed in Figure 2.
Figure 5. Variation of Mn and Mw with conversion.
Figure 6. Weight average molecular weight versus time.
As the initiator is added during the first minute at a constant rate, there’s an initial increase at loading time but then the initiator and monomer amounts (see Figure 3) decrease with time when the initiator radicals combine with the monomer particle leading to chain propagation which finally results into formation of the polymer.
The reaction between the monomer and initiator is highly exothermic leading
Figure 7. Number average molecular weight versus time.
Figure 8. Polydispersity index versus time.
to large amounts of heat being released. Figure 4 shows the enthalpy change as the reaction progresses. It is observed that there is an increase in the enthalpy change with time a scenario which may be attributed to the changing reaction rate constants that vary with temperature at a given time. However a maximum enthalpy change is attained prior to the depletion of the monomer inside the reactor at conversions of about 92% as shown in Figures 1-3.
For the polymer being produced, the molecular weight predictions of the simulated model (Mn, Mw and PDI) are given in Figures 5-8. It can be seen that the there is a slight drop in the polymer molecular weight due to a contraction in volume at low conversions.
However on the onset of the gel effect, larger polymer chains are produced which leads to a rise in the predicted molecular weights. As monomer conversion increases, the viscosity of reacting mixture increases. This causes a cage effect till the polymer chain stops growing. The polydispersity index predicted in Figure 8 is 27, a value greater than one indicating that the produced polymer is polydisperse.
The simulation of suspension polymerization model has been performed in Python 3.5. The prediction results were in good agreement as those reported in literature. A maximum monomer conversion of about 92.8% at a minimum batch time of about 2.2 hours was achieved at the specified conditions. The results of this work have demonstrated that Python can be employed to perform modeling and simulation studies of polymerization based processes effectively with equal success as any other programming language.
 Arora, P., Jain, R., Mathur, K., Sharma, A. and Gupta, A. (2010) Synthesis of Polymethyl Methacrylate (PMMA) by Batch Emulsion Polymerization. African Journal of Pure and Applied Chemistry, 4, 152-157.
 Caytano, T.R.A. and Machado, R.A.F. (2011) Soft-Sensor Based on Artificial Neuronal Network for the Prediction of Physico-chemical Variables in Suspension Polymerization Reactions. Chemical Engineering Transactions, 529-534.
 Verros, G.D., Achilias, D.S. and Giannoukos, G.I. (2011) Development of a Comprehensive Mathematical Model for Free Radical Suspension Polymerization of Methyl Methacrylate. Polymer Engineering and Science, 51, 670-678. https://doi.org/10.1002/pen.21865
 Silvia, C. and Victor, B. (1999) Free Radical Polymerization of Methyl Methacrylate Modeling and Simulation under Semibatch and Nonisothermal Reactor Conditions. Journal of Applied Polymer Science, 74, 2561-2570.
 Achilias, D.S. and Kiparissides, C. (1992) Development of a General Mathematical Framework for Modelling Diffusion-Controlled Free-Radical Polymerization Reaction. Macromolecules, 25, 3739-3750. https://doi.org/10.1021/ma00040a021
 Garg, D.K., Serra, C.A., Hoarau, Y., Parida, D., Bouquey, M. and Muller, R. (2014) Analytical Solution of Free Radical Polymerization: Applications Implementing Gel Effect Using AK Model. Macromolecules, 47, 7370-7377. https://doi.org/10.1021/ma501413m
 Seth, V. and Gupta, S.K. (1995) Free Radical Polymerizations Associated with the Trommsdorff Effect under Semibatch Reactor Conditions: An Improved Model. Journal of Polymer Engineering, 15, 283-323. https://doi.org/10.1515/POLYENG.1995.15.3-4.283
 Ghosh, P., Gupta, S.K. and Saraf, D.N. (1998) An Experimental Study on Bulk and Solution Polymerization of Methyl Methacrylate with Responses to Step Changes in Temperature. Chemical Engineering Journal, 70, 25-35. https://doi.org/10.1016/S1385-8947(98)00064-3
 Achilias, D.S. and Kiparissides, C. (1994) On the Validity of the Steady State Approximations in High Conversion Diffusion Controlled Free-Radical Copolymerization Reactions. Polymer, 35, 1714-1721. https://doi.org/10.1016/0032-3861(94)90846-X
 Penlidis, A., Ponnuswamy, S.R., Kiparissides, C. and O'Driscoll, K.F. (1992) Polymer Reaction Engineering: Modeling Consideration for Control Studies. The Chemical Engineering Journal, 50, 95-107. https://doi.org/10.1016/0300-9467(92)80013-Z