OptFEM2DP1 Toolbox  V1.2b3
Matlab/Octave Optimized P1-Lagrange Finite Element Method in 2D
 All Files Functions Pages
ElemStiffElasMatP1Bb.m
Go to the documentation of this file.
1 function [Elem]=ElemStiffElasMatP1Bb(q1,q2,q3,area,lambda,mu)
2 % function [Elem]=ElemStiffElasMatP1Bb(q1,q2,q3,area,lambda,mu)
3 % Computation of the element stiffness elasticity matrix for
4 % `P_1`-Lagrange method.
5 % The method for numbering the degrees of freedom is local block numbering
6 %
7 % The elasticity matrix obtained from Hooke's law is given by:
8 % ``C=\left\{\begin{array}[ccc]
9 % &\lambda+2\mu &\lambda &0\\
10 % &\lambda &\lambda+2\mu &0\\
11 % &0 &0 &\mu
12 % \end{array}
13 % \right.``
14 %
15 
16 % C=[L + 2*M L 0]
17 % [ L L + 2*M 0]
18 % [ 0 0 M]
19 % Numbering of local points in reference element is :
20 % P=[(0, 0), (1, 0), (0, 1)]
21 %
22 % Parameters:
23 % q1 : array of coordinates of the first point of the triangle
24 % q2 : array of coordinates of the second point of the triangle
25 % q3 : array of coordinates of the third point of the triangle
26 % area : triangle area
27 % lambda : first Lame coefficient in Hooke's law
28 % mu : second Lame coefficient in Hooke's law
29 %
30 % Return values:
31 % Elem : element stiffness elasticity matrix, 6-by-6 matrix
32 %
33 % Example:
34 % @verbatim
35 % q1=[0;0];q2=[1;0];q3=[0;1];
36 % area=1/2.;
37 % lambda=1.; mu=1.;
38 % KElem=ElemStiffElasMatP1Bb(q1,q2,q3,area,lambda,mu);
39 % @endverbatim
40 
41 % Copyright:
42 % See \ref license
43 
44 u=q2-q3;
45 v=q3-q1;
46 w=q1-q2;
47 % Matrice de Hooke
48 C=[lambda+2*mu,lambda,0;lambda,lambda+2*mu,0;0,0,mu];
49 % Matrice des déformations (x par 2*area)
50 B=[u(2),v(2),w(2),0,0,0; ...
51  0,0,0,-u(1),-v(1),-w(1); ...
52  -u(1),-v(1),-w(1),u(2),v(2),w(2)];
53 Elem=B'*C*B/(4*area);