Finite Element Method - 3D Mesh Generator - Metfem3D

Linear Examples

Diffusion equation

Putting k=0 in the equation of electrodiffusion we neglect the electrostatic term. It leads to the following equation describing diffusion in ℜn [1, 2]

ut - D Δu = 0 in ℜn ✗ (0, ∞),
u = g on ℜn ✗ t = 0.

where D denotes a diffusion coefficient. This kind of equation represents an initial value problem. Assuming that the considered domain Ω in ℜ3 is of a cubic type [xmin, xmax]✗[ymin, ymax]✗[zmin, zmax] let us take u = 0 as a boundary condition. Now we seek a solution of the equation which satisfies this boundary condition and prescribed initial condition at the time t = 0. The solution of the equation is approximated by the triple sum

u(x,y,z,t) = v0, kx, ky, kz e-(kx2 + ky2 + kz2)Dt sin(kxx) sin(kyy) sin(kzz),
kx = 1 ky = 1 kz = 1

where v0, kx, ky, kz are unknown coefficients that must be determinated from the initial condition:

g = u(., 0) = v0, kx, ky, kz sin(kxx) sin(kyy) sin(kzz).
kx = 1 ky = 1 kz = 1

In the case of the domain being [0 π] ✗ [0 π] ✗ [0 π] and g = const the solution has the form

u(x,y,z,t) = 64g/(π3) e-(kx2 + ky2 + kz2)Dt sin(kxx) sin(kyy) sin(kzz)/(kx ky kz).
kx, ky, kz = 1, 3, …

In the case of cylindrical domain defined by r ∈ [0, r0], θ ∈ [0, 2π) and z ∈ [0, π], and with the boundary condition of the form u = 0 the solution of diffusion equation can be expanded in an absolutely and uniformly convergent series of the form

u(r, θ, z, t) = Jn(kn, mr/r0) ( an, mcos(n θ) + bn, m sin(nθ) ) sin(kz z)✗
n = 0 m, kz = 1
e-((kn,m/r0)2 + kz2)Dt

where kn, m are the zeros of the Bessel functions and an, m, bn, m are constants that must be found from the initial condition by making use of the orthogonality relation for the trigonometric and Bessel functions.


  1. ^ L. C. Evans, Partial Differential Equations, American Mathematical Society, 1998
  2. ^ R. Courant and D. Hilbert, Methods of mathematical physics vol. 1, Interscience Publishers Ltd., London, 1953