Simulation of ion exchanger chromatography in Matlab Johan Lindgren & Mohammad Mostafavi Abstract In this project, we developed a chromatographic model to separate bio-pharmaceuticals. In a more advanced stage of the work, we did an extra work with GUI. The mathematical models were based on F. Carlsson model suggested in 1994 [1]. The discretization of the partial differential equations and solving the set of corresponding ordinary differential equations were done in MATLAB. The experimental values were fit with the model by varying the constant values of the model. The GUI supplemented the programmed model by facilitating usage of the MATLAB code. The GUI plots the concentration-time curve which shows separation of components. Moreover, the GUI plots yield, production time, and purity as a function of one the variables of initial salt concentration, salt concentration gradient, or flow velocity. Results from the parameter study performed showed that lower flows lead to higher yields. Production time was decreased by increasing initial salt concentration, gradient or flow velocity. Chromatography Chromatography is a process of separation of chemicals. The phase which is to be separated into its components dissolved into a fluid is named mobile phase. The mobile phase pass through a column containing a so-called stationary phase in which the separation takes place. Different components of the mobile phase travel with different speeds through the stationary phase resulting in a separation of the components. Mathematical models: In this project, the separation of the components was modeled based on the differential mass balance of the components. By dividing the phenomena of separation into dispersion, convection and adsorption, in 1994, F. Carlsson modeled the process (Equation 1)[1]. 𝑞 𝑟 = 𝑘𝑘𝑖𝑛𝑒𝑡𝑖𝑐 ∗ (𝐻0 ∗ 𝑠 −𝛽 ∗ 𝑐 ∗ (1 − 𝑞𝑚𝑎𝑥) − 𝑞) 𝜕𝑞 𝜕𝑡 𝜕𝑐 𝜕𝑡 =𝑟 [Equation 1] [Equation 2] 𝜕2 𝑐 𝜕𝑐 = 𝐷𝑎𝑥 𝜕𝑧 2 − 𝑣 ∗ 𝜕𝑧 − 𝑟 1−𝜀𝑐 𝜀𝑐 [Equation 3] The dispersion coefficient was estimated using the Peclet number: 𝐷𝑎𝑥 = 𝑣∗𝑟𝑝𝑎𝑟𝑡𝑖𝑐𝑙𝑒 𝑃𝑒 [Equation 4] Where H0=H*sβ and kkinetic =kdesorption where c is concentration (g/l), t is time(CV), z is position along the column (m), l is the column length (s), v is the interstitial velocity(CV/h), εc is porosity (void) of particle bed, q absorbed amount, qmax is the maximum amount that can be absorbed, H is Henry's constant, s concentration of elution modifier, β explains the ion-exchange characteristics. Numerical solution The partial differential expressions were discretized using a finite volume method to reduce the model to a series of ordinary differential equations. The first order derivatives were approximated with a 2 point backward matrix and the second order derivatives were approximated with a 3 point central matrix. A dirichlet boundary condition was used for the left-hand side with a constant inflow. For the right-hand side a no flux condition was used. Parameter estimation In this project, the optimal model was found by guessing the constant values. By guessing the values, the experimental curves fit reasonably with the model. GUI The graphical interface allows the user to see the concentration profile for different initial salt concentrations and gradients. It also shows the cut points, as well as calculates the yield, production time and purity. A second function of the GUI is that it can be used to study the effect of parameters (initial salt concentration, gradient or flow velocity) on yield, production time and purity, for multiple data points. Data structure for model calibration The basic structure for how the model was calibrated is shown in figure 3. Calibration was done by manually adjusting kkinetic and H0 (see equation 1 above) to fit experimental data (first gradient run in excel-file). Derivatives were approximated using functions FVMdisc1st and FVMdisc2nd. Boundary conditions were described using the FVMdiscBV function. The differential equations in the model were then solved using an odesolver (ode15s). The calibrated model was then validated against the second and third gradient runs in the excelfile (which means the model should be approximately correct for the interval 5-11 g/l of initial salt concentration). Comparisons between the model and experimental data can be seen in figures 1 and 2. The model was calibrated for a mesh size of 100. Deviations from this mesh size will mean that the model is no longer valid, since the concentration is affected by the size of the volume elements. Figure 1. Model (lines) compared with experimental data (dots) for gradient run number two Figure 2. Model (lines) compared with experimental data (dots) for gradient run number three Figure 3. Model calibration data-flow Data structure for GUI The basic structure for how the gui interacts with the calibrated model can be seen in figure 2. The user can choose to see the concentration profile with cut points for different initial salt concentrations and gradients (this will also display the purity, yield and production time for the process). The user also has the option of studying how yield, production time or purity changes for a number of datapoints for the parameters initial salt concentration, gradient or flow velocity. The gui then calls on the calibrated model function (project3simulation_for_different_gradients.m) where concentrations for the process are calculated. The yield, production time, purity and cutpoints are then calculated with the function simplefrac, using the constraint that purity of component B/C must be above 95% and that the concentration of component D in the end product must not be larger than 1%. This information is then sent back to the GUI where it is used to display figures and data. Figure 4. Structure of GUI data-flow Using the GUI The model only works for values close to the default values for each parameter. The initial salt concentration works well in the interval 0.05-0.11M. Salt concentration gradient works around 3e-3. Flow velocity around 5CV/h. Computation time can be long as each data point (in bottom half of GUI) adds another 30 seconds. Figure 5. Screen capture of GUI layout Parameter study In the parameter study the yield, production time and purity was calculated for variations in the parameters. Increasing the flow velocity leads to decreased yields (appears to decrease exponentially, see figure 5), decreased production time (appears to be linear decrease). The purity of the product is unaffected by the flow velocity because of the constraints specified in simplefrac (there are minor fluctuations that are likely the result of the approximation method). Figure 6. Yield as a function of different flow velocities Figure 7. Production time as a function of flow velocity The yield is largely unaffected by changes in initial salt concentration, but the production time decreases with increasing concentrations (see figure 8), since the desorption rate of the molecules depends on salt concentration. Purity of the product is once again unaffected due to the constraints specified. Purity are unaffected by changes to the concentration gradient but the production time decreases (see figure 9) with increasing salt gradient. Figure 8. Production time as a function of initial salt concentration Figure 9. Effect of salt gradient on production time Figure 10. Effect of changes in gradient on yield Conclusions The results from the parameter study were what could be expected from the kinetics. Higher initial salt concentration and gradient lead to lower production times as this affected the desorption speed. The yield is mostly unaffected by the gradient for values above 3e-3, but below 2.5e-3 it starts to decrease sharply. This is because the lower gradient shifts the concentration profile to the right, which means that the salt concentration spike that occurs at time CV=52 causes both component D and B/C to desorb almost simultaneously. References [1] Carlsson F. (1994), Mathematical modelling and simulation of fixed-bed chromatographic processes, Lund: Chemical Engineering 1, Lund Institute of Technology.