Convert to 3D

Now we finally arrive at the 3D model. As an example, we further develop the coupled PDE and CPM model with mechanical interaction.

Similar to the 1D to 2D case, it is straighforward to extend the dimensionality to 3D. We define the Lattice Size also in the z direction, i.e. 238,238,238 and set the structure (Lattice class) to cubic. The initial conditions now include the z dimension as well.

Three-dimensional initial conditions for `u` and `v`.
Three-dimensional initial conditions for u and v.
For better visualization, the initial values for u and v are not symmetric with respect to the dimensions anymore.

Check out barkley3d_coupling.xml to try yourself via:

These initial conditions correspond to the following structure:

Three-dimensional initial conditions of `u` (red) and `v` (blue). 3D visualization: [ParaView](http://www.paraview.org/).
Three-dimensional initial conditions of u (red) and v (blue). 3D visualization: ParaView.

For visualization we can use Gnuplotter just like in the 2D case with the only difference that we have to indicate in the properties of the plot to show us just a single z slice.

`Gnuplotter` in the `Analysis` section configured to plot z slice `25` of the 3D lattice.
Gnuplotter in the Analysis section configured to plot z slice 25 of the 3D lattice.
A discretized 3D model of excitable media using irregular motile CPM cells (one z slice, 200 frames).
A discretized 3D model of excitable media using irregular motile CPM cells (one z slice, 200 frames).

For the full 3D data there are two plugins: the TiffPlotter and VtkPlotter. Here we use the VtkPlotter which plots one file for each time step that can then be visualized by the free software ParaView.

3D view of the discretized model of excitable media using irregular motile CPM cells (100 frames).
3D view of the discretized model of excitable media using irregular motile CPM cells (100 frames).
Previous
Next