Choral
Functions/Subroutines
elasticity_Dirichlet_2D.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

program elasticity_dirichlet_2d
  SOLVES THE LINEAR ELASTICITY PROBLEM with a Dirichlet boundary conditions More...
 
real(rp) function lambda (x)
 Lame coefficient 'lambda'. More...
 
real(rp) function mu (x)
 Lame coefficient 'mu'. More...
 
real(rp) function u_1 (x)
 exact solution u=(u_1, u_2) More...
 
real(rp) function u_2 (x)
 
real(rp) function, dimension(3) grad_u_1 (x)
 gradient of the exact solution More...
 
real(rp) function, dimension(3) grad_u_2 (x)
 
real(rp) function f_1 (x)
 right hand side 'f'= =(f_1, f_2) More...
 
real(rp) function f_2 (x)
 
real(rp) function gam (x)
 To characterise . More...
 
real(rp) function cc (x)
 
real(rp) function ss (x)
 
real(rp) function cs (x)
 
real(rp) function sc (x)
 
real(rp) function cc4 (x)
 
real(rp) function ss4 (x)
 
real(rp) function cs4 (x)
 
real(rp) function sc4 (x)
 

Function/Subroutine Documentation

◆ cc()

real(rp) function elasticity_dirichlet_2d::cc ( real(rp), dimension(3), intent(in)  x)

Definition at line 407 of file elasticity_Dirichlet_2D.f90.

◆ cc4()

real(rp) function elasticity_dirichlet_2d::cc4 ( real(rp), dimension(3), intent(in)  x)

Definition at line 437 of file elasticity_Dirichlet_2D.f90.

◆ cs()

real(rp) function elasticity_dirichlet_2d::cs ( real(rp), dimension(3), intent(in)  x)

Definition at line 421 of file elasticity_Dirichlet_2D.f90.

◆ cs4()

real(rp) function elasticity_dirichlet_2d::cs4 ( real(rp), dimension(3), intent(in)  x)

Definition at line 451 of file elasticity_Dirichlet_2D.f90.

◆ elasticity_dirichlet_2d()

program elasticity_dirichlet_2d ( )

SOLVES THE LINEAR ELASTICITY PROBLEM with a Dirichlet boundary conditions

Search for \(u:~\Omega \mapsto \R^2\) with \( \Omega= [0,1]^2 \) that satisfies

\(~~~~~~~~~ -\dv(A(x) e(u)) = f ~~~\) on \(~~~ \Omega \)

\(~~~~~~~~~~ u = g ~~~\) on \(~~~\Gamma = \partial \Omega ~~~\) with

  • \( f:~\Omega\mapsto \R^2\)
  • \( g:~\Gamma\mapsto \R^2\)


PROBLEM DATA See choral/maple/example_elasticity_dirichlet.mw
for the definition of \( f(x),~u(x),~\lambda(x),~\mu(x)\).


HOOKE TENSOR \( A(x)\xi = \lambda(x) Tr(\xi) Id + 2 \mu(x)\xi \) with \( \lambda,~\mu~: \Omega \mapsto \R \)


SYMMETRISED GRADIENT \( e(u) = (\nabla u + ^T\nabla u)/2 \)


VARIATIONAL FORMULATION

  • The finite element space is \( X_h\subset \Hu\).
  • Let \( X_{h,0} \subset X_h\) the subspace of all functions vanishing on \( \Gamma \).


NUMERICAL PROBLEM find \( u\in [X_h]^2 \) such that \( ~~\forall ~v \in [X_{h,0}]^2, ~~~~ \)

\[ \int_\Omega A(x) e(u):e(v) \,\dx ~=~ \int_\Omega f \cdot v \,\dx \]

with \( \xi:\zeta = \sum_{1\le i,j \le 2} \xi_{ij}\zeta_{ij}\) for the 2 matrices \( \xi~, \zeta \in \R^{2\times 2}\),
and such that for all finite element node \( x\in \Gamma \)

\[ u(x) = g(x). \]


NUMERICAL RESOLUTION

  • The finite element space \( X_h \) has a finite element bassi,
  • it provides a basis \( (v_i)_{1\le i\le N} \) for \( Y = [X_h]^2 \).
  • Computation of the stiffness matrix \( S =[s_{i,\,j}]_{1\le i,\,j\le N}\)

    \[ s_{i,\,j} = \int_\Omega A(x) e(v_i):e(v_j)\,\dx \]

  • Computation of the right hand side \( F = (f_i)_{1\le i\le N} \)

    \[ f_i = \int_\Omega f \cdot v_i \,\dx \]


For the basis functions \( u_i \notin [ X_{h,0}]^2 \) (i.e. \( u_i \) is associated to a finite element node \( x_i \in\Gamma\) the domain boundary),

  • Modification of the stiffness matrix: \( s_{i,\,j} = \delta_{ij} \) (Kronecker symbol)
  • Modification of the right hand side \( F_{i} = g(x_i) \)
  • Resolution of the (non-symmetric) system

    \[ S U_h = F + G \]



POST TREATMENT

  • Computation of the numerical error between the exact solution \(u\) and the numerical solution \(u_h\),

    \[ \int_\Omega |u-u_h|^2 \dx~,\quad\quad \int_\Omega |\nabla u-\nabla u_h|^2 \dx \]

  • Graphical display of the numerical solution with gmsh

Charles PIERRE, December 2019

Definition at line 88 of file elasticity_Dirichlet_2D.f90.

Here is the call graph for this function:

◆ f_1()

real(rp) function elasticity_dirichlet_2d::f_1 ( real(rp), dimension(3), intent(in)  x)

right hand side 'f'= =(f_1, f_2)

Definition at line 361 of file elasticity_Dirichlet_2D.f90.

Here is the call graph for this function:

◆ f_2()

real(rp) function elasticity_dirichlet_2d::f_2 ( real(rp), dimension(3), intent(in)  x)

Definition at line 378 of file elasticity_Dirichlet_2D.f90.

Here is the call graph for this function:

◆ gam()

real(rp) function elasticity_dirichlet_2d::gam ( real(rp), dimension(3), intent(in)  x)

To characterise .

Definition at line 398 of file elasticity_Dirichlet_2D.f90.

◆ grad_u_1()

real(rp) function, dimension(3) elasticity_dirichlet_2d::grad_u_1 ( real(rp), dimension(3), intent(in)  x)

gradient of the exact solution

Definition at line 339 of file elasticity_Dirichlet_2D.f90.

Here is the call graph for this function:

◆ grad_u_2()

real(rp) function, dimension(3) elasticity_dirichlet_2d::grad_u_2 ( real(rp), dimension(3), intent(in)  x)

Definition at line 348 of file elasticity_Dirichlet_2D.f90.

Here is the call graph for this function:

◆ lambda()

real(rp) function elasticity_dirichlet_2d::lambda ( real(rp), dimension(3), intent(in)  x)

Lame coefficient 'lambda'.

Definition at line 300 of file elasticity_Dirichlet_2D.f90.

Here is the call graph for this function:

◆ mu()

real(rp) function elasticity_dirichlet_2d::mu ( real(rp), dimension(3), intent(in)  x)

Lame coefficient 'mu'.

Definition at line 310 of file elasticity_Dirichlet_2D.f90.

Here is the call graph for this function:

◆ sc()

real(rp) function elasticity_dirichlet_2d::sc ( real(rp), dimension(3), intent(in)  x)

Definition at line 428 of file elasticity_Dirichlet_2D.f90.

◆ sc4()

real(rp) function elasticity_dirichlet_2d::sc4 ( real(rp), dimension(3), intent(in)  x)

Definition at line 458 of file elasticity_Dirichlet_2D.f90.

◆ ss()

real(rp) function elasticity_dirichlet_2d::ss ( real(rp), dimension(3), intent(in)  x)

Definition at line 414 of file elasticity_Dirichlet_2D.f90.

◆ ss4()

real(rp) function elasticity_dirichlet_2d::ss4 ( real(rp), dimension(3), intent(in)  x)

Definition at line 444 of file elasticity_Dirichlet_2D.f90.

◆ u_1()

real(rp) function elasticity_dirichlet_2d::u_1 ( real(rp), dimension(3), intent(in)  x)

exact solution u=(u_1, u_2)

Definition at line 320 of file elasticity_Dirichlet_2D.f90.

Here is the call graph for this function:

◆ u_2()

real(rp) function elasticity_dirichlet_2d::u_2 ( real(rp), dimension(3), intent(in)  x)

Definition at line 327 of file elasticity_Dirichlet_2D.f90.

Here is the call graph for this function: