/static_advection_diffusion_equation

Static advection diffusion equation

Primary LanguageFortranApache License 2.0Apache-2.0

Static Advection Diffusion Equation

This example solves the weak form of the following static advection-diffusion equation,

static_advection_diffusion_equation

using the Galerkin method. velocity_vector , s and conductivity_tensor are the velocity vector, source term and symmetric, positive definite rank two conductivity tensor respectively. The dependent variable c 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 equation1 (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

full_advection_diffusion_equation .

Building the example

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.

Running the example

Fortran version:

cd ./src/fortran/
./static_advection_diffusion_equation

Verifying the example

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

figure1a  figure1b  figure1c

Figure 1. (a) Primary variable solution (b) Secondary variable solution (c) Source term

figure1d  figure1e  figure1f

Figure 1. (d) Conducivity (e) Velocity-x component (f) Velocity-y component

The expected results from this example are available in expected_results folder.

Prerequisites

There are no additional input files required for this example as it is self-contained.

License

License applicable to this example is described in LICENSE.