FEniCS Course - FEniCS Project
FEniCS Course - FEniCS Project FEniCS Course - FEniCS Project
Canonical variational problemThe following canonical notation is used in FEniCS: find u ∈ Vsuch thata(u, v) = L(v)for all v ∈ ˆVFor Poisson’s equation, we have∫a(u, v) = ∇u · ∇v dx∫ΩL(v) = fv dxΩa(u, v) is a bilinear form and L(v) is a linear form8 / 22
A test problemWe construct a test problem for which we can easily check theanswer. We first define the exact solution byu(x, y) = 1 + x 2 + 2y 2We insert this into Poisson’s equation:f = −∆u = −∆(1 + x 2 + 2y 2 ) = −(2 + 4) = −6This technique is called the method of manufactured solutions9 / 22
- Page 1 and 2: FEniCS CourseLecture 2: Static line
- Page 3 and 4: The FEM cookbookAu = f(i)Partial di
- Page 5 and 6: Deriving a variational problem for
- Page 7: Discrete variational problem for Po
- Page 11 and 12: Step by step: the first lineThe fir
- Page 13 and 14: Step by step: creating a function s
- Page 15 and 16: Step by step: defining a boundary c
- Page 17 and 18: Step by step: defining the right-ha
- Page 19 and 20: Step by step: solving variational p
- Page 21 and 22: Python/FEniCS programming 1011 Open
A test problemWe construct a test problem for which we can easily check theanswer. We first define the exact solution byu(x, y) = 1 + x 2 + 2y 2We insert this into Poisson’s equation:f = −∆u = −∆(1 + x 2 + 2y 2 ) = −(2 + 4) = −6This technique is called the method of manufactured solutions9 / 22