Skip to content

Commit ecf74b4

Browse files
Bug correction on notebooks. Replace the introduction page by a Markdown file and remove them from notebooks
1 parent e9a970f commit ecf74b4

5 files changed

Lines changed: 78 additions & 129 deletions

File tree

_toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ parts:
5858
- file: chapter2/stokes-v2
5959
- file: chapter2/elliptic-curl
6060
- file: chapter2/elliptic-div
61-
- file: chapter2/linear-elasticity
61+
- file: chapter2/linear-elasticity-intro
6262
sections:
6363
- file: chapter2/linear-elasticity-v1
6464
- file: chapter2/linear-elasticity-v2
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Linear Elasticity
2+
3+
## The PDE problem
4+
The governing equations for small elastic deformations of a body $ \Omega $ can be expressed as:
5+
6+
$$
7+
\begin{align}
8+
-\nabla \cdot \sigma(u) &= f & \text{in } \Omega \\
9+
\sigma(u) &= \kappa \text{tr}(\epsilon(u))I + 2 \mu \epsilon(u)
10+
\end{align}
11+
$$
12+
13+
where $ \sigma $ is the stress tensor, $ f $ represents the body force per unit volume, $ \kappa $ and $ \mu $ are Lamé's elasticity parameters for the material, $ I $ denotes the identity tensor, $ \epsilon $ is the symmetric strain tensor and the displacement vector field is denoted by $ u $. $ \epsilon := \frac{1}{2}(\nabla u + (\nabla u)^T) $
14+
15+
16+
17+
By substituting $ \epsilon(u) $ into $ \sigma $, we obtain:
18+
19+
$$
20+
\sigma(u) = \kappa (\nabla \cdot u)I + \mu(\nabla u + (\nabla u)^T)
21+
$$
22+
23+
Then, the strong formulation of linear elasticity is :
24+
Find $ u \in V $ such that
25+
26+
$$
27+
\begin{align}
28+
-\nabla \cdot \sigma (u) &= f & \text{in } & \Omega \\
29+
u &= 0 & \text{on } & \partial \Omega_D \\
30+
\sigma(u) \cdot n &= g_T & \text{on } & \partial \Omega_T
31+
\end{align}
32+
$$
33+
34+
where :
35+
- $ V = \{ v \in (H^1(\Omega))^3 : v = 0 \text{ on } \partial \Omega_D \} $,
36+
37+
- $ g_D $ is the Dirichlet boundary condition on the part $ \partial \Omega_D $ of the boundary,
38+
39+
- $ g_T $ is the traction vector on the part $ \partial \Omega_T $ of the boundary,
40+
41+
- $ n $ is the outward normal vector on the boundary $ \partial \Omega $,
42+
43+
- $ \partial \Omega_D \cap \partial \Omega_T = \emptyset $ and $ \partial \Omega = \partial \Omega_D \cup \partial \Omega_T $.

chapter2/linear-elasticity-v1.ipynb

Lines changed: 28 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -5,54 +5,13 @@
55
"id": "9f28f9af",
66
"metadata": {},
77
"source": [
8-
"# Linear Elasticity Problem\n",
8+
"# Linear Elasticity Problem with Non-mixed Element Method\n",
99
"\n",
1010
"Analysis of deformable structures is essential in engineering, with the equations of linear elasticity being fundamental in this field. In this section, we present the variational formulation of linear elasticity equations using the principle of virtual work.\n",
1111
"This notebook treats the linear elasticity problem for compressible materials ($\\kappa = O(1)$).\n",
1212
"\n",
13-
"## The PDE problem\n",
14-
"The governing equations for small elastic deformations of a body $ \\Omega $ can be expressed as:\n",
1513
"\n",
16-
"$$\n",
17-
"\\begin{align}\n",
18-
" -\\nabla \\cdot \\sigma(u) &= f & \\text{in } \\Omega \\\\\n",
19-
" \\sigma(u) &= \\kappa \\text{tr}(\\epsilon(u))I + 2 \\mu \\epsilon(u)\n",
20-
"\\end{align}\n",
21-
"$$\n",
22-
"\n",
23-
"where $ \\sigma $ is the stress tensor, $ f $ represents the body force per unit volume, $ \\kappa $ and $ \\mu $ are Lamé's elasticity parameters for the material, $ I $ denotes the identity tensor, $ \\epsilon $ is the symmetric strain tensor and the displacement vector field is denoted by $ u $. $ \\epsilon := \\frac{1}{2}(\\nabla u + (\\nabla u)^T) $\n",
24-
"\n",
25-
"\n",
26-
"\n",
27-
"By substituting $ \\epsilon(u) $ into $ \\sigma $, we obtain:\n",
28-
"\n",
29-
"$$\n",
30-
"\\sigma(u) = \\kappa (\\nabla \\cdot u)I + \\mu(\\nabla u + (\\nabla u)^T)\n",
31-
"$$\n",
32-
"\n",
33-
"Then, the strong formulation of linear elasticity is :\n",
34-
"Find $ u \\in V $ such that\n",
35-
"\n",
36-
"$$\n",
37-
"\\begin{align}\n",
38-
" -\\nabla \\cdot \\sigma (u) &= f & \\text{in } & \\Omega \\\\\n",
39-
" u &= 0 & \\text{on } & \\partial \\Omega_D \\\\\n",
40-
" \\sigma(u) \\cdot n &= g_T & \\text{on } & \\partial \\Omega_T\n",
41-
"\\end{align}\n",
42-
"$$\n",
43-
"\n",
44-
"where : \n",
45-
"- $ V = \\{ v \\in H^1(\\Omega) : v = 0 \\text{ on } \\partial \\Omega_D \\} $,\n",
46-
"\n",
47-
"- $ g_D $ is the Dirichlet boundary condition on the part $ \\partial \\Omega_D $ of the boundary,\n",
48-
"\n",
49-
"- $ g_T $ is the traction vector on the part $ \\partial \\Omega_T $ of the boundary,\n",
50-
"\n",
51-
"- $ n $ is the outward normal vector on the boundary $ \\partial \\Omega $,\n",
52-
"\n",
53-
"- $ \\partial \\Omega_D \\cap \\partial \\Omega_T = \\emptyset $ and $ \\partial \\Omega = \\partial \\Omega_D \\cup \\partial \\Omega_T $.\n",
54-
"\n",
55-
"## The Variational Formulation\n",
14+
"## The Variational Formulation (Pure Displacement Formulation)\n",
5615
"The variational formulation of the linear elasticity equations involves forming the inner product of the PDE with a vector test function $ v \\in V $ and integrating over the domain $ \\Omega $. This yields:\n",
5716
"\n",
5817
"$$\n",
@@ -65,30 +24,44 @@
6524
"\\int_{\\Omega} \\sigma : \\nabla v \\, \\mathrm{d} x = \\int_{\\Omega} f \\cdot v \\, \\mathrm{d} x + \\int_{\\partial \\Omega_T} g_T \\cdot v \\, \\mathrm{d} s\n",
6625
"$$\n",
6726
"\n",
68-
"This leads to the variational formulation: Find $ u \\in V $ such that\n",
27+
"By using the symetry of the stress tensor $ \\sigma $, we can notice that \n",
28+
"\n",
6929
"\n",
7030
"$$\n",
71-
"a(u, v) = L(v) \\quad \\forall v \\in V\n",
31+
"a(u, v) = \\int_{\\Omega} \\sigma : \\nabla v \\, \\mathrm{d} x = \\int_{\\Omega} \\sigma(u) : \\epsilon(v) \\, \\mathrm{d} x\n",
7232
"$$\n",
7333
"\n",
74-
"where\n",
34+
"\n",
35+
"This leads to the following variational formulation:\n",
7536
"\n",
7637
"$$\n",
77-
"\\begin{align}\n",
78-
" a(u, v) &= \\int_{\\Omega} \\sigma(u) : \\nabla v \\, \\mathrm{d} x \\\\\n",
79-
" L(v) &= \\int_{\\Omega} f \\cdot v \\, \\mathrm{d} x + \\int_{\\partial \\Omega_T} g_T \\cdot v \\, \\mathrm{d} s\n",
80-
"\\end{align}\n",
38+
"\\boxed{\n",
39+
"\\begin{aligned}\n",
40+
"&\\text{Find } \\vec u \\in V \\text{ such that:} \\\\\n",
41+
"&\\qquad a(\\vec u, \\vec v) = L(\\vec v) \\quad \\forall \\vec v \\in V\n",
42+
"\\end{aligned}\n",
43+
"}\n",
8144
"$$\n",
8245
"\n",
83-
"This formulation can be alternatively expressed as:\n",
46+
"with\n",
8447
"\n",
8548
"$$\n",
86-
"a(u, v) = \\int_{\\Omega} \\sigma(u) : \\epsilon(v) \\, \\mathrm{d} x\n",
49+
"\\begin{aligned}\n",
50+
"&a : \n",
51+
"\\begin{cases}\n",
52+
"V \\times V \\rightarrow \\mathbb{R} \\\\\n",
53+
"(\\vec u, \\vec v) \\longmapsto \\int_\\Omega \\boldsymbol{\\sigma}(\\vec u) : \\boldsymbol{\\varepsilon}(\\vec v) \\, dV\n",
54+
"\\end{cases} \\\\[0.3cm]\n",
55+
"&L : \n",
56+
"\\begin{cases}\n",
57+
"V \\rightarrow \\mathbb{R} \\\\\n",
58+
"\\vec v \\longmapsto \\int_\\Omega \\vec f \\cdot \\vec v \\, dV + \\int_{\\partial\\Omega_T} \\vec g_T \\cdot \\vec v \\, dS\n",
59+
"\\end{cases}\n",
60+
"\\end{aligned}\n",
8761
"$$\n",
8862
"\n",
89-
"where $ \\epsilon(v) = \\frac{1}{2} (\\nabla v + (\\nabla v)^T) $ is the symmetric strain tensor.\n",
9063
"\n",
91-
"This variational formulation is essential for solving linear elasticity problems numerically using methods like the finite element method (FEM)."
64+
"This variational formulation is essential for solving linear elasticity problems numerically using PSYDAC."
9265
]
9366
},
9467
{
@@ -195,7 +168,7 @@
195168
"source": [
196169
"d = 2 # discretization parameters\n",
197170
"degree = [d,d,d]\n",
198-
"h = 8\n",
171+
"h = 6\n",
199172
"ncells = [h,h,h]"
200173
]
201174
},

chapter2/linear-elasticity-v2.ipynb

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -8,47 +8,6 @@
88
"# Linear Elasticity Problem with Mixed Element Method\n",
99
"This notebook treats the linear elasticity problem for materials with high values of the Lamé parameters ($\\kappa \\gg 1$).\n",
1010
"\n",
11-
"## The PDE problem\n",
12-
"The governing equations for small elastic deformations of a body $ \\Omega $ can be expressed as:\n",
13-
"\n",
14-
"$$\n",
15-
"\\begin{align}\n",
16-
" -\\nabla \\cdot \\sigma(u) &= f & \\text{in } \\Omega \\\\\n",
17-
" \\sigma(u) &= \\kappa \\text{tr}(\\epsilon(u))I + 2 \\mu \\epsilon(u)\n",
18-
"\\end{align}\n",
19-
"$$\n",
20-
"\n",
21-
"where $ \\sigma $ is the stress tensor, $ f $ represents the body force per unit volume, $ \\kappa $ and $ \\mu $ are Lamé's elasticity parameters for the material, $ I $ denotes the identity tensor, $ \\epsilon $ is the symmetric strain tensor and the displacement vector field is denoted by $ u $. $ \\epsilon := \\frac{1}{2}(\\nabla u + (\\nabla u)^T) $\n",
22-
"\n",
23-
"\n",
24-
"\n",
25-
"By substituting $ \\epsilon(u) $ into $ \\sigma $, we obtain:\n",
26-
"\n",
27-
"$$\n",
28-
"\\sigma(u) = \\kappa (\\nabla \\cdot u)I + \\mu(\\nabla u + (\\nabla u)^T)\n",
29-
"$$\n",
30-
"\n",
31-
"Then, the strong formulation of linear elasticity is :\n",
32-
"Find $ u \\in V $ such that\n",
33-
"\n",
34-
"$$\n",
35-
"\\begin{align}\n",
36-
" -\\nabla \\cdot \\sigma (u) &= f & \\text{in } & \\Omega \\\\\n",
37-
" u &= 0 & \\text{on } & \\partial \\Omega_D \\\\\n",
38-
" \\sigma(u) \\cdot n &= g_T & \\text{on } & \\partial \\Omega_T\n",
39-
"\\end{align}\n",
40-
"$$\n",
41-
"\n",
42-
"where : \n",
43-
"- $ V = \\{ v \\in (H^1(\\Omega))^3 : v = 0 \\text{ on } \\partial \\Omega_D \\} $,\n",
44-
"\n",
45-
"- $ g_D $ is the Dirichlet boundary condition on the part $ \\partial \\Omega_D $ of the boundary,\n",
46-
"\n",
47-
"- $ g_T $ is the traction vector on the part $ \\partial \\Omega_T $ of the boundary,\n",
48-
"\n",
49-
"- $ n $ is the outward normal vector on the boundary $ \\partial \\Omega $,\n",
50-
"\n",
51-
"- $ \\partial \\Omega_D \\cap \\partial \\Omega_T = \\emptyset $ and $ \\partial \\Omega = \\partial \\Omega_D \\cup \\partial \\Omega_T $.\n",
5211
"\n",
5312
"## The pressure field\n",
5413
"In the case of high values of the Lamé parameter $ \\kappa $, the pressure field $ p $ can be defined as:\n",
@@ -63,17 +22,18 @@
6322
"## The strong formulation of the problem\n",
6423
"The strong formulation of the problem can be expressed as follows:\n",
6524
"Find $ (u, p) \\in V \\times L^2(\\Omega) $ such that\n",
25+
"\n",
6626
"$$\n",
6727
"\\begin{align}\n",
68-
" -\\nabla \\cdot \\sigma(u) &= f & \\text{in } & \\Omega \\\\\n",
28+
" -\\nabla \\cdot \\sigma(u,p) &= f & \\text{in } & \\Omega \\\\\n",
6929
" u &= 0 & \\text{on } & \\partial \\Omega_D \\\\\n",
70-
" \\sigma(u) \\cdot n &= g_T & \\text{on } & \\partial \\Omega_T \\\\\n",
30+
" \\sigma(u,p) \\cdot n &= g_T & \\text{on } & \\partial \\Omega_T \\\\\n",
7131
" \\nabla \\cdot u + \\frac{1}{\\kappa} p &= 0 & \\text{in } & \\Omega\n",
7232
"\\end{align}\n",
7333
"$$\n",
7434
"\n",
75-
"## The weak formulation of the problem\n",
76-
"To derive the weak formulation of the problem, we multiply the first equation by a test function $ v \\in V $ and integrate by parts over the domain $ \\Omega $ and we add the fourth equation multiplied by a test function $ q \\in L^2(\\Omega) $:\n",
35+
"## The Variational Formulation (Pressure-Displacement Formulation)\n",
36+
"To derive the weak formulation of the problem, we multiply the first equation by a test function $ v \\in V $ and integrate by parts over the domain $ \\Omega $ and we add the fourth equation multiplied by a test function $ q \\in L^2(\\Omega) $ integrated over the domain $ \\Omega $:\n",
7737
"\n",
7838
"$$\n",
7939
"\\boxed{\n",
@@ -200,7 +160,7 @@
200160
"source": [
201161
"d = 2 # discretization parameters\n",
202162
"degree = [d,d,d]\n",
203-
"h = 8\n",
163+
"h = 6\n",
204164
"ncells = [h,h,h]"
205165
]
206166
},

chapter2/linear-elasticity.ipynb

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)