bvp
Solution of Two-Point Boundary Value Problems


bvp, FENICS codes which use the finite element method to solve two point boundary value problems (BVP) over an interval in 1D.

Note that I have installed FENICS using Docker, and so to run this script I issue the commands:

  1. cd $HOME/fenicsproject/bvp
  2. fenicsproject run
  3. python3 bvp_01.py
  4. exit

Licensing:

The GNU LGPL license.

Reference:

  1. Hans Petter Langtangen, Anders Logg,
    Solving PDEs in Python - The FEniCS Tutorial Volume 1.

Source Code:

bvp_01.py sets up and solves a two point boundary value problem.

bvp_02.py repeats the calculation done by bvp_01.py, but now prints out a table of the solution, estimates the L2 norm and H1 seminorms of the error, and computes the average value of the solution in two ways.

bvp_03.py solves the same BVP 4 times, on a sequence of refined meshes.

bvp_04.py solves the same problem as bvp_01.py, but sets the Dirichlet boundary conditions explicitly.

bvp_05.py solves the same problem as bvp_04.py, except that on the right endpoint a Neumann condition is applied.


Last revised on 21 October 2018.