Diffpack

 

IV-3 . Examples and applications

The Diffpack libraries have been successfully used in several applications involving numerical solution of differential equations. Most of the examples mentioned below require only a few pages of C++ code when Diffpack is utilized. The main part of the code deals with details of the numerical scheme used to solve the differential equations, while user interfaces and visualization are limited to a few lines of code.

 

 

 

a - Standard model PDEs

Contributed by: Hans Petter Langtangen

 

Primitive simulators for the standard model PDEs such as the Laplace, Poisson, diffusion, heat and Helmholtz equations. Such simulators are created in the introductory report on finite element programming in Diffpack.

Figure: The temperature distribution in a thick-walled tube with fixed temperature values at the inner and outer boundary. Axi-symmetric problem solved in Cartesian coordinates.

 

b-1D/2D/3D linear wave equation

Contributed by: Hans Petter Langtangen

 

An efficient finite element solver for the standard, linear wave equation in a general 1D/2D/3D geometry.


Figure: The amplitude of 3D sound waves in a box.

 

c - Boussinesq equations

Contributed by: Hans Petter Langtangen and Geir Pedersen

 

A finite element solver for weakly dispersive and nonlinear water waves described by a set of coupled, nonlinear PDEs in 2D (Boussinesq equations).

Figure: The water surface elevation due to an incoming wave over a sea mountain.

Click for movie! (694K)

d - 2D/3D linear elasticity

Contributed by: Hans Petter Langtangen

 

A finite element solver for isotropic, linear elasticity (2D plain strain and 3D).

Figure: The von Mises yield stress in an elastic body subject to external forces.

 

e - Electrical activity in the human heart

Contributed by: Glenn Terje Lines

 

Diffpack has been used for numerical simulation of the excitation process in the human heart to find better quantitative measurement methods for myocardial infarction and ischemia. The simulator solves an equation system consisting of a reaction-diffusion parabolic differential equation and an elliptic equation governing the potential distribution in the cardiac muscle and surrounding tissues.


Click for movie! (711K)

Figure: The potential distribution in the cardiac muscle at a specific time level.

 

back