# 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.

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:

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.

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.

Previous
Next