This example solves the weak form of the following static advection-diffusion equation,
using the Galerkin method. , and are the velocity vector, source term and symmetric, positive definite rank two conductivity tensor respectively. The dependent variable is a spatially varying scalar field (e.g. concentration of constituents or species). Note that the velocity field must be prescribed and is called the independent variable. In this example an isotropic and homogeneous material with (identity tensor) and is considered.
The independent variable, source term and boundary conditions are prescribed to match those required for the analytical solution.
The general form of the advection-diffusion eqaution is
The fortran version of the example can be configured and built with CMake:
git clone https://github.com/OpenCMISS-Examples/static_advection_diffusion_equation mkdir static_advection_diffusion_equation-build cd static_advection_diffusion_equation-build cmake -DOpenCMISSLibs_DIR=/path/to/opencmisslib/install ../static_advection_diffusion_equation make
This will create the example executable "static_advection_diffusion_equation" in ./src/fortran/ directory.
Fortran version:
cd ./src/fortran/ ./static_advection_diffusion_equation
Results can be visualised by running visualise.cmgui with the Cmgui visualiser.
The following figure shows the solutions and various field variables (source term, conducivity and velocity - the independent variable).
Figure 1. (a) Primary variable solution (b) Secondary variable solution (c) Source term
Figure 1. (d) Conducivity (e) Velocity-x component (f) Velocity-y component
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.