Méthodes numériques pour les EDP

Christophe Prud'homme <christophe.prudhomme@cemosis.fr>, Laurent Navoret

Rappels de calcul différentiel et intégral

Champs scalaire

\(u: x \in \mathbb{R}^{d} \mapsto u(x) \in \mathbb{R}\)

gradient

\(\nabla u=\left(\partial_{x_{1}} u, \ldots, \partial_{x_{d}} u\right)^{T} \in \mathbb{R}^{d}\)

champs de vecteur

\(U: x \in \mathbb{R}^{d} \mapsto\left(U_{1}(x), \ldots, U_{d}(x)\right) \in \mathbb{R}^{d}\)

divergence

\(\nabla \cdot U=\partial_{x_{1}} U_{1}\ldots\partial_{x_{d}} U_{d}\)

gradient
\[\nabla U=\left(\partial_{x_{j}} U_{i}\right)=\left[\begin{array}{c}\nabla U_{1}^{T} \\ \vdots \\ \nabla U_{d}^{T}\end{array}\right]\]

Laplacien

champs scalaire

\(\Delta u=\nabla \cdot \nabla u=\partial_{x_{1}^{2}} u+\ldots+\partial_{x_{d}^{2}} u\)

champs de vecteur

\(\Delta U=\nabla \cdot \nabla U=(\partial_{x_{1}^{2}} U_1+\ldots+\partial_{x_{d}^{2}} U_1,\ldots,\partial_{x_{1}^{2}} U_d+\ldots+\partial_{x_{d}^{2}} U_d)\)

Visualisation

Logiciels

Paraview, Visit, Mayavi, Gmsh, …​

champs scalaire

  • ensemble de niveau \(c\) \(\{x \in \mathbb{R}^d, u(x) = c\}, \min u(x) \leq c \leq \max u(x) \)

  • graphe \(\{ (x , \alpha*u(x)), x \in \Omega \} \subset \mathbb{R}^{d+1}\) où \(\alpha\) est un facteur d’échelle (scaling factor sous paraview, voir WarpByScalar)

champs de vecteurs

  • ensemble de niveau par composante ou sur la magnitude \(x \mapsto |u(x)|\) (Contour sous paraview)

  • lignes de courant \(t \mapsto X(t)\) telles que \(X'(t)=U \circ X(t), \quad X(0) = x_0\) (streamline sous paraview)

  • flèches \(x \mapsto (U_1(x),\ldots,U_d(x))\) (glyphs sous paraview)

Formules de Green

Proposition \(\Omega\) ouvert régulier (Lipshitz), \(u \in C^{1}(\bar{\Omega})\)

\[\int_{\Omega} \partial_{x_{i}} u(x) d x=\int_{\partial \Omega} u(x) n_{i}(x) d \sigma\]

lntégration par partie Proposition \(\Omega\) ouvert régulier (Lipshitz) \(u, v \in C^{1}(\bar{\Omega})\)

\[\int_{\Omega} \partial_{x_{i}} u v d x=-\int_{\Omega} u \partial_{x_{i}} v d x+\int_{\partial \Omega}\left(u n_{i}\right) v d \sigma\]

\(u \in C^{2}(\bar{\Omega}), v \in C^{1}(\bar{\Omega})\)

\[\int_{\Omega} \Delta u v d x=-\int_{\Omega} \nabla u \cdot \nabla v d x+\int_{\partial \Omega}(n \cdot \nabla u) v d \sigma\]

Formule de Gauss

\(U \in C^{1}\left(\bar{\Omega}, \mathbb{R}^{d}\right)\)

\[\int_{\Omega} \nabla \cdot U d x=\int_{\partial \Omega}(n \cdot U) d \sigma\]

Intégration sur une courbe

Intégrale sur une courbe \(\Sigma \subset \mathbb{R}^{2}\) paramétrée par

\[x: t \in[a, b] \mapsto x(t) \in \mathbb{R}^{2}\]
\[\int_{\Sigma} f(x) d \sigma(x)=\int_{[a, b]} f(x(t))\left\|x^{\prime}(t)\right\| d t\]

Intégrale sur une surface

\(\Sigma \subset \mathbb{R}^{3}\) paramétrée par

\[x:(t, s) \in[a, b] \times[c, d] \mapsto x(t, s) \in \mathbb{R}^{3} \mbox{ et } n=\partial_{t} x \times \partial_{s} x\]
\[\int_{\Sigma} f(x) d \sigma(x)=\int_{[a, b] \times[c, d]} f(x(t, s))\left\|\partial_{t} x \times \partial_{s} x\right\| d t d s\]

intégrale d’un champ de vecteur sur une surface

\[\int_{\Sigma} U \cdot d \sigma=\int_{\Sigma}(U \cdot n) d \sigma\]

Problème de Poisson

Problème

trouver \(u: \Omega \rightarrow \mathbb{R}^{d}\) tel que

\[\begin{split} -\Delta u(x)&=f(x) \mbox{ sur } \Omega\\ u(x)&=0 \mbox{ sur } \partial \Omega\\ \end{split}\]

avec \(\Omega \subset \mathbb{R}^{d}\) ouvert borné Lipshitzien. On applique des conditions de type Dirichlet homogène.

Modèle physique associé

  • \(u\) déformation d’une membrane élastique

  • \(u=n\) densité de molécule chimique qui diffuse

  • \(u=T\) température

  • \(u=\phi\) potentiel électrique

\(\rightarrow\) Modèles stationnaires, à l’équilibre (pas de dépendance temporelle)

Interprétation

Equilibre
\[\begin{aligned} -\Delta u=f & \Longleftrightarrow \mbox{écrire les étapes ici } \\ & \Longleftrightarrow \\ & \Longleftrightarrow \quad \forall \omega \subset \Omega, \quad-\int_{\partial \omega}(n \cdot \nabla u) d \sigma=\int_{\omega} f \end{aligned}\]
bilan de force

force surfacique et force volumique à l’équilibre

bilan de matière

flux surfacique et terme source volumique

Etapes de la Méthodes des éléménts finis

1) Problème variationnel

\(\Omega\) ouvert régulier (Lipshitz)

Espaces de Sobolev:

\[\begin{aligned} H^{1}(\Omega) &=\left\{u \in L^{2}(\Omega), \quad \partial_{x_{i}} u \in L^{2}(\Omega)\right\} \\ &=\left\{u \in L^{2}(\Omega), \quad \nabla u \in\left(L^{2}(\Omega)\right)^{d}\right\}=\overline{C_{c}^{\infty}(\bar{\Omega})} \\ H_{0}^{1}(\Omega) &=\left\{u \in H^{1}(\Omega), \quad u_{| \partial \Omega}=0\right\}=\overline{C_{c}^{\infty}(\Omega)} \end{aligned}\]

Formule d’intégration par partie: \(u, v \in H^{1}(\Omega)\)

\[\int_{\Omega} \partial_{x_{i}} u v d x=-\int_{\Omega} u \partial_{x_{i}} v d x+\int_{\partial \Omega}\left(u n_{i}\right) v d \sigma\]

Formule de Green: \(u \in H^{2}(\Omega), v \in H^{1}(\Omega)\)

\[\int_{\Omega} \Delta u v d x=-\int_{\Omega} \nabla u \cdot \nabla v d x+\int_{\partial \Omega}(n \cdot \nabla u) v d \sigma\]

Poisson, Dirichlet homogène:

\[\text { Trouver } u \in H_{0}^{1}(\Omega), \quad \int_{\Omega} \nabla u \cdot \nabla v=\int_{\Omega} f v, \quad \forall v \in H_{0}^{1}(\Omega)\]

2) Résolution et régularité

Definition Problème variationnel

Soit \(V\) un espace de Hilbert, on note \(a: V \times V \rightarrow \mathbb{R}\) and \(\ell: V \rightarrow \mathbb{R}\)

\[\text {Trouver } u \in V, \quad a(u, v)=\ell(v), \quad \forall v \in V\]
Proposition (Lax-Milgram)
  • a: forme bilinéaire, continue, coercive sur \(V\)

  • \(\ell:\) forme linéaire continue sur \(V\)

    Alors, le problème variationnel admet une unique solution \(u \in V\) De plus, si la forme bilinéaire est symmétrique, la solution est le minimum de la fonctionnelle

\[J(u)=\frac{1}{2} a(u, u)-\ell(u)\]

Application:

Soit \(f \in L^{2}(\Omega)\).

Le problème de Poisson (avec condition de Dirichlet) admet une unique solution faible \(u \in H_{0}^{1}(\Omega)\).

Régularité

Si de plus \(\left.\Omega \text { est de classe } C^{2} \text { (ou polyédrique convexe en } 2 \mathrm{d}\right),\) alors \(u \in H^{2}(\Omega)\)

Méthode de Galerkin

Definition: Soit \(V_{h}\) sous espace vectoriel de \(V\) de dimension finie \(N_{h} .\) La famille \(\left(V_{h}\right)_{h}\) est une approximation interne de \(V\) si pour tout \(u \in V,\) il existe \(\left(u_{h}\right)_{h}\) tel que \(\left\|u-u_{h}\right\|_{V} \rightarrow 0\)

Problème variationnel approché: Soit \(V\) un espace de Hilbert, trouver:

\[u_{h} \in V_{h}, \quad a\left(u_{h}, v_{h}\right)=\ell\left(v_{h}\right), \quad \forall v_{h} \in V_{h}\]

avec \(a: V \times V \rightarrow \mathbb{R}\) and \(\ell: V \rightarrow \mathbb{R}\)

Soit \(\left(\varphi_{i}\right)\) base de \(V_{h}\)

\[u_{h}(x)=\sum_{j=1}^{N_{h}} u_{j} \varphi_{j}(x)\]

Méthode de Galerkin

\[\begin{aligned} a\left(u_{h}, v_{h}\right)=\ell\left(v_{h}\right), \quad \forall v_{h} \in V_{h} & \Longleftrightarrow \sum_{j=1}^{N_{h}} u_{j} a\left(\varphi_{j}, v_{h}\right)=\ell\left(v_{h}\right), \quad \forall v_{h} \in V_{h} \\ & \Longleftrightarrow \sum_{j=1}^{N_{h}} u_{j} a\left(\varphi_{j}, \varphi_{i}\right)=\ell\left(\varphi_{i}\right), \quad \forall i \in \mathbb{I} 1, N_{h} \mathbb{I} \\ & \Longleftrightarrow A u_{h}=b \\ \operatorname{avec} A=\left(a\left(\varphi_{i}, \varphi_{j}\right)\right)_{i, j} \text { et } b=\left(\ell\left(\varphi_{i}\right)\right) \end{aligned}\]

Question: définir les espaces \(V_{h}\) et les bases \(\left(\varphi_{i}\right)\)

Maillage

Definition (Maillage) Maillage: partition du domaine en \(N_{\mathrm{el}}\) sous-ensembles disjoints (compact, connexe, à frontière Lipshitz et d’intérieur non vide)

\[\bar{\Omega}=\bigcup_{i=1}^{N_{\mathrm{e} 1}} K_{i} \quad \mbox{ avec } \stackrel{\circ}{K}_{i} \cap \stackrel{\circ}{K}_{j}=\emptyset\]

\(\mathcal{T}_{h}=\left\{K_{i}, i = 1, \ldots, N_{\mathrm{el}} \right\}\)

  • diamètre d’un élément: \(h_{K}=\operatorname{diam}(K)=\max _{x, y \in K}\|x-y\|\)

  • plus grand diamètre: \(h=\max _{K \in \mathcal{T}_{h}} h_{K}\)

Definition: Maillage conforme si l’intersection de deux éléments est soit vide, soit un sommet soit une arête soit une face.

Transformation géométrique

Génération de maillage à partir d’un élément de référence \(\hat{K}\) \(\rightarrow K_{i}=T_{K_{i}}(\hat{K})\) où \(T_{K_{i}}\) est une transformation géométrique.

\(\rightarrow T_{K_{i}}\) est un \(C^{1}\) diffeomorphisme (bijective, \(C^{1}\) et d’inverse \(C^{1}\) )

Maillage affine lorsque toutes les transformations sont affines.
  • maillage polyèdrique si \(\hat{K}\) est un polyèdre

  • \(\hat{K}\) cuboid (carré en \(2 \mathrm{D}\), cube en \(3 \mathrm{D}\) ) : maille parallelogramme ( \(2 \mathrm{D}\) ), maille parrallélipédique (3D)

  • \(\hat{K}\) simplexe (triangle en 2 D, tétraèdre en \(3 \mathrm{D}\) ): maille triangulaire \((2 \mathrm{D})\) maille trétraédrique ( \(3 \mathrm{D}\) )

possibilité de maillages mixtes

Approximation par éléments finis de Lagrange

3) Choix du maillage \(\mathcal{T}_{h}=\left\{K_{i}\right\}\) maillage

4) Choix de l’espace \(V_{h}\)

Proposition

Soit \(u \in C(\Omega)\) telle que \(u_{| K} \in H^{1}(K)\) pour tout \(K \in \mathcal{T}_{h} .\) Alors \(u \in H^{1}(\Omega)\)

\(P_{c,h}^{k}=\left\{v_{h} \in C(\bar{\Omega}), \quad \forall K \in \mathcal{T}_{h}, v_{h | K} \in \mathbb{P}_{k}\right\} \subset H^{1}(\Omega)\) fonctions continues affines par morceaux

\(P_{c,h,0}^{k}=\left\{v_{h} \in P_{h}^{k}, \quad v_{h | \partial \Omega}=0\right\} \subset H_{0}^{1}(\Omega)\) fonctions continues affines par morceaux nulles au bord

5) Construction d’une base l’espace \(V_{h}\)

Définir une base de \(P_{c,h}^{1}\) ? Comment la décrire?

Exemple: Degré de libertés sur un simplexe

Simplexe: \(K=\left\{x \in \mathbb{R}_{}^{d}, x_{1}\ldots+x_{d} \leqslant 1\right\}\) de sommets \(a_{1}, \ldots, a_{d+1}\)

Proposition

Tout polynôme \(p \in \mathbb{P}_{1}\) se met sous la forme: \(p(x)=\sum_{j=1}^{d+1} p\left(a_{j}\right) \lambda_{j}(x)\) ou les \(\left(\lambda_{j}(x)\right)\) sont les coordonnées barycentriques de \(x\left(\lambda_{j} \text { fonction affine valant } 1\right.\) en \(a_{j}\) et 0 en \(a_{i}\) pour \(i \neq j\) ).

  • \(\rightarrow\) Les valeurs aux points \(a_{j}\) déterminent \(p \in \mathbb{P}_{1}\) de manière unique

  • \(\rightarrow\) si \(\mathbb{P}_{k}\) est de dimension \(n_{k},\) il faut les valeurs en \(n_{k}\) points (de \(K\) ) pour déterminer un polynôme \(p \in \mathbb{P}_{1}\) de manière unique.

Eléments finis de Lagrange: Elément fini de Lagrange \((K, P, \Sigma): K\) partie de \(\mathbb{R}^{d}, P\) e.v. de fonctions polynomiales définie sur \(K, \Sigma=\left\{a_{1}, \ldots, a_{n}\right\}\)

Definition: \(\Sigma\) est \(P\) -unisolvant si pour tout réels \(\left(b_{i}\right), \exists ! p \in P\) tel que \(p\left(a_{i}\right)=b_{i}\)

Notation: fonction de base \(\left(\psi_{i}\right): \psi_{i}\left(a_{j}\right)=\delta_{i, j}\)

Eléments finis sur le maillage

\(\mathcal{T}_{h}\) maillage construit à partir de \(\hat{K}\). On note \(\mathcal{T}_{h}\) \((\hat{K}, \hat{P}, \hat{\Sigma})\) l’élément fini de référence. A tout \(K \in \mathcal{T}_{h}\), on associe le triplet \((K, P, \Sigma)\) avec

  • \(P_{K}=\left\{\hat{p} \circ T_{K}^{-1}, \hat{p} \in \hat{P}\right\}\)

  • \(\cdot \Sigma=\left\{a_{K, i}=T_{K}\left(\hat{a}_{i}\right)\right\}\) Fonction de forme : \(\psi_{K, i}=\hat{\psi}_{i} \circ T_{K}^{-1}\)

Construction de la base: \(\left(\varphi_{i}\right)\) \(\left\{a_{1}, \ldots, a_{N}\right\}=\cup_{K \in \mathcal{T}_{h}}\left\{a_{K, 1}, \ldots, a_{K, n}\right\}:\) points de tous les éléments finis du maillage (sans répétition)

A chaque \(a_{j}\) correspond une fonction de base \(\varphi_{j}\)

\[\forall K \supset a_{j}, \quad \varphi_{j | K}=\psi_{K, r_{K, j}}\]

avec \(\psi_{K, r_{K, j}}\left(a_{j}\right)=1\). \(\varphi_{i} \in P_{c,h}^{k}\) et \(\left\{\varphi_{1}, \ldots, \varphi_{N}\right\}\) forment une base de \(P_{c, h}^{k}\)

Base de \(P_{c,h,0}^{k}\): on retire les fonctions associées aux points du bord.

Résolution

\(\forall i = 1,\ldots, N, \quad \sum_{j=1}^{N} u_{j} \int_{\Omega} \nabla \varphi_{j} \cdot \nabla \varphi_{i}=\int_{\Omega} f \varphi_{i}\) est equivalent à résoudre

\[A \begin{pmatrix} u_{1}\\ \vdots \\ u_{N} \end{pmatrix}=b\]

avec \(A=\left(\int_{\Omega} \nabla \varphi_{i} \cdot \nabla \varphi_{j}\right)_{i, j} \in M_{N}(\mathbb{R})\) \(b=\left(\int_{\Omega} f \varphi_{i}\right)_{i} \in \mathbb{R}^{N}\)

  • \(\rightarrow\) Matrice symétrique définie positive

  • \(\rightarrow\) Matrice creuse

  • \(\rightarrow\) Méthode Cholesky, Gradient Conjugué, Multigrille

Convergence

Définition: \(\Omega\) polyédrique. \(\left(\mathcal{T}_{h}\right)_{h}\) est une suite régulière de triangulation si \(h \rightarrow 0\) et il existe \(C>0\)

\[\forall h, \quad \sup _{K}\left(\frac{h_{K}}{\rho_{K}}\right) \leqslant C\]

où \(\rho_{K}\) est le rayon du cercle inscrit du triangle \(K\)

Proposition

\(\Omega\) polyédrique et \(\left(\mathcal{T}_{h}\right)\) une famille régulière de triangulations. Soit \(f \in L^{2}(\Omega)\) et \(u \in H_{0}^{1}(\Omega)\) la solution du problème. Soit \(u_{h} \in P_{c,h,0}^{1}\) la solution du problème de Poisson approché. Alors

\[\left\|u-u_{h}\right\|_{H^{1}} \rightarrow 0\]

Si de plus \(u \in H^{2}(\Omega),\) alors

\[\left\|u-u_{h}\right\|_{H^{1}} \leqslant C h\|f\|_{L^{2}} \quad \left\|u-u_{h}\right\|_{L^{2}} \leqslant C h^{2}\|f\|_{L^{2}}\]