This example solves the weak form of the following diffusion equation,
using the Galerkin Finite Element method.
and
are the positive definite and symmetric rank two conductivity tensor and a scalar parameter (e.g. thermal capacity) respectively. The dependent variable
is a spatially varying scalar field (e.g. temperature). In this example an isotropic and homogeneous material with
(identity tensor) and
is considered.
The fortran version of the example can be configured and built with CMake:
git clone https://github.com/OpenCMISS-Examples/diffusion_equation cd diffusion_equation mkdir build cd build cmake -DOpenCMISS_INSTALL_ROOT=/path/to/opencmiss/install ../. make
This will create the example executable "diffusion_equation" in ./src/fortran/ directory.
Fortran version:
cd ./src/fortran/ ./diffusion_equation
Results can be visualised by running visualise.cmgui with the Cmgui visualiser.
The following figure shows the finite element mesh (computational domain) and scalar field,
(primary variable: e.g. temperature) and its derivative,
(secondary variable: e.g. heat flux).
Figure 1. (a) Finite element mesh (b) Primary variable solution (c) Secondary variable solution
The expected results from this example are available in expected_results folder.
There are no additional input files required for this example as it is self-contained.
License applicable to this example is described in LICENSE.