## Simulation software

A simulation program takes a mathematical model and simulates for instance how a molecular system changes with time. The simulation program can be very useful for illustration and understanding as the outcome of the program may be converted into an animation. But moreover, from the outcome, many properties can be calculated. Energy, density and diffusivity are examples of quantities that can be extracted from simulations.

Simulations can be written to explore properties on a molecular level. But also bigger systems can be simulated. One of the simulation programs developed by Wendelsbergs beräkningskemi together with the pharmaceutical company AstraZeneca is GI-Sim. In this program, the path of drug molecules from mouth to intestine to blood to metabolism is simulated.

A simulation program can be used for various reasons. Unknown mechanisms can be explored by simulations. But often simulations are used together with experimental work. If simulations and experiments agree, the foundation of the proposed mechanisms is made stronger. If disagreeing, an incitement for further search of mechanisms is triggered.

*Simulation of diffusion of drug molecules*

*(blue dots)*

*through skin (stratum corneum).*

Our research often aims for developing a mathematical model of a physical/chemical mechanism, process or property. The mathematical model is then the basis for a simulation program. There are many options for how to write the program. Sometimes we write new code in languages like fortran. Sometimes we make programs within some modelling environment like matlab or Comsol Multiphysics. We have a long experience of making the programs with user-friendly interfaces.

#### The mathematical model

A simulation program is based on a mathematical model. With a model, reality is described using mathematics and equations. Let us take an example.

In pharmaceutical research, drug molecules are often delivered as particles in a solvent (water). When the particles are put in water they start to dissolve. Drug molecules leave the particles surface and diffuse out in water. The rate (molecules/second) at which molecules leave a particle is important information when designing a product. We now want to make a mathematical model of the dissolution rate.

Making a mathematical model always involves the selection of what physics/chemistry that is important and what can be ignored. In the case of particle dissolution it is often assumed that the time required for a molecule to leave the surface for the solution just outside the surface is negligible. Hence, the solution just outside the surface is saturated, with a concentration *C* being equal to the drug solubility *S*. Imagine now that the number of particles per water volume is very low. Then the concentration of dissolved drug is maintained low and can be regarded as zero.

From physical chemistry we learn that molecules diffuse from regions with high concentration to low concentration. The Fick’s law states that the molecular flux (molecules/s/m^{2}) is given by

*F* = -*D*·∇*C*

where *D* is the diffusivity of the drug molecule in water and ∇ is the gradient

∇C = (∂*C*/∂*x* , ∂*C*/∂*y* , ∂*C*/∂*z*)

The mechanism for particle dissolution is thus that molecules diffuse from the saturated solution just outside particle surface to far away from the particle where drug concentration is low (zero). When a molecule leaves the solution close to the surface, a new molecule leaves the particle to take the available space in the solution and consequently, the number of molecules in the particle decreases.

Having the equation describing the mechanism and using mathematics, it can be derived that the change in particles radius is given by

d*R*/d*t *= -*D*·*V _{m}*·

*S*/

*R*

where *V _{m}* is the volume of a drug molecule. In the animation below, the dissolution of three particles is seen.