Skip to content

Example 1: nonlinear diffusion in a star

Files

Statement of the problem

This example code is based on the "Example 16: Time Dependent Heat Conduction", on MFEM's website. It solves a diffusion equation in a 2D star Ω\Omega (GMSH mesh coming from MFEM examples).

ct=[(κ+αc)c] in Ω \begin{align} \frac{\partial c}{\partial t}&=[\nabla \cdot{} \displaystyle(\kappa+\alpha c) \nabla c ]\text{ in }\Omega \end{align}

where the concentration cc in the diffusion coefficient can be evaluated at the previous time step, as done in the MFEM example, or at the current time step to form a fully nonlinear system.

Initial condition

The initial condition is set to 22 inside a circle of radius 0.50.5, 11 outside.

Parameters used for the test

For this test, the following parameters are considered:

Parameter Symbol Value
Primary coefficient κ\kappa 0.50.5
Secondary coefficient α\alpha 10210^{-2}

Boundary conditions

Neumann boundary conditions are prescribed on the boundary of the domain:

nλc=0 on Ω \begin{align} {\bf{n}} \cdot{} \lambda \nabla c&=0 \text{ on }\partial\Omega \end{align}

Numerical scheme

  • Time integration: Euler Implicit over the interval t[0,0.5]t\in[0,0.5], δt=0.01\delta t=0.01
  • Spatial discretization: built from GMSH + quadratic FE + 22 uniform levels of refinement (it could be extended further)

Results

The figure 1 shows the nonlinear diffusion inside the star.

NonLinearStarDiffusion
Figure 1: nonlinear diffusion in a star obtained with 55 level of refinement.