flâneur — a map of the web's best reading

Solving the Poisson equation — FEniCSx tutorial

jsdokken.com · 1,434 words · saved by 1 readers

The goal of this tutorial is to solve one of the most basic PDEs, the Poisson equation, with a few lines of code in FEniCSx. We start by introducing some fundamental FEniCSx objects, such as Function, functionspace, TrialFunction and TestFunction, and learn how to write a basic PDE solver. This will include: How to formulate a mathematical variational problem How to apply boundary conditions How to solve the discrete linear system How to visualize the solution The Poisson equation is the following boundary-value problem Here, 𝑢 = 𝑢 ( 𝑥 ) is the unknown function, 𝑓 = 𝑓 ( 𝑥 ) a prescribed function, ∇ 2 the Laplace operator (often written as Δ ), Ω the spatial domain, and 𝜕 Ω the boundary of Ω . The Poisson problem, including both the PDE, − ∇ 2 𝑢 = 𝑓 , and the boundary condition, 𝑢 = 𝑢 𝐷 on 𝜕 Ω , is an example of a boundary-value problem, which must be precisely stated before we can start solving it numerically with FEniCSx. In the two-dimensional space with

Solving the Poisson equation # Authors: Hans Petter Langtangen, Anders Logg Adapted to FEniCSx by Jørgen S. Dokken The goal of this tutorial is to solve one of the most basic PDEs, the Poisson equation, with a few lines of code in FEniCSx. We start by introducing some fundamental FEniCSx objects, such as Function , functionspace , TrialFunction and TestFunction , and learn how to write a basic PDE solver. This will include: How to formulate a mathematical variational problem How to apply boundary conditions How to solve the discrete linear system How to visualize the solution The Poisson equat

Explore this link on the map →

saved by

related reading