Posted by: louisyangliu | June 8, 2008

Solving Stiff ODEs in MATLAB for Models of Particles Coagulation

In MATLAB, one can obtain solutions to differential equations in symbolic or numerical manner. For simple first order ODEs, one can use the command “dsolve” to solve solvable equations analytically. In particular, it can be used to obtain anti-derivatives. Numerically, one can assign numerical initial conditions, using “ode15″ for some stiff ODEs, where the stiffness is determined by the Jacobian of the ODE system, or other similar commands, depending on the type of equation. The steps usually includes defining functions/equations in M-files, setting numerical domains and step sizes for basic variables and initial conditions, applying suitable solver codes, and graphing the numerical results, and so forth.

For instance, one can build a model for simulating the coagulation of particles in aqua-environment. By the central limit theorem in classic probability theory, the distribution of particles in different sizes can be considered as  a log-normal distribution, or a composition of log-normal distributions

N_i(D) = \frac{m_i}{D \sigma_i \sqrt{2 \pi}}e^{-\frac{(\ln (D) - \mu_i)^2}{2\sigma_i^2}},     (1)

where D is the diameter of particle in ocean environment, \mu_i and \sigma_i are parameters of different modes of log-normal distributions. By the theory from particle physics, the interaction of different particles has a coagulation kernel, such as Brownian kernel

\beta_{Br}(D,\tilde{D})=12\pi(D+\tilde{D})      (2)

for two particles with diameters D and \tilde{D}. Now let us consider a single-mode model based on Koziol-Leighton’s result on aerosol dynamics, as the following ODE for this modeling,

\frac{dm(t)}{dt}=\frac{1}{2\mu e^{\frac{\sigma^2}{2}}}\int_{0}^{\infty}\int_{0}^{\infty}\beta_{Br}(D,\tilde{D})N(D,t)N(\tilde{D},t)(\tilde{(D}^{3}+D^{3})^\frac{1}{3}-D)dDd\tilde{D},

where N (D,t)=\frac{m(t)}{D \sigma \sqrt{2 \pi}}e^{-\frac{(\ln (D) - \mu )^2}{2\sigma^2}} and similarly for N (\tilde{D},t). Given initial data to m, we can solve out m(t) by solver “ode23s” or “ode15s”, and obtain a simple simulation for particles coagulation.


Leave a response

Your response:

Categories