Fea For A 2D Metal Plate Using Matlab: March 2017
Fea For A 2D Metal Plate Using Matlab: March 2017
Fea For A 2D Metal Plate Using Matlab: March 2017
net/publication/315741785
CITATIONS READS
0 1,050
1 author:
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Hamad Khaled Alkhareef on 02 April 2017.
Abstract
This paper investigates the accuracy of Finite Element Analysis using commercial engineering
applications, Matlab and ANSYS, to compare result. Programming language for a two-
dimensional linear elastic metal plate made of Aluminium alloy consists of two and four; 3-
noded and 6-noded triangular elements under uniform tension was used for analysing
displacement and strain. Three additional Young’s modulus were examined, 148 GPa,
200 GPa, and 300 GPa. Also, three different load conditions were applied, = 30o, = 60o,
and = 110o. The aim of this study is to examine the accuracy of displacement and strain
obtained from the FEM from the code developed and validate it with ANSYS result.
1. Introduction
Structures such as bridges and beams generally consist of number of elements which is
assembled together. Typically, bridges and beams are supported at one end and free at the
other end to allow material deformation resulting from thermal expansion and high loading.
Therefore, it is essential to carry out stress analysis to define the critical points of the structure
design and restrict it with boundary conditions to avoid failure. Also, similar test is required for
the selected material to study the behaviour of it which provides the maximum allowable stress
that can be applied on the material and hence its maximum deformation. These tests can be
carried out experimentally but its required an enormous amount of effort and money
particularly for complicated designs. However, due to the development of technology, FEM
can be used through different commercial engineering applications such as ANSYS, which
allows the user to analyse all the points of interest on the model with less effort and much
cheaper comparing to experimental test. FEM was established to study the stresses in
complex structures by solving large number of simultaneous equations.
In this report, Matlab R2016 and ANSYS v15 mechanical were used as a tool to compute the
Finite Element Approach to analyse displacement and strain of a rectangular metal plate under
uniform tensile stress with a uniform thickness. The plate is simply supported at two nodes as
shown in figure 1 and consists of two and four triangular elements with 3 and 6 nodes. The
purpose of this study is to compare the displacement and strain of the plate for various
elements, material properties, and load conditions. The accuracy of the code will be validated
using ANSYS result. Model description, material properties, boundary conditions, and element
type/shape will be illustrated in the report as well as the equations used. In addition, results
obtained from the code and ANSYS will be evaluated and relationship between strain and
elastic modulus will be achieved.
1
2. Methodology:
a. Description of the model
The model used consist of a uniform rectangular plate that has a height of
0.03 m and a width of 0.05 m with a thickness of 0.002 m.
b. Material selection
Isotropic Aluminium alloy with elastic modulus of 100 GPa and Poisson’s ratio
of 0.3 was initially implemented. In addition, different elastic materials have
been tested in this study such as Copper alloy with E = 148 GPa, Low Carbon
Steel with E = 200 GPa, and Silicon Carbide with E = 300 GPa.
d. Element type
3-noded and 6-noded triangular elements will be used in this study. In order to
model the plate in ANSYS, 2-D structural solid mass quad 4-node PLANE 182
with triangular element shape was used for the 3-noded element method. This
element type can be used as either plane stress/strain or axisymmetric
element. Each node has two DOF, x and y. It has plasticity, large deflection,
and strain capability. PLANE 183 quad 8 was used for modelling the 6-noded
elements because of its high order nodes. This element type has quadratic
displacement behaviour and typically used for modelling irregular meshes. Like
PLANE 182, quad 8 has two DOF at each node. Figure 1 part 2 shows the 3
and 6 noded elements order as it has been done in the code and figure 2
represents the boundary conditions and load applied in ANSYS.
2
where t is the thickness of the model and A is the area of each element which
can be defined as:
1
𝐴= ∗ 𝑏𝑎𝑠𝑒 ∗ ℎ𝑒𝑖𝑔ℎ𝑡 (2)
2
1 𝛽1 0 𝛽2 0 𝛽3 0
[𝐵] = [ 0 𝛾1 0 𝛾2 0 𝛾3 ] (3)
2𝐴
𝛾1 𝛽1 𝛾2 𝛽2 𝛾3 𝛽3
where 𝛽 and 𝛾 are the shape function coefficients, and can be calculated as
shown in equation 4.
𝛽1 = 𝑦2 − 𝑦3 𝛾1 = 𝑥2 − 𝑥3
𝛽2 = 𝑦3 − 𝑦1 𝛾2 = 𝑥3 − 𝑥1 (4)
𝛽3 = 𝑦1 − 𝑦2 𝛾3 = 𝑥2 − 𝑥1
the [K] matrix has been reduced due to the boundary conditions using
Gaussian elimination and F is the force matrix which contains the total force
applied on the plate and can be calculated from this relationship:
= 𝐹/𝐴
where (A = height x thickness) the area of the plate in the z direction. After
obtaining the total force applied, it will be divided by the number of nodes in
which the load is acting. Hence, the strain can be calculated as follows:
[𝜀 ] = [𝐵 ][𝑈] (7)
3
or [𝐾]𝑒 = 𝐻. 𝑡. [𝐵]𝑇 [𝐷][𝐵]det[𝐽], where H is the weighting factor = 1/6
where [B1], [B2], and [B3] are obtained using the derivative shape functions
matrix and Jacobian matrix:
1 0 0 0
[𝐵1 ] = [0 0 0 1]
0 1 1 0
𝐽𝐽22 𝐽𝐽12
− 0 0
|𝐽| |𝐽|
𝐽𝐽21 𝐽𝐽11
− 0 0
|𝐽| |𝐽|
[𝐵2 ] =
𝐽𝐽22 𝐽𝐽12
0 0 −
|𝐽| |𝐽|
𝐽𝐽21 𝐽𝐽11
0 0 −
[ |𝐽| |𝐽| ]
And the quadratic shape functions in natural coordinates are given by:
𝑁4 = 4𝐿1 𝐿2
𝑁1 = 𝐿1 (2𝐿1 − 1)
𝑁5 = 4𝐿2 (1 − 𝐿1 − 𝐿2 )
𝑁2 = 𝐿2 (2𝐿2 − 1)
𝑁6 = 4𝐿1 (1 − 𝐿1 − 𝐿2 )
𝑁3 = (1 − 𝐿1 − 𝐿2 )(1 − 2𝐿1 − 2𝐿2 )
4
derivatives of shape functions are given by:
𝜕𝑁1 𝜕𝑁1
= 4𝐿1 − 1 =0
𝜕𝐿1 𝜕𝐿2
𝜕𝑁2 𝜕𝑁2
=0 = 4𝐿2 − 1
𝜕𝐿1 𝜕𝐿2
𝜕𝑁3 𝜕𝑁3
= −3 + 4𝐿1 + 4𝐿2 = −3 + 4𝐿1 + 4𝐿2
𝜕𝐿1 𝜕𝐿2
𝜕𝑁4 𝜕𝑁4
= 4𝐿2 = 4𝐿1
𝜕𝐿1 𝜕𝐿2
𝜕𝑁5 𝜕𝑁5
= −4𝐿2 = 4 − 4𝐿1 − 8𝐿2
𝜕𝐿1 𝜕𝐿2
𝜕𝑁6 𝜕𝑁6
= 4 − 4𝐿2 − 8𝐿1 = −4𝐿1
𝜕𝐿1 𝜕𝐿2
3. Results
The stiffness matrices obtained from the program for one element for both, 3-noded and 6-
noded triangular, are shown in figure 3.
The code has been extended to solve the displacement and strain of two triangular elements.
Table 1 represents the comparison of displacement and strain obtained from the code with
ANSYS result for the two and four 3-noded triangular elements. In addition, table 2 compares
the displacement and strain obtained from the code with ANSYS for the two and four 6-noded
triangular elements. The deformation shape of the plate for both cases are shown in Figure 4.
5
Moreover, the code has been tested for different materials such as Copper alloy (E=148 GPa),
Low Carbon steel (E=200 GPa), and Silicon Carbide (E=300 GPa). The calculated
displacement and strain of these materials based on the four 6-noded triangular elements are
summarised in figure 5. Furthermore, displacement and strain have been computed when the
angle of the load applied is altered i.e. = 30o, = 60o, and = 110o, the effect of orientated
load is shown in figure 5.
4. Discussion
Figure 3 part (a) represents the stiffness matrix for a 3-noded triangular element and part (b)
for the 6-noded element. These matrices were expanded to the global coordinate in order to
find the displacements, forces and strains of the element.
The result listed in table 1 in accordance to the global coordinate arrangement in figure 1
and2, proves the validity of the code for the two and four 3-noded elements. However, ANSYS
result were more accurate than the code, for instance, ANSYS provides more decimals in the
solution while the code gives zeros. It can be noticed that the 4 elements solution has more
nodes, hence additional degree of freedom which gives more accurate result than the 2
elements problem. In addition, the two and four 6-noded elements result for displacement and
strain are summarised in table 2. The values of displacement obtained from the code are
identical to ANSYS, which validates the accuracy of the code. Nevertheless, the strain values
have a high percentage of error, average of 110%, which dictates that the code has some
limitations when solving quadratic (6-noded) problems. Also, it is hard to find analytical form
of integrals, equation 8, and the jacobian calculation depends on the selection of shape
functions, which depends on the choice of elements. If the values of nodes added up for each
element, it will give a fairly close value comparing to ANSYS.
Furthermore, the four 6-noded triangular elements code was tested for 3 additional elastic
moduli as mentioned in the result section. The relationship between the elastic moduli of the
material and the strain is found to be inverse, low Young’s modulus has small strain and small
displacement, as shown in figure 5 (a). While the relationship between stress and strain is
proportional as shown in figure 5 (c). Moreover, the angle of the load applied was altered three
different times, and the effect of it was recognised and plotted in figure 5 (b). The maximum
force can be achieved on the X-direction when the load is applied at = 90o, and hence
maximum strain. While the minimum can be obtained at = 0o and = 180o. On the other
hand, the maximum strain and displacement can be achieved at 0o to 15o for the Y-direction
forces and the minimum is at = 180o.
Generally, the four 6-noded triangular elements have more accurate result than the 3-noded
(linear) problem due to the high number of simultaneous equations which allows the model to
displace in a flexible manner as shown in figure 4 (c) and (d).
5. Conclusion
The two and four 3-noded elements (linear) problem has less accurate result than the 6-noded
one. The code has some limitations when solving high order quadratic problems as shown in
table 2 for the strain. The strain is directly affected by the angle of the applied load as well as
the elastic moduli of the material used. High order elements provide accurate result and allow
flexibility when measuring the displacement or strain in a particular model.
6
References
[1] P. Seshu, Textbook of finite element analysis, 1st ed. New Delhi: Prentice-Hall of India, 2010.
[2] "4.182 PLANE182 2-D Structural Solid (UP19980821)", Ansys.stuba.sk. [Online]. Available:
http://www.ansys.stuba.sk/html/elem_55/chapter4/ES4-182.htm. [Accessed: 04- Feb- 2017].
[4] Materials Data Book, 1st ed. Cambridge, UK: Cambridge University Engineering Department, 2003,
p. 11
7
Figures and tables
(a1) (c1)
0m 0.05 m 0m 0.05 m
(b1) (d1)
3 2 1
3 3 2 3 3 2
2
2 4
1
1 3
3
1 2 1 1 1
1 2 2
(a2)
(c2)
4 4 4
2 1 2 1 2 1
3 3 3
2 2 4
5 6 5 6 5 6
6 6 5 6 5
5
1 1 3
1 3 1 3 1 3
4 2 4 2 4 2
(b2) (d2)
Figure 1.Part 1 - (a1) shows the global nodes ordering for the 3-noded 2 elements triangular and (c1) is the 4 elements. (b1)
represents the global nodes of the 6-noded 2 elements triangular and (d1) is the 4 elements. Part 2 – (a2) shows the local
nodes arrangements of the 3-noded 2 elements and (c2) represents the 4 elements. (b2) and (d2) shows the 6-noded 2 and
4 elements local nodes arrangements.
8
(a) (b)
(c) (d)
Figure 2. the boundary conditions and loads applied using ANSYS. (a) and (b) show the 3-noded 2 and 4 elements problem.
While (c) and (d) represent the 6-noded 2 and 4 elements problem. The number of nodes represent the global coordinate for
ANSYS solution.
(a)
(b)
Figure 3. (a) represents the stiffness matrix obtained for the 3-noded element and (b) is the [K] for the 6-noded element
model.
9
3-noded Displacement 3-noded Strain
2 elements 4 elements 2 elements 4 elements
Node Matlab ANSYS Matlab ANSYS Element Matlab ANSYS Matlab ANSYS
u 0 0 0 0 εx 0.002 2.00E-03 0.002 2.00E-03
1
v 0 0 0 0 1 εy -0.0006 -6.00E-04 -0.0006 -6.00E-04
u 0 0 0 0 γxy 0.0000 5.96E-19 -0.0000 -1.35E-18
2
v -1.80E-05 -1.80E-05 -1.80E-05 -1.80E-05 εx 0.002 2.00E-03 0.002 2.00E-03
u 1.00E-04 1.00E-04 1.00E-04 5.00E-05 2 εy -0.0006 -6.00E-04 -0.0006 -6.00E-04
3
v -0.0000 -1.80E-05 -0.0000 -1.80E-05 γxy -0.0000 -2.10E-19 -0.0000 -2.10E-19
u 1.00E-04 1.00E-04 1.00E-04 5.00E-05 εx 0.002 2.00E-03
4
v -1.80E-05 5.08E-20 -1.80E-05 -4.27E-20 3 εy -0.0006 -6.00E-04
u 5.00E-05 1.00E-04 γxy -0.0000 -1.31E-18
5
v -0.0000 -1.80E-05 εx 0.002 2.00E-03
u 5.00E-05 1.00E-04 4 εy -0.0006 -6.00E-04
6
v -1.80E-05 -8.81E-20 γxy -0.0000 -1.00E-18
Table 1. comparison between Matlab result and ANSYS for displacement and strain obtained from the 3-noded; 2 and 4
elements.
Table 2. comparison between Matlab and ANSYS result of displacement and strain obtained for the 6-noded; 2 and 4
elements
10
1
(a)
4
1
2
3
(b)
(c)
(d)
Figure 4. (a) shows the deformation shape of the plate from ANSYS and Matlab for the 3-noded; 2 elements and (b) for the
4 elements. while (c) and (d) show the deformation in the 6-noded; 2 elements and 4 elements respectively.
11
The Relationship between Young's modulus and strain at (200 MPa) load
4.50E-03
4.00E-03
3.50E-03
Strain (unitless)
3.00E-03
2.50E-03
2.00E-03
1.50E-03
1.00E-03
5.00E-04
0.00E+00
0 50 100 150 200 250 300 350 400 450
Modulus of Elasticity (GPa)
0.0002 0
-0.0001
0.0001 -0.0002
-0.0003
0 -0.0004
0 15 30 45 60 75 90 105 120 135 150 165 180
strain x strain y angle (deg)
2.00E-12
1.50E-12
strain
1.00E-12
5.00E-13
0.00E+00
0 0.05 0.1 0.15 0.2 0.25
stress (GPa)
Figure 5. (a) represents the relationship between the elastic modulus and strain based on the dimension given. And (b)
shows the impact of the orientation of the load applied on the strain. And (c) represents the stress-strain relationship
(graph).
12
k 2 = t * A* B2' * D* B2
Appendix k 2_gl obal = zer os ( 12, 12);
% % % % P ART 2 %%%( i ) 4- ELE ME NT S - 3- NODE D
k 2_gl obal ([ 3, 4, 9, 10, 11, 12] ,[ 3, 4, 9, 10, 11, 12] ) = ...
cl c;
k2 ([ 5, 6, 1, 2, 3, 4] ,[ 5, 6, 1, 2, 3, 4] )
E = 100e9; %Y OU N G' S MOD UL US
%% % %% % %% % %% % %% % %% % %% % %% % %% % %% % %
v = 0. 3; %P OI SS ON' S RATI O
%% % %% % %% % %% % %% %
t = 0. 002; %T HI CK NE S S ( m)
% %E L E ME NT 3
P = 200e6; %P RE S S URE APPLI ED ( Pa)
x 13=0. 025;
A = 0. 5* 0. 025* 0. 03; %A RE A ( m^ 2)
y 13=0;
f = ( P*t * 0. 03)/ 2; %F OR CE APPLI ED ( N)
x 23=0. 05;
D = ( E/ ( 1-( v^ 2)))*[ 1, v, 0 ; v, 1, 0 ; 0, 0, (( 1-
y 23=0;
v)/ 2)]; %ST RE S S- ST RAI N
x 33=0. 025;
%REL ATI ONS HI P
y 33=0. 03;
%% % %% % %% % %% % %% % %% % %% % %% % %% % %% % %
%% % %% % %% % %% % %% %
% %S HA P E F UNCTI ON COEF FI CI ENT S
% %E L E ME NT 1
ai 3 = ( x23* y 33) - ( x33* y 23);
x 11 =0;
aj 3 = ( x33* y 13) - ( x13* y 33);
y 11=0;
ak 3 = ( x13* y23) - ( x23* y13);
x 21=0. 025;
y 21=0;
bi 3 = y23- y33;
x 31=0;
bj 3 = y33- y13;
y 31=0. 03;
bk 3 = y13- y23;
% %S HA P E F UNCTI ON COEF FI CI ENT S
ci 3 = x33- x23;
ai 1 = ( x21* y 31) - ( x31* y 21);
cj 3 = x13- x33;
aj 1 = ( x31* y 11) - ( x11* y 31);
ck 3 = x23- x13;
ak 1 = ( x11* y21) - ( x21* y11);
13
xi _yi 1 = [ x11 y11; x21 y21; x31 y31; x41 y41; x51 y51; x61
y 61] ;
% %DI SPL A CE ME NT [ U] & ST RAI N [ S] CAL CUL ATI OON - % %S T RAI N- DI SPL A CE ME NT REL ATI ON & STI FF NE S S
[ KQ= F] MA T RI X 1
F = [ 0; f; 0; f; 0; 0; 0; 0; 0]; %%F ORCE MAT RI X B = el e ment 1b_6 N( xi _yi 1, L1, L2);
U = i nv( K_e) * F; %%DI SPL A CE ME NT B11 = B;
u1 = 0; k = el e ment 1k _6 N( xi _yi 1, H, t, D, L1, L2);
v 1 = 0; k 11 = k;
u2 = 0;
v 2 = U( 1, 1); % %L 1 and L2 VAL UE S
u3 = U( 2, 1); L1 = 0. 5;
v 3 = U( 3, 1); L2 = 0;
u4 = U( 4, 1); % %S T RAI N- DI SPL A CE ME NT REL ATI ON & STI FF NE S S
v 4 = U( 5, 1); MA T RI X 2
u5 = U( 6, 1); B = el e ment 1b_6 N( xi _yi 1, L1, L2);
v 5 = U( 7, 1); B21 = B;
u6 = U( 8, 1); k = el e ment 1k _6 N( xi _yi 1, H, t, D, L1, L2);
v 6 = U( 9, 1); k 21 = k;
14
k 22 = k; %% % %% % %% % %% % %% % %% % %% % %% % %% % %% % %
%% % %% % %% % %% % %% %
% %L 1 and L2 VAL UE S % %E L E ME NT 4
L1 = 0; x 14 = 0. 05;
L2 = 0. 5; y 14 = 0. 03;
% %S T RAI N- DI SPL A CE ME NT REL ATI ON & STI FF NE S S x 24 = 0. 025;
MA T RI X 3 y 24 = 0. 03;
B = el e ment 2b_6 N( xi _yi 2, L1, L2); x 34 = 0. 05;
B32 = B; y 34 = 0;
k = el e ment 2k _6 N( xi _yi 2, H, t, D, L1, L2); x 44 = 3* 0. 0125;
k 32 = k; y 44 = 0. 03;
x 54 = 3* 0. 0125;
B2 = B12 + B22 + B32; %%[ B] MAT RI X EL E ME NT 2 y 54 = 0. 015;
K2 = k12 + k22 + k32; %%L OCAL [ K] EL E ME NT 2 x 64 = 0. 05;
% %L OCAL T O GL OB AL [ K] MAT RI X 2 y 64 = 0. 015;
K2_gl obal = zer os( 30); % %[ C OOR DI NAT E S] MAT RI X E4
K2_gl obal xi _yi 4 = [ x14 y14; x24 y24; x34 y34; x44 y44; x54 y54; x64
([ 3, 4, 11, 12, 13, 14, 15, 16, 23, 24, 25, 26] ,[ 3, 4, 11, 12, 13, 14, 15, 16, 2 y 64] ;
3, 24, 25, 26] ) = ...
K2([ 3, 4, 7, 8, 5, 6, 1, 2, 9, 10, 11, 12] , % %L 1 and L2 VAL UE S
[ 3, 4, 7, 8, 5, 6, 1, 2, 9, 10, 11, 12] ); L1 = 0. 5;
%% % %% % %% % %% % %% % %% % %% % %% % %% % %% % % L2 = 0. 5;
%% % %% % %% % %% % %% % % %S T RAI N- DI SPL A CE ME NT REL ATI ON & STI FF NE S S
% %E L E ME NT 3 MA T RI X 1
x 13 = 0. 025; B = el e ment 4b_6 N( xi _yi 4, L1, L2);
y 13 = 0; B14 = B;
x 23 = 0. 05; k = el e ment 4k _6 N( xi _yi 4, H, t, D, L1, L2);
y 23 = 0; k 14 = k;
x 33 = 0. 025;
y 33 = 0. 03; % %L 1 and L2 VAL UE S
x 43 = 3* 0. 0125; L1 = 0. 5;
y 43 = 0; L2 = 0;
x 53 = 3* 0. 0125; % %S T RAI N- DI SPL A CE ME NT REL ATI ON & STI FF NE S S
y 53 = 0. 015; MA T RI X 2
x 63 = 0. 025; B = el e ment 4b_6 N( xi _yi 4, L1, L2);
y 63 = 0. 015; B24 = B;
% %[ C OOR DI NAT E S] MAT RI X E3 k = el e ment 4k _6 N( xi _yi 4, H, t, D, L1, L2);
xi _yi 3 = [ x13 y13; x23 y23; x33 y33; x43 y43; x53 y53; x63 k 24 = k;
y 63] ;
% %L 1 and L2 VAL UE S
% %L 1 and L2 VAL UE S L1 = 0;
L1 = 0. 5; L2 = 0. 5;
L2 = 0. 5; % %S T RAI N- DI SPL A CE ME NT REL ATI ON & STI FF NE S S
% %S T RAI N- DI SPL A CE ME NT REL ATI ON & STI FF NE S S MA T RI X 3
MA T RI X 1 B = el e ment 4b_6 N( xi _yi 4, L1, L2);
B = el e ment 3b_6 N( xi _yi 3, L1, L2); B34 = B;
B13 = B; k = el e ment 4k _6 N( xi _yi 4, H, t, D, L1, L2);
k = el e ment 3k _6 N( xi _yi 3, H, t, D, L1, L2); k 34 = k;
k 13 = k;
B4 = B14 + B24 + B34; %%[ B] MAT RI X EL E ME NT 4
% %L 1 and L2 VAL UE S K4 = k14 + k24 + k34; %%L OCAL [ K] EL E ME NT 4
L1 = 0. 5; % %L OCAL T O GL OB AL [ K] MAT RI X 4
L2 = 0; K4_gl obal = zer os( 30);
% %S T RAI N- DI SPL A CE ME NT REL ATI ON & STI FF NE S S K4_gl obal
MA T RI X 2 ([ 5, 6, 7, 8, 15, 16, 19, 20, 27, 28, 29, 30] ,[ 5, 6, 7, 8, 15, 16, 19, 20, 27, 28,
B = el e ment 3b_6 N( xi _yi 3, L1, L2); 29, 30] ) = ...
B23 = B; K4([ 5, 6, 1, 2, 3, 4, 7, 8, 9, 10, 11, 12] ,
k = el e ment 3k _6 N( xi _yi 3, H, t, D, L1, L2); [ 5, 6, 1, 2, 3, 4, 7, 8, 9, 10, 11, 12] );
k 23 = k; %% % %% % %% % %% % %% % %% % %% % %% % %% % %% % %
%% % %% % %% % %% % %% %
% %L 1 and L2 VAL UE S % %S U M OF GL OB AL [ K]
L1 = 0; K_gl obal = K1_gl obal + K2_gl obal + K3_gl obal + K4_gl obal ;
L2 = 0. 5; % %A P PL Y B OUN DA RY CONDI TI ONS - [ u1=v 1=u2=0]
% %S T RAI N- DI SPL A CE ME NT REL ATI ON & STI FF NE S S di sp(' u1=v 1=u2=0 ( due t o const r ai ns) THE REF ORE: ' );
MA T RI X 3 K_e = K_gl obal ( 4: 30, 4: 30);
B = el e ment 3b_6 N( xi _yi 3, L1, L2); % %DI SPL A CE ME NT [ U] & ST RAI N [ S] CAL CUL ATI OON -
B33 = B; [ KQ= F]
k = el e ment 3k _6 N( xi _yi 3, H, t, D, L1, L2); F = [ 0; f/ 6; 0; f/ 6; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0;
k 33 = k; ...
0; 0; 0; (( 2/ 3) *f ); 0] ; %%F ORCE MAT RI X
B3 = B13 + B23 + B33; %%[ B] MAT RI X EL E ME NT 3 U = i nv( K_e) * F; %%DI SPL A CE ME NT
K3 = k13 + k23 + k33; %%L OCAL [ K] EL E ME NT 3
% %L OCAL T O GL OB AL [ K] MAT RI X 3 u1 = 0;
K3_gl obal = zer os( 30); v1 = 0;
K3_gl obal u2 = 0;
([ 5, 6, 13, 14, 15, 16, 17, 18, 25, 26, 27, 28] ,[ 5, 6, 13, 14, 15, 16, 17, 18, 2 v2 = U( 1, 1);
5, 26, 27, 28] ) = ... u3 = U( 2, 1);
K3([ 3, 4, 1, 2, 5, 6, 7, 8, 11, 12, 9, 10] , v3 = U( 3, 1);
[ 3, 4, 1, 2, 5, 6, 7, 8, 11, 12, 9, 10] ); u4 = U( 4, 1);
v4 = U( 5, 1);
15
u5 = U( 6, 1); dN1dL2, 0, dN2dL2, 0, dN3dL2, 0, dN4dL2, 0, dN5dL2, 0,
v 5 = U( 7, 1); d N6dL2, 0;
u6 = U( 8, 1); 0, dN1dL1, 0, dN2dL1, 0, dN3dL1, 0, dN4dL1, 0, dN5dL1,
v 6 = U( 9, 1); 0, dN6dL1;
u7 = U( 10, 1); 0, dN1dL2, 0, dN2dL2, 0, dN3dL2, 0, dN4dL2, 0, dN5dL2,
v 7 = U( 11, 1); 0, dN6dL2] ;
u8 = U( 12, 1); %% % %% % %% % %% % %% % %% % %% % %% % %% % %% % %
v 8 = U( 13, 1); %% % %% % %
u9 = U( 14, 1); B = B1* B2* B3;
v 9 = U( 15, 1); end
u10 = U( 16, 1); %% % %% % %% % %% % %% % %% % %% % %% % %% % %% % %
v 10 = U( 17, 1); %% % %% % %% % %% % %% %
u11 = U( 18, 1); f uncti on k = el e ment 1k _6 N ( xi _yi 1, H, t, D, L1, L2)
v 11 = U( 19, 1); % % %Deri vati ves of t he Shape Funct i on
u12 = U( 20, 1); d N1dL1 = ( 4* L1) - 1;
v 12 = U( 21, 1); d N1dL2 = 0;
u13 = U( 22, 1); d N2dL1 = 0;
v 13 = U( 23, 1); d N2dL2 = ( 4* L2) - 1;
u14 = U( 24, 1); d N3dL1 = - 3 + ( 4* L1) + ( 4* L2);
v 14 = U( 25, 1); d N3dL2 = - 3 + ( 4* L1) + ( 4* L2);
u15 = U( 26, 1); d N4dL1 = ( 4* L2);
v 15 = U( 27, 1); d N4dL2 = ( 4* L1);
di sp (' DI SPL A CE ME NT' ); d N5dL1 = (- 4* L2);
di sp (' x y' ); d N5dL2 = 4 - ( 4* L1) - ( 8* L2);
U_ = [ u1 v1; u2 v2; u3 v3; u4 v4; u5 v5; u6 v6; u7 v7; u8 v8; d N6dL1 = 4 - ( 4* L2) - ( 8* L1);
u9 v9; ... d N6dL2 = (- 4* L1);
u10 v10; u11 v11; u12 v12; u13 v13; u14 v14; u15 v15] % % %S h a pe Funct i on Mat ri x
%% % %% % %% % %% % %% % %% % %% % %% % %% % %% % % j = [ dN1dL1, dN2dL1, dN3dL1, dN4dL1, dN5dL1, dN6dL1;
%% % %% % %% % %% % %% % dN1dL2, dN2dL2, dN3dL2, dN4dL2, dN5dL2, dN6dL2] ;
di sp (' ELE ME NT 1 : DI SPL A CE ME NT & F ORCE S' ) % % %J ac obi an mat ri x ([ xi _yi ] mat ri x f r o m mai n scri pt )
U_ 1 = [ u1; v1; u7; v7; u2; v2; u5; v5; u12; v12; u11; v11] J = j * ( xi _yi 1);
f 1 = K1 * U_1 % % %St r ai n- Di spl ace me nt Mat ri x
di sp (' ELE ME NT 2 : DI SPL A CE ME NT & F ORCE S' ) B1 = [ 1, 0, 0, 0; 0, 0, 0, 1; 0, 1, 1, 0] ;
U_ 2 = [ u8; v8; u2; v2; u7; v7; u6; v6; u12; v12; u13; v13] B2 = [ J( 2, 2)/ det ( J), - J( 1, 2)/ det ( J), 0, 0;
f 2 = K2 * U_2 - J( 2, 1)/ det ( J), J( 1, 1)/ det ( J), 0, 0;
di sp (' ELE ME NT 3 : DI SPL A CE ME NT & F ORCE S' ) 0, 0, J( 2, 2)/ det ( J), - J( 1, 2)/ det ( J);
U_ 3 = [ u7; v7; u3; v3; u8; v8; u9; v9; u14; v14; u13; v13] 0, 0, - J( 2, 1)/ det ( J), J( 1, 1)/ det ( J)];
f 3 = K3 * U_3 B3 = [ dN1dL1, 0, dN2dL1, 0, dN3dL1, 0, dN4dL1, 0, dN5dL1,
di sp (' ELE ME NT 4 : DI SPL A CE ME NT & F ORCE S' ) 0, dN6dL1, 0;
U_ 4 = [ u4; v4; u8; v8; u3; v3; u10; v10; u14; v14; u15; v15] dN1dL2, 0, dN2dL2, 0, dN3dL2, 0, dN4dL2, 0, dN5dL2, 0,
f 4 = K4 * U_4 d N6dL2, 0;
%% % %% % %% % %% % %% % %% % %% % %% % %% % %% % % 0, dN1dL1, 0, dN2dL1, 0, dN3dL1, 0, dN4dL1, 0, dN5dL1,
%% % %% % %% % %% % %% % 0, dN6dL1;
di sp (' ELE ME NT 1 : ST RAI N' ) 0, dN1dL2, 0, dN2dL2, 0, dN3dL2, 0, dN4dL2, 0, dN5dL2,
S1 = B1* U_1 0, dN6dL2] ;
di sp (' ELE ME NT 2 : ST RAI N' ) %% % %% % %% % %% % %% % %% % %% % %% % %% % %% % %
S2 = B2* U_2 %% % %% % %
di sp (' ELE ME NT 3 : ST RAI N' ) B = B1* B2* B3;
S3 = B3* U_3 k = H*t * B' * D* B* det ( J); %St i ff ness Mat ri x
di sp (' ELE ME NT 4 : ST RAI N' ) end
S4 = B4* U_4
%% % %% % %% % %% % %% % %% % %% % %% % %% % %% % % % % % %P L E A S E NOT E T HAT T HE S E T WO F UNCTI ONS
%% % %% % %% % %% % %% % HA V E BEE N USE D F OR EA CH EL E ME NT T O CAL CUL AT E
f uncti on B = el e ment 1b_6 N ( xi _yi 1, L1 , L2) [ B] AND [ K]
% % %Deri vati ves of t he Shape Funct i on
d N1dL1 = ( 4* L1) - 1;
d N1dL2 = 0;
d N2dL1 = 0;
d N2dL2 = ( 4* L2) - 1;
d N3dL1 = - 3 + ( 4* L1) + ( 4* L2);
d N3dL2 = - 3 + ( 4* L1) + ( 4* L2);
d N4dL1 = ( 4* L2);
d N4dL2 = ( 4* L1);
d N5dL1 = (- 4* L2);
d N5dL2 = 4 - ( 4* L1) - ( 8* L2);
d N6dL1 = 4 - ( 4* L2) - ( 8* L1);
d N6dL2 = (- 4* L1);
% % %S h a pe Funct i on Mat ri x
j = [ dN1dL1, dN2dL1, dN3dL1, dN4dL1, dN5dL1, dN6dL1;
dN1dL2, dN2dL2, dN3dL2, dN4dL2, dN5dL2, dN6dL2] ;
% % %J ac obi an mat ri x ([ xi _yi ] mat ri x f r o m mai n scri pt )
J = j * ( xi _yi 1);
% % %St r ai n- Di spl ace me nt Mat ri x
B1 = [ 1, 0, 0, 0; 0, 0, 0, 1; 0, 1, 1, 0] ;
B2 = [ J( 2, 2)/ det ( J), - J( 1, 2)/ det ( J), 0, 0;
- J( 2, 1)/ det ( J), J( 1, 1)/ det ( J), 0, 0;
0, 0, J( 2, 2)/ det ( J), - J( 1, 2)/ det ( J);
0, 0, - J( 2, 1)/ det ( J), J( 1, 1)/ det ( J)];
B3 = [ dN1dL1, 0, dN2dL1, 0, dN3dL1, 0, dN4dL1, 0, dN5dL1,
0, dN6dL1, 0;
16