| 1 |
This demo illustrates how to: |
| 2 |
|
| 3 |
* Use meshes with boundary indicators |
| 4 |
* Solve the Poisson equation with Dirichlet boundary values |
| 5 |
|
| 6 |
|
| 7 |
The solution for :math:`u` in this demo will look as follows: |
| 8 |
|
| 9 |
.. image:: ../demo_bcs.png |
| 10 |
:scale: 75 % |
| 11 |
|
| 12 |
Equation and the problem definition |
| 13 |
----------------------------------- |
| 14 |
We will use the Poisson equation as a model problem when we demonstrate |
| 15 |
how to set boundary conditions for an imported mesh that includes boundary indicators. |
| 16 |
The Poisson equation is the canonical elliptic partial differential equation. |
| 17 |
For a domain :math:`\Omega \subset \mathbb{R}^3` with boundary :math:`\partial \Omega = \cup_{i = 0}^3 \Gamma_{D, i}`, |
| 18 |
the Poisson equation with particular boundary conditions reads: |
| 19 |
|
| 20 |
.. math:: |
| 21 |
- \nabla^{2} u &= f \quad {\rm in} \ \Omega, \\ |
| 22 |
u &= u_0 \quad {\rm on} \ \Gamma_{D, 0}, \\ |
| 23 |
u &= u_1 \quad {\rm on} \ \Gamma_{D, 1}, \\ |
| 24 |
u &= u_2 \quad {\rm on} \ \Gamma_{D, 2}, \\ |
| 25 |
u &= u_3 \quad {\rm on} \ \Gamma_{D, 3}. \\ |
| 26 |
|
| 27 |
Here, :math:`f` is some given input data and :math:`u_0`, :math:`u_1`, :math:`u_2` and :math:`u_3` |
| 28 |
are the prescribed values of :math:`u` at the boundaries. |
| 29 |
The variational form of the Poisson equation reads: find :math:`u \in V` such that |
| 30 |
|
| 31 |
.. math:: |
| 32 |
a(u, v) = L(v) \quad \forall \ v \in V, |
| 33 |
|
| 34 |
where :math:`V` is a suitable function space and |
| 35 |
|
| 36 |
.. math:: |
| 37 |
a(u, v) &= \int_{\Omega} \nabla u \cdot \nabla v \, {\rm d} x, \\ |
| 38 |
L(v) &= \int_{\Omega} f v \, {\rm d} x. |
| 39 |
|
| 40 |
The expression :math:`a(u, v)` is the bilinear form and :math:`L(v)` is the linear form. |
| 41 |
It is assumed that all functions in :math:`V` satisfy the Dirichlet boundary conditions. |
| 42 |
|
| 43 |
In this demo we shall consider the domain :math:`\Omega` to be a model |
| 44 |
of blood vessels with an aneurysm. It has one inlet vessel and two |
| 45 |
outlet vessels. We define noslip boundary conditions on the walls of |
| 46 |
the vessels and aneurysm, that is :math:`u = u_0 = 0.0`. We let |
| 47 |
:math:`u = u_1 = 1.0` be the Dirichlet condition on the inlet, the |
| 48 |
outlets will have the prescribed values :math:`u = u_2 = 2.0` and |
| 49 |
:math:`u = u_3 = 3.0`. In summary, we have: |
| 50 |
|
| 51 |
* :math:`u = u_0 = 0.0 \text{ on } \Gamma_{D, 0}` (noslip boundary) |
| 52 |
* :math:`u = u_1 = 1.0 \text{ on } \Gamma_{D, 1}` (inlet) |
| 53 |
* :math:`u = u_2 = 2.0 \text{ on } \Gamma_{D, 2}` (outlet 1) |
| 54 |
* :math:`u = u_3 = 3.0 \text{ on } \Gamma_{D, 3}` (outlet 2) |
| 55 |
* :math:`f = 0.0` (source term) |