|
7 | 7 | "source": [ |
8 | 8 | "# Harmonic fields with H1 fem spaces\n", |
9 | 9 | "\n", |
10 | | - "In this example we .... consider the vector Poisson equation with homogeneous Dirichlet boundary conditions:\n", |
| 10 | + "In this exercise we consider the following vector problem with homogeneous boundary conditions in H(curl):\n", |
11 | 11 | "\n", |
12 | 12 | "$$\n", |
13 | 13 | "\\begin{align}\n", |
14 | | - " - \\nabla^2 \\mathbf{u} = \\mathbf{f} \\quad \\mbox{in} ~ \\Omega, \\quad \\quad \n", |
15 | | - " \\mathbf{u} = 0 \\quad \\mbox{on} ~ \\partial \\Omega.\n", |
| 14 | + " \\nabla \\times \\mathbf{u} = 0 \\quad \\mbox{in} ~ \\Omega \\\\\n", |
| 15 | + " \\nabla \\cdot \\mathbf{u} = 0 \\quad \\mbox{in} ~ \\Omega \\\\\n", |
| 16 | + " \\mathbf{n} \\times \\mathbf{u} = 0 \\quad \\mbox{on} ~ \\partial \\Omega.\n", |
16 | 17 | "\\end{align}\n", |
17 | 18 | "$$\n", |
18 | 19 | "\n", |
|
23 | 24 | "$$\n", |
24 | 25 | "\\begin{align}\n", |
25 | 26 | " \\text{find $\\mathbf{u} \\in V$ such that} \\quad \n", |
26 | | - " a(\\mathbf{u},\\mathbf{v}) = l(\\mathbf{v}) \\quad \\forall \\mathbf{v} \\in V,\n", |
| 27 | + " a(\\mathbf{u},\\mathbf{v}) = 0 \\quad \\forall \\mathbf{v} \\in V,\n", |
27 | 28 | "\\end{align}\n", |
28 | 29 | "$$\n", |
29 | 30 | "\n", |
30 | 31 | "where \n", |
31 | 32 | "\n", |
32 | | - "- $V \\subset \\mathbf{H}_0^1(\\Omega)$, \n", |
33 | | - "- $a(\\mathbf{u},\\mathbf{v}) := \\int_{\\Omega} \\nabla \\mathbf{u} : \\nabla \\mathbf{v} ~ d\\Omega$,\n", |
34 | | - "- $l(\\mathbf{v}) := \\int_{\\Omega} \\mathbf{f} \\cdot \\mathbf{v} ~ d\\Omega$." |
| 33 | + "- $V \\subset (\\mathbf{H}^1(\\Omega))^2$, \n", |
| 34 | + "- $a := a_{\\rm curl} + a_{\\rm div} + a_{\\rm bc}$\n", |
| 35 | + "- $a_{\\rm curl}(\\mathbf{u},\\mathbf{v}) = \\int_{\\Omega} (\\nabla \\times \\mathbf{u}) \\cdot (\\nabla \\times \\mathbf{v})$,\n", |
| 36 | + "- $a_{\\rm div}(\\mathbf{u},\\mathbf{v}) = \\int_{\\Omega} (\\nabla \\cdot \\mathbf{u}) (\\nabla \\cdot \\mathbf{v})$,\n", |
| 37 | + "- $a_{\\rm bc}(\\mathbf{u},\\mathbf{v}) = \\kappa \\int_{\\partial\\Omega} (\\mathbf{n} \\times \\mathbf{u}) \\cdot (\\mathbf{n} \\times \\mathbf{v})$.\n", |
| 38 | + "\n", |
| 39 | + "with $\\kappa$ a large penalization constant.\n", |
| 40 | + "\n", |
| 41 | + "The exercise is to assemble the matrix of $a$ and compute the first eigenmode using scipy.\n", |
| 42 | + "\n", |
| 43 | + "The same problem will be addressed in another notebook with structure preserving finite elements, where the solution will only be in H(curl)\n", |
| 44 | + "and the divergence-free equation will only be imposed in a weak sense.\n" |
35 | 45 | ] |
36 | 46 | }, |
37 | 47 | { |
|
264 | 274 | ] |
265 | 275 | } |
266 | 276 | ], |
267 | | - "metadata": { |
268 | | - "language_info": { |
269 | | - "name": "python" |
270 | | - } |
271 | | - }, |
| 277 | + "metadata": {}, |
272 | 278 | "nbformat": 4, |
273 | 279 | "nbformat_minor": 5 |
274 | 280 | } |
0 commit comments