This book gives a concise and gentle introduction to finite element programming in Python based on the popular FEniCS software library. Through a series of examples, including among others the Poisson equation, the equations of linear elasticity, the incompressible Navier–Stokes equations, and systems of nonlinear advection–diffusion–reaction equations, the reader is guided through the essential steps of how to quickly solve a PDE in FEniCS, including how to define a finite variational problem, how to set boundary conditions, how to solve linear and nonlinear systems, and how to visualize solutions and structure finite element Python programs.
This document is also available in PDF and Sphinx formats.