OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
Odeint
  • We can use the Odeint library from boost with OpenFPM in two ways. The first example will cover a simple case where we control the time stepping ourselves (time loop of the simulation wriiten by us). The 2nd Example will cover a way of using odeint where the time is forwarded by odeint along with an observer.
  • In the example links below, we solve the follwing advection-diffusion PDE for two chemicals with concentration \(\vec{C}(x,y,t)=(C_x(x,y,t),C_y(x,y,t))\) with a fixed velocity \(\vec{V}(x,y)=(-ye^{-10(x^2+y^2)},xe^{-10(x^2+y^2)})\):

\[ \frac{\partial\vec{C}}{dt}=\vec{V}.\nabla_{\{x,y\}} \vec{C} + 0.1\Delta_{\{x,y\}} \vec{C} \]

in 2d domain [-1,-1]*[1,1] with the boundary conditions on the walls as no-slip for velocity \(\vec{V}=0\) and sink for the chemicals \(\vec{C}=0\) for all time \(t\). Further, we start with the initial condition for the concentration as

\[\vec{C}=\begin{cases} (1,0)\text{ for } x=0,-0.5<y<0\\ (0,1)\text{ for } x=0, 0<y<0.5\\ (0,0) \text{ for the rest of the domain}\\ \end{cases} \]

Step by step time integration with Odeint Multiple steps integration with Odeint