Skip to content

OpenCMISS-Examples/diffusion_equation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Diffusion Equation

This example solves the weak form of the following diffusion equation,

diffusion_equation

using the Galerkin Finite Element method. conductivity_tensor and alpha are the positive definite and symmetric rank two conductivity tensor and a scalar parameter (e.g. thermal capacity) respectively. The dependent variable u is a spatially varying scalar field (e.g. temperature). In this example an isotropic and homogeneous material with equation1 (identity tensor) and equation2 is considered.

Building the example

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.

Running the example

Fortran version:

cd ./src/fortran/
./diffusion_equation

Verifying the example

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, u (primary variable: e.g. temperature) and its derivative, du_dn (secondary variable: e.g. heat flux).

figure1a  figure1b  figure1c

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.

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •