| OptFEM2DP1 Toolbox V1.2b3 Matlab/Octave Optimized P1-Lagrange Finite Element Method in 2D

- Main Page
- Related Pages
- Files

- File List
- File Members

All Files Functions Pages
ElemStiffElasMatP1Ba.m
Go to the documentation of this file.
1 function [Elem]=ElemStiffElasMatP1Ba(q1,q2,q3,area,lambda,mu)
2 % function [Elem]=ElemStiffElasMatP1Ba(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 alternate numbering (classical method)
6 %
7 % Hooke's matrix :
8 % C=[L + 2*M L 0]
9 % [ L L + 2*M 0]
10 % [ 0 0 M]
11 % Numbering of local points in reference element is :
12 % P=[(0, 0), (1, 0), (0, 1)]
13 %
14 % Parameters:
15 % q1 : array of coordinates of the first point of the triangle
16 % q2 : array of coordinates of the second point of the triangle
17 % q3 : array of coordinates of the third point of the triangle
18 % area : triangle area
19 % lambda : first Lame coefficient in Hooke's law
20 % mu : second Lame coefficient in Hooke's law
21 %
22 % Return values:
23 % Elem : element stiffness elasticity matrix, 6-by-6 matrix
24 %
25 % Example:
26 % @verbatim
27 % q1=[0;0];q2=[1;0];q3=[0;1];
28 % area=1/2.;
29 % lambda=1.; mu=1.;
30 % KElem=ElemStiffElasMatP1Ba(q1,q2,q3,area,lambda,mu);
31 % @endverbatim
32
33 % Copyright:
34 % See \ref license
35
36 u=q2-q3;
37 v=q3-q1;
38 w=q1-q2;
39 % Matrice de Hooke
40 C=[lambda+2*mu,lambda,0;lambda,lambda+2*mu,0;0,0,mu];
41 % Matrice des déformations (x par 2*area)
42 B=[u(2),0,v(2),0,w(2),0; ...
43 0,-u(1),0,-v(1),0,-w(1); ...
44 -u(1),u(2),-v(1),v(2),-w(1),w(2)];
45 Elem=B'*C*B/(4*area);