Vous êtes sur la page 1sur 41

ANALYSIS OF CONSTANT STRAIN TRIANGULAR

ELEMNTS USING MATLAB FOR


DISPLACEMENTS AND STRESSES
A MINI PROJECT
Submitted
In partial fulfillment of the requirement for
The award of the degree of

MASTER OF TECHNOLOGY
In

STRUCTURAL ENGINEERING
Submitted by

S. CHANDRA HARSHA REDDY


[REG.NO.18011D2012]
Under the guidance of

Dr. B. SIVA KONDA REDDY


Associate Professor of Civil Engineering Department

DEPARTMENT OF CIVIL ENGINEERING


JAWAHARLALNEHRU TECHNOLOGICAL UNIVERSITY
COLLEGE OF ENGINEERING (AUTONOMOUS)
KUKATPALLY, HYDERABAD-500 085
JULY 2019
Department of Civil Engineering
Jawaharlal Nehru Technological University Hyderabad
College of Engineering, Hyderabad-500 085

CERTIFICATE
This is to certify that the mini project work entitled “USING MATLAB FOR
SOLVING CONSTANT STRAIN TRIANGULAR ELEMENTS FOR
DISPLACEMNETS AND STESSES”, being submitted by S.Chandra Harsha
Reddy(18011D2012) in partial fulfillment of the requirements for the award of the
Degree of M.Tech in civil Engineering with a specialization of Structural Engineering at
Jawaharlal Nehru Technological University College of Engineering Hyderabad, is a
record of bonafied work carried out by him under my guidance and supervision.

The results embodied in this report have not been submitted in any other University or
Institution of any degree or diploma.

Project Guide Head of Department


Dr.B.SIVA KONDA REDDY Dr.P.SRAVANA
Associate Professor Professor & Head of Dept.
Department of civil Engineering Department of civil engineering
JNTUH College of Engineering JNTUH College OF Engineering
Hyderabad. Hyderabad
ACKNOWLEDGEMENT

I would like to express my gratitude to all the people behind the screen who have
contributed a great towards the successful completion of my Mini Project work.

I express my sincere gratitude to its fullest extent when it comes to thank my guide Dr. B.
Siva Konda Reddy Sir, Department of Civil engineering, JNTUH College of Engineering,
Hyderabad for his priceless advice and valuable guidance throughout my Mini Project
Work.

I am also thankful to Shri S.ANAND of the Mathworks, application engineer for helping
in installation of all related software for the project.

I am also thankful to all my friends for the constant support especially while coding and
making flow chart.

The satisfaction and euphoria that accompany the successful completion of the task
would be great but incomplete without the mention of the people who made it possible
with their constant guidance and encouragement crowns all the efforts with success. In
this context, I would like to thank all the other staff members, both teaching and non-
teaching, who have extended their timely help and eased my task.

S.Chandra harsha reddy.


(18011D2012)

iii
DECLARATION

I hereby declare that the Report of the M. Tech Mini Project work entitled “USING
MATLAB FOR SOLVING CONSTANT STRAIN TRIANGULAR ELEMENTS
FOR DISPLACEMNETS AND STESSES” which is being submitted to the JNTU
College of Engineering, Hyderabad, in partial fulfillment for award of the degree of
Master of Technology in Structural Engineering, Department of Civil Engineering, is a
bona fide report of the work carried out by me. The material contained in this report has
not been submitted to any University or Institution for the award of any degree or
diploma.

Place: Hyderabad S. Chandra Harsha Reddy

Date: Roll No.: 18011D2012

iv
ABSTRACT

FINITE ELEMENT ANALYSIS is a numerical method employed for obtaining the


approximate solutions for complex engineering problems. This approximation can be
more accurate with the type, size and number of finite elements taken into account, more
the number of finite elements more the accuracy.

MATLAB is a high-performance language for technical computing. It improves


computation, visualization, and programming levels. MATLAB can also be used to
create applications or user guide interface, using which a series of inputs were given to
solve entire engineering problem.

The stress analysis and displacement vector formulation of two dimensional objects such
as plates and sheets, is done by dividing the 2D surfaces into triangular, rectangular and
quadrilateral finite elements. Among them triangular element is considered to be the
simplest type of two dimensional element. In this project the analysis of such one
triangular element is carried out by writing a MATLAB code and compared to that of the
theoretical solution.

v
INDEX
Content Page No
List of figures viii

CHAPETR 1
INTRODUCTION 1-8
1.1 INTODUCTION TO FINITE ELEMENT ANALYSIS 1
1.2 FINITE ELEMENTS AND THEIR TYPES 2
1.3 CONSTANT STRAIN TRIANGULAR ELEMENT 4
1.4 INTRODUCTION TO MATLAB 5
1.4.1 BASIC FEATURS OF MATLAB 5
1.5 MATLAB PROGRAMMING 7
1.6 BASIC PLOTING 8
CHAPTER 2
LITERATURE REVIEW 9-10
CHAPTER 3
ANALYSIS OF CONSTANT STRAIN TRIANGULAR ELEMENTS &MATLAB
CODE 11-24
3.1 INTODUCTION 11
3.2 DERIVATION OF SHAPE FUNCTION FOR CONSTANT STRAIN
TRIANGULAR EELMENT 11
3.3 FORMULATION OF STRAIN-DISPALCEMENT MATRIX AND STRESS-
STRAIN MATRIX 14
3.3.1 FORMULATION OF PLANE STRESS CONSTITUTIVE MATRIX [D] 14
3.3.2 FORMULATION OF PLANE STRAIN CONSTITUTIVE MATRIX [D] 15
3.3.3 FORMULATION OF GRADIENT MATRIX [B] 16
3.4 STIFFNESS MATRIX FOR TWO DIMENSIONAL (CST) ELEMENT 18
3.5 PROBLEM STATEMENT 18
3.4 MATLAB CODE FOR TRIANGULAR ELEMENT ANALYSIS 21
3.4.1 MATLAB CODE TO FIND STRESSES IN PLANE STRESS CONDITION 21
3.4.2 MATLAB CODE FOR DISPLACEMENTS AND GRAHPIC
REPRESENTATION OF DISPLACEMENT 22

vi
3.4.3 MATLAB code to find forces in plane strain condition 23
CHAPTER 4
RESULTS AND DISCUSSION 25-30
4.1 INTRODUCTION 25
4.2 RESULTS 25
4.3 DISCUSSIONS 30
CONCLUSIONS 31
Future Scope of study 32
REFERENCES 33

vii
List of Figures

Figure No Name Page No


1 Comparison of Exact and Approximate solution 1
2 One dimensional element or line element 3
3 Two dimensional elements 3
4 Constant strain triangular and linear triangular 4
element
5 MATLAB INTERFACE 6
6 Triangular element 1 19
7 Triangular element 2 20
8 Triangular element 3 20
9 Visualization of displacement using MATLAB 28

viii
CHAPETR 1
INTRODUCTION

1.1 INTODUCTION TO FINITE ELEMENT ANALYSIS

The finite element method is defined as a numerical method to obtain the approximate
solution to different types of complex problems, which are very difficult to solve in
regular fashion. In this method a complex problem defining a continuous system is
divided into sub parts or domains called finite elements, which are regular in shape and
easy to be solved. They inter connected at points called nodes to form the continuous
system. Now, the boundary conditions applied forces and other conditions are imposed
on these finite elements and solved for unknown values. The sum of the elemental
solutions will provide the required approximate solution for the whole structure.

Basic steps of FINITE ELEMENT ANALYSIS are to discretize the structure into finite
elements by lines or surfaces based on the continuous system is 1D or 2D system.
Secondly, the selection of displacement function is to be assumed within the element
using nodal values or coordinates of the system. Linear and quadratic polynomials are
generally used functions because the simple to work. By using higher order elements the
approximate solution conversion to exact will be higher and more accurate.

Figure 1: Comparison of Exact and Approximate solution

1
After discretization the element stiffness matrix for the finite element is formed and the
load vector is also formulated. We use minimum potential energy principle to formulate
stiffness matrix of finite elements. Globalization of these element stiffness matrix is done
through the nodes to form overall Global stiffness matrix.at these nodes the continuity of
the displacement function is established. The final global equilibrium equation can be
written as

[K] {𝛿} = {F} ………. Eq(1)

K = Global stiffness matrix


𝛿 = Nodal displacement vector
F = Nodal Force Vector

The global stiffness matrix is a singular matrix because its determinant is equal to zero.
This becomes major problem while coding. Nodal matrix has to be taken out from the
global stiffness matrix where only displacements are present.

This process of taking out the nodal stiffness matrix is nothing but the incorporation of
boundary conditions. By applying these boundary conditions the matrix size is reduced to
final form. This reduced matrix is used in above equation and solved to get the unknowns
either displacements or forces. The solution of above equation is done either by GAUSS
ELEMENATION or GAUSS-SEIDEL methods.

From the calculated nodal displacements, the element strains and stresses can be
computed. The final goal of finite element analysis is to interpret and determine the
location of large deformations and stresses that occur that are essential in making design.

1.2 FINITE ELEMENTS AND THEIR TYPES


The large irregular bodies are difficult to analyze, hence they are discretized into small
sized regular shaped parts called finite elements. The element selection is highly
important in building the proper finite element model.

The finite elements are generally classified based on the geometrical shape of main body,
number of nodes or the degrees of freedom, and material property of the global element.

2
a) BASED ON DIMENSIONS
1. One dimensional element – Line element
2. Two dimensional element – Triangular and quadrilateral elements
3. Three dimensional element – Tetrahedral and hexahedral elements
b) BASED ON MATERIAL PROPERTY
1. Linear element
2. Non-linear element
c) BASED ON DEGREES OF FREEDOM
1. Translational – one, two or three degrees of freedom
2. Rotational – one, two or three degree of freedom

Figure 2: One dimensional element or line element

Usually the structural items such as the axially loaded bars and rods, radially loaded long
beams trusses are considered as one dimensional elements

The plates under the biaxial loading, the bending of plates and the surface of the heated
body are the major examples of the two dimensional problems.

Figure 3: Two dimensional elements

3
1.3 CONSTANT STRAIN TRIANGULAR ELEMENT
The stress analysis of two dimensional objects such as plates and sheets, these objects are
idealized into surface elements such as triangular, rectangular and quadrilateral elements.
Among them triangular element is considered to be the simplest type of two dimensional
element. Depending up on the number of nodes selected for the analysis ,these triangular
elements are specified as linear elements or non-linear elements.

Figure 4: Constant strain triangular and linear triangular element

For linear element, only three corner nodes are considered for analysis. For the non-linear
element, apart from corner nodes, some inner nodes are to be taken for analysis.

In linear triangular element, the displacement is assumed to vary linearly and hence the
strain which is the change of displacement per unit length is constant throughout length
and hence called as ”CONSTANT STRAIN TRIANGULAR ELEMENT”, whereas in
non-linear triangular element the displacement vary non-linearly in such a way that the
strain vary linearly with in the element and hence it is called as “LINEAR STRAIN
TRIANGULAR ELEMANT”.

4
1.4 INTRODUCTION TO MATLAB

The name MATLAB stands for MATrix LABoratory. MATLAB was written originally
to provide easy access to matrix software developed by the LINPACK (linear system
package) and EISPACK (Eigen system package) projects.

MATLAB is a high-performance language for technical computing. It improves


computation, visualization, and programming environment. MATLAB has many
advantages compared to conventional computer languages (e.g., C, FORTRAN) for
solving technical problems. The software package has been commercially available since
1984 and is now considered as a standard tool at most universities and industries
worldwide.

It also has easy to use graphics commands that make the visualization of results
immediately available.

1.4.1 BASIC FEATURS OF MATLAB


After logging into MATLAB, The major tools within or accessible from the desktop are:

 COMMAND WINDOW
 WORKSPACE
 HELP BROWSER
 EDITOR
 CURRENT FOLDER
 TOOL BAR

COMMAND WINDOW: Command window is used to write the commands for the
m-Function or m-file. Commands may consists of input command like “input(‘text’)” or
output commands as “disp(variable)” or loops such as for, while, If based on the
program. Each step is executed instantaneously. To avoid this we can use Editor window.

5
Figure 5: MATLAB INTERFACE

WORK SPACE: As mentioned above in MATLAB each variable is stored in the form
of an array, these array are stored in the work space. While executing the program
various variables are assigned with values and stored in workspace.

HELP BROWSER: Help Browser has accesses to syntax and keywords used in
MATLAB. One can use this reference to write the program without errors. After
execution errors can be debugged by using help browser.

EDITOR: Editor space is used for similar purpose as that of command window. Where
as in command window each command is run simultaneously and executed, in edition a
series of commands can be written and execute overall program.

CURRENT FOLDER: Current folder consists of previously saved program files.


Which are called from current folder.

TOOLBAR: Tool bar consists of Home, Plots, Apps where we can do the programs
and execute, draw different kinds of plots can be done using plots.

6
1.5 MATLAB PROGRAMMING
A Program can be created in MATLAB by writing series of commands in editor window,
but not in command window. As we have discussed earlier, command window cannot run
series of commands. we use editor window to create a program.

A program can be of two types

 m-File scripts
 m-File functions

A script file is an external file that contains a sequence of MATLAB statements. Script
files have a filename extension.m and are often called M-files. M-files can be scripts that
simply execute a series of MATLAB statements, or they can be functions that can accept
arguments and can produce one or more outputs. When execution completes, the
variables remain in the workspace.

M-file functions are programs that accept input arguments and return output arguments.
Each M-file function (or function or M-file for short) has its own area of workspace,
separated from the MATLAB base workspace. The first line of a function M-file starts
with the keyword function. It gives the function name and order of arguments. Both
functions and scripts can have all of these parts, except for the function definition line
which applies to function only.

All variables created in a script file are added to the workspace. This may have
undesirable effects, because:

• Variables already existing in the workspace may be overwritten.

• The execution of the script can be affected by the state variables in the workspace.

As a result, because scripts have some undesirable side-effects, it is better to code any
complicated applications using rather function M-file.

7
1.6 BASIC PLOTING
MATLAB has an excellent set of graphic tools. Plotting a given data set or the results of
computation is possible with very few commands. MATLAB also enables you to add
axis labels and titles.

The MATLAB command to plot a graph is plot(x,y).

MATLAB command to write labels and titles are:

xlabel(’x = ’)
ylabel(’y = ’)
title(’plot of text’)
Colour of the graph curve can also be changed using simple command as
plot(x,y,’colour’). This command is very useful while comparing two or more graphs for
easy viewing and understanding. Multiple data sets can be drawn in single graph and
different line styles can also be used for each data set.

8
CHAPTER 2
LITERATURE REVIEW

Dhiraj. W. Ghatole et. al. (2019)


This paper explains the application of finite element method for the analysis of a stepped
bar subjected to an axial load. The element configurations that are studied range from one
dimensional to three dimensional type and various mesh configurations. The Finite
Element analysis results are compared with exact analytical solution and numerical
solution of the stepped bar and this shows the elemental behavior of the stepped bar. .
The methods employed in this study were analytical equations and finite element
analysis. MATLAB was used to transform analytical equations into graphs and at the
same time to verify the finite element simulation of ANSYS.

Anton Iulia-Alina et. al. (2015)


This paper presents the modeling equations of fluid and thermal analysis, namely
equations type: hyperbolic, elliptical parabolic. It will be noted that it is important to
know every step of the method as the main stage is the development model for
calculating the structure. Other important steps are the domain meshing and interpolation
process of meshing with the effect sharing model structure in a certain number of pieces
called finite elements. Here, we will present three types of equations modeling using
Matlab. Finally, we notice that there are several programs that are based on FEM instead
with a user-friendly interface. Even here it is necessary to understand the method steps in
order to properly model the model chosen.

Ranbir Mukhya et.al. (2019)


In this paper, a finite element method approach has been developed to analyse and solve
the problem of structural displacement due to various internal and external forces. And it
also helps in the calculation stresses and strains. This method can be applied to typical
members of structures such as beam, plate and other complex structures. The theoretical
analysis of the finite element method is well established in the case of the triangular or

9
tetrahedralmeshes.Inthiscasetheyused4-noderectangular mesh, for the analysis of
a flat plate of uniform thickness with the help of MATLAB.

R. R. MANDAL et. al
In this paper, a finite element formulation for eight noded brick element and its
performance on beam member. A MATLAB code is developed to find the deflection at
the nodal points using eight noded brick element. The results obtained from MATLAB
using incompatible element is compared with STADD Pro and ANSYS software. This
paper suggests the use of incompatible element for beam member analysis.

Moses Omolayo PETINRIN


In this study, a Graphical User Interface was successfully developed using MATLAB
programming language to study the behaviour of a suspended column under uniaxial
static loading by solving the numerical model created based on the finite element method
(FEM). In this paper, comparison between the exact solution from previous researches
and the numerical analysis are approximately equal. And it was established that
MATLAB is not only a software package for numerical computation but also for
application development.

10
CHAPTER 3
ANALYSIS OF CONSTANT STRAIN TRIANGULAR
ELEMENTS &MATLAB CODE
3.1 INTODUCTION
The analysis of elements using finite element method is done by formulating the stiffness
matrix. The formulated stiffness matrix is used in Eq(1) discussed in chapter 1 to
determine the unknown displacements and stresses. The formulation of the stiffness
matrix of each finite element is done by using shape functions. To achieve the
displacements at the nodal points and inside the element, we have to make use of two
mathematical expressions

a) FINITE ELEMENT EQUATION


b) SHAPE FUNCTIONS

Finite element equation is discussed in chapter 1, the shape functions are employed to
find the displacements at the interior points of the elements using the values of nodal
displacement and vise-versa. After formulating shape function, using the strain-
displacement matrix and stress-strain matrix, the overall stiffness matrix is calculated as
the part is going to be discussed below.

3.2 DERIVATION OF SHAPE FUNCTION FOR CONSTANT


STRAIN TRIANGULAR EELMENT
The linear triangular element selected for analysis is specified as constant strain
triangular element because of producing constant strain at specified triangle. That is as
per hooks law, the stress is related to strain by young’s modulus. For any element if stress
and young’s modulus are constants then automatically strain is also constant. hence
called as constant strain triangle.

Now consider a three node linear triangle (cst) element whose nodes are specified as 1,
2, 3 as shown in fig 3.1.

Let 1, 2, 3 displacements at nodes 1, 2, 3

11
u1, u2, u3 components of displacement along x-axis

v1, v2, v3 components of displacement along Y-axis

(x1, y1), (x2, y2), (x3, y3) co-ordinates of nodes 1,2,3 respectively

In this the displacement is field variable, its nodal values are 1, 2, 3 and specified
by u1, v1, u2, v2, u3, v3 they can be expressed in matrix form as follows

 u1 
v 
 1
𝛿𝑥 u 2 
{ } = { } = 
𝛿𝑦
 v2 
u3 
 
 v3 

For the element the displacements u and v are linearly varying inside the element and
their values at any point (p) inside the element can be expressed by polynomial series as

u(x, y) = a1 + a2x +a3y

v(x, y) = a4 + a5x +a6y

Now by applying the nodal conditions, the nodal displacements can be expressed as

u1 = a1 +a2x1 +a3y1

u2 = a1 +a2x2 +a3y2

u3 = a1 +a2x3 +a3y3

Similarly the displacement coordinates along y direction can also be expressed. First we
will find the values of polynomial for u, by writing the above equation in matrix form

𝑢1 1 𝑥1 𝑦1 𝑎1
{𝑢2 } = [1 𝑥2 𝑦2 ] [𝑎2 ]
𝑢3 1 𝑥3 𝑦3 𝑎3
The above equation is rewritten as

12
𝑎1 1 𝑥1 𝑦1 −1 𝑢1
{𝑎2 } = [1 𝑥2 𝑦2 ] {𝑢2 }
𝑎3 1 𝑥3 𝑦3 𝑢3

In simplifies form the above equation can be written as {a} = [D]-1{u}

[𝑐]𝑇
Where [D]-1 = |𝐷|

Where [c] is the cofactor matrix of [D] and |D| is determinant of [D]

𝛼1 𝛼2 𝛼3
[c] = [ 𝛽1
T 𝛽2 𝛽3 ]
𝛾1 𝛾2 𝛾3

Where α1 = x2y3-x3y2 ; α2 = x3y1-x1y3 ; α3 = x1y2-x2y1 ; β1 = y2-y3 ; β2 = y3-y1 ; β3 = y1-y2

𝛾1 = x3-x2 ; 𝛾2 = x1-x3 ; 𝛾3 = x2-x1

1 𝑥1 𝑦1
|D| = |1 𝑥2 𝑦2 | = 1(x2y3-x3y2)-x1(y3-y2)+y1(x3-x2)
1 𝑥3 𝑦3

= 2A where A is the area of triangle calculated through the values of nodal coordinates x
and y.

Final equation of the polynomial coefficients for u can be written as

𝑎1 𝛼1 𝛼2 𝛼3 𝑢1
1
{𝑎2 } = 2𝐴 [ 𝛽1 𝛽2 𝛽3 ] {𝑢2 } …………Eq(2)
𝑎3 𝛾1 𝛾2 𝛾3 𝑢3

𝑎1
We know that u (x, y) = [1 𝑥 𝑦] {𝑎2 } ………..Eq(3)
𝑎3

by substitution the the Eq(2) in Eq(3) we get

𝛼1 𝛼2 𝛼3 𝑢1
1
u (x, y) = [1 𝑥 𝑦] [ 𝛽1 𝛽2 𝛽3 ] {𝑢2 }
2𝐴
𝛾1 𝛾2 𝛾3 𝑢3

on simplifying the above equation can be written as

13
𝑢1
u (x, y) = [𝑁1 𝑁2 𝑁3 ] {𝑢2 }
𝑢3

𝛼1 +𝛽1 𝑥+𝛾1 𝑦 𝛼2 +𝛽2 𝑥+𝛾2 𝑦 𝛼3 +𝛽3 𝑥+𝛾3 𝑦


where N1 = ; N2 = ; N3 = are the shape function used
2𝐴 2𝐴 2𝐴

find the displacements at the interior nodes and to find the stiffness matrix, and similar
procedure is used for displacement v at nodes 1, 2, 3 we can get

v = N1v1+N2v2+N3v3

 u1 
v 
 1
𝑢(𝑥, 𝑦)  N1 0 N2 0 N3 0  u 2 
(x, y) = { }= 0   ………..Eq(4)
𝑣(𝑥, 𝑦)  N1 0 N2 0 N3   v2 
u3 
 
 v3 

3.3 FORMULATION OF STRAIN-DISPALCEMENT MATRIX AND


STRESS-STRAIN MATRIX
As we are considering 2D problem analysis, the displacement problems are modeled as
plane stress and plain strain problem. a state of plane stress is said to be exist when the
elastic body is very thin and there are no loads applied on the coordinate direction
parallel to the thickness. In other words, for some two dimensional objects the stresses
can be produced only in two directions and not possible in third direction.

3.3.1 FORMULATION OF PLANE STRESS CONSTITUTIVE


MATRIX [D]
The strains in plane stress element will be as follows (𝜎𝑧 = 0)
𝜎𝑥 𝜎𝑦
∈𝑥 = - µ𝐸
𝐸
𝜎𝑦 𝜎
∈𝑦 = - µ 𝐸𝑥
𝐸
𝜎𝑥 𝜎𝑦
∈𝑧 = -µ - µ𝐸
𝐸

2(1+𝜇)
𝛾xy = 𝜏𝑥𝑦
𝐸

By solving the above equations we can get stress values as follows

14
𝐸
𝜎𝑥 = (1−𝜇2 ) (∈𝑥 + 𝜇 ∈𝑦 )

𝐸
𝜎𝑦 = (1−𝜇2 ) (∈𝑦 + 𝜇 ∈𝑥 )

𝐸
𝜏𝑥𝑦 = 2(1+𝜇) 𝛾𝑥𝑦

Writing the above equations in matrix form we get

𝜎𝑥 1 𝜇 0 ∈𝑥
{ 𝜎𝑦 } = (1−𝜇2) [𝜇 1 0 ] { ∈𝑦 }
𝐸
1−𝜇
𝜏𝑥𝑦 0 0 𝛾𝑥𝑦
2

{𝜎} = [D] {∈}


1 𝜇 0
𝐸
[D] =(1−𝜇2) [𝜇 1 0 ]
1−𝜇
0 0 2

Where [D] is called the constitutive matrix for plane stress condition, used along with the
gradient matrix [B] and shape functions to form the stiffness matrix.

3.3.2 FORMULATION OF PLANE STRAIN CONSTITUTIVE


MATRIX [D]
The state of plane strain occurs in members that are not free to expand in the direction
perpendicular to the plane of applied loads. that is, plane strain condition refers the
occurrence of strain in the body in two directions only and in third direction the strain is
negligible and almost equal to zero. Major examples of plane strain are the dams
subjected to horizontal loading by water forces and pipes subjected to vertical pressure
due to soil fillings.

The strains and stresses in plane strain element will be as follows (∈𝑧 = 0)

𝜎𝑧 = 𝜇(𝜎𝑥 + 𝜎𝑦 )
1−𝜇 2 𝜇(1+𝜇)
∈𝑥 = 𝜎𝑥 − 𝜎𝑦
𝐸 𝐸

1−𝜇 2 𝜇(1+𝜇)
∈𝑦 = 𝜎𝑦 − 𝜎𝑥
𝐸 𝐸

Where 𝜇 is poisson’s ratio & E is young’s modulus of elasticity

15
On solving the above equation we get

𝐸
𝜎𝑥 = (1+𝜇)(1−2𝜇) ((1 − 𝜇) ∈𝑥 + 𝜇 ∈𝑦 )

𝐸
𝜎𝑦 = (1+𝜇)(1−2𝜇) (𝜇 ∈𝑥 + (1 − 𝜇) ∈𝑦 )

𝐸
𝜏𝑥𝑦 = 2(1+𝜇) 𝛾𝑥𝑦

Writing the above equations in matrix form we get

𝜎𝑥 (1 − 𝜇) 𝜇 0 𝜖𝑥
[ 𝜇 (1 − 𝜇) 0 ] { 𝜖𝑦 }
𝐸
{ 𝜎𝑦 } = (1+𝜇)(1−2𝜇) (1−2𝜇) 𝛾
𝜏𝑥𝑦 0 0 𝑥𝑦
2

{𝜎} = [D] {∈}


1−𝜇 𝜇 0
[ 𝜇 1−𝜇 0 ]
𝐸
[D] = =(1+𝜇)(1−2𝜇)
1−2𝜇
0 0 2

Where [D] is the constitutive matrix for the plane strain matrix. The stress components
are constant with in the linear triangular element. As we have assumed linear strain
triangular element and within hook’s law strain is proportional to stress. The stress
produced are assumed to be the values at the centroid of the triangular element.

3.3.3 FORMULATION OF GRADIENT MATRIX [B]


Gradient matrix is the strain-displacement relation matrix, shows the relation between
strain and displacement. We know that strain is the change in displacement per unit
length, in other words strain is derivative of displacement with respect to length along the
displacement direction. For the derivation of displacements the Eq(4) is used

 u1 
v 
 1
𝑢(𝑥, 𝑦) N 0 N2 0 N3 0  u 2 
𝛿(𝑥, 𝑦) = { }=  1  
𝑣(𝑥, 𝑦) 0 N1 0 N2 0 N3   v2 
u3 
 
 v3 

16
Which can be written
U = N1u1+N2u2+N3u3
V = N1v1+N2v2+N3v3
The equation for normal strain in x-direction is given by
𝜕𝑢 𝜕𝑁1 𝜕𝑁2 𝜕𝑁3
∈𝑥 = = 𝑢1 + 𝑢2 + 𝑢3
𝜕𝑥 𝜕𝑥 𝜕𝑥 𝜕𝑥

Similarly the strain equation in y direction is given below


𝜕𝑣 𝜕𝑁1 𝜕𝑁2 𝜕𝑁3
∈𝑦 = = 𝑣1 + 𝑣2 + 𝑣3
𝜕𝑦 𝜕𝑦 𝜕𝑦 𝜕𝑦

The shear in x-y plane


𝜕𝑢 𝜕𝑣 𝜕𝑁1 𝜕𝑁2 𝜕𝑁3 𝜕𝑁1 𝜕𝑁2 𝜕𝑁3
𝛾𝑥𝑦 = + 𝜕𝑥 = 𝑢1 + 𝑢2 + 𝑢3 + 𝑣1 + 𝑣2 + 𝑣3
𝜕𝑦 𝜕𝑦 𝜕𝑦 𝜕𝑦 𝜕𝑥 𝜕𝑥 𝜕𝑥

By writing the above equation in the matrix form we get

 N1   u1 
N 2 N 3 v 
 0 0 0 
 1
∈𝑥  x x x  u 2 
N1 N 2 N 3 
{ ∈𝑦 } =  0 0 0   …………..Eq(5)
𝛾𝑥𝑦  y y y   v2 
 N N1 N 2 N 2 N 3 N 3  u3 
 1   
 y x y x y x   v3 

Here N1, N2, N3 are function of x, y and the nodal displacements are constants.
From above chapter 3.2 we know the values of N1, N2, N3 by substituting them for
differentiation with respect to x, y we get the following

∂N1 β1 𝜕𝑁2 𝛽 𝜕𝑁3 𝛽


= ; = 2𝐴2 ; = 2𝐴3
∂x 2A 𝜕𝑥 𝜕𝑥

𝜕𝑁1 𝛾1 𝜕𝑁2 𝛾2 𝜕𝑁3 𝛾3


= ; = ; =
𝜕𝑦 2𝐴 𝜕𝑦 2𝐴 2𝐴 2𝐴

By substituting the above values in Eq(4) we get the following matrix form

17
 u1 
v 
∈𝑥  1 0 2 0 3 0  1
0 u 2 
 3 
1
{ ∈𝑦 } = 2𝐴  1 0  2 0  
𝛾𝑥𝑦  1 1  2  2  3  3   v2 
u3 
 
 v3 

{𝜀} = [B] { }
[B] is called the GRADIENT MATRIX . That shows the relation between the strain–
displacement matrix, which in turn can be used to get the relation between stress and
displacement also.

{𝜎} = [𝐷] {𝜀}

{𝜎} = [𝐷][𝐵]{𝛿}

3.4 STIFFNESS MATRIX FOR TWO DIMENSIONAL (CST)


ELEMENT
The stiffness matrix for two dimensional element can be formulated from the general
expression given below

Stiffness matrix [K] = ∫[𝐵]𝑇 [𝐷][𝐵]𝑑𝑣

i;e, [K] = [B]T[D][B] At

where [B] = strain-displacement matrix or Gradient matrix for two dimensional element

[D] = Elasticity matrix or constitutive matrix

A = Area of triangular element

t = thickness of element

3.5 PROBLEM STATEMENT


Problem 1: For the two dimensional plate shown in Figure 6 determine the deflection
at the point of load application. Where thickness of plate is 10mm, E = 70GPa, 𝜇 = 0.3.

18
Figure 6: Triangular element 1
Solution to above problem is as follows
Overall stiffness matrix

 31.5 0 0  21  31.5 21 
 0 90  18 0 18  90

106  0  18 40 0  40 18 
[K] = 156  
  21 0 0 14 21  14 
 31.5 18  40 21 71.5  39
 
 21  90 18  14  39 104 

Decomposed stiffness matrix


106 40 0
[k] = 156 [ ]
0 14
The deflection at the point of load application
0.00195
{𝛿} =[ ]mm
−0.01114

Problem 2: For the plane strain element shown in the figure 7, the nodal displacement
are u1 = 0.0005; v1 = 0.002 ; u2 = 0.0; v2 = 0.0; u3 = 0.005; v3 = 0.0. Find the element
stresses. Assume E = 70GPa and 𝜇 = 0.3.(Thickness is taken as unit in plane strain
problems)

19
Figure 7: triangular element 2
The theoretical solution of the above problem is
7 3 0
7×105
[D] = [3 7 0]
52
0 0 2

1 0 0 0 1 0
1
[B] = 20 [ 0 1 0 2 0 1]
1 1  2 0 1 1
𝜎𝑥 4.308
𝑁
{ 𝜎𝑦 } = [ 9.423 ] 𝑚𝑚2
𝜏𝑥𝑦 10.769

Problem 3: calculate the elemental stresses 𝜎𝑥 , 𝜎𝑦 , 𝜏𝑥𝑦, for the CST element shown in the
figure 8 with the nodal displacements u1 = 0.002; v1 = 0.001; u2 =0.0005; v2 = 0.0015; u3
= 0.0012; v3 = 0.0028. take E = 210GPa and 𝜇 = 0.25. assume plane stress condition.

Figure 8: Triangular element 3

20
Solution of the above problem is as follows
4 1 0
[D] = 56 × 103 [1 4 0]
0 0 1.5

 7 0 4 0 3 0
1
[B] = 44 0 3 0  8 0 5

 3  7  8 4 5 3

𝜎𝑥 −36.4
𝑁
{ 𝜎𝑦 } = { 14.76 } 𝑚𝑚2
𝜏𝑥𝑦 29.4
3.4 MATLAB CODE FOR TRIANGULAR ELEMENT ANALYSIS
3.4.1 MATLAB CODE TO FIND STRESSES IN PLANE STRESS
CONDITION
% FINITE ELEMENT ANALYSIS USING MATLAB FOR CST ELEMENT
% plane stress problem
% calculation of stresses in element
clear
clc;

% input problem coordinates and connection


for i=1:3
x(i) = input('enter the x coordinates\n');
y(i) = input('enter y coordinates\n');
end

% INPUT properties
t = input('enter the thickness of triangular plate in mm\n');
E = input('enter the young’s modulus of elasticity of plate\n');
u = input('enter the Poisson’s ratio\n');

%---------END OF INPUT-----------%
a = [1 x(1) y(1);1 x(2) y(2);1 x(3) y(3)];
A = 0.5*det(a);
a1=x(2)*y(3)-x(3)*y(2);
a2=x(3)*y(1)-x(1)*y(3);
a3=x(1)*y(2)-x(2)*y(1);
b1=y(2)-y(3);
b2=y(3)-y(1);
b3=y(1)-y(2);
c1=x(3)-x(2);
c2=x(1)-x(3);

21
c3=x(2)-x(1);

% calculation of stiffness matrix


B = (1/(2*A))*[b1 0 b2 0 b3 0;0 c1 0 c2 0 c3;c1 b1 c2 b2 c3 b3];
fprintf('the gradient matrix [B] is\n')
disp(B)
D = (E/(1-u^2))*[1 u 0;u 1 0;0 0 (1-u)/2];
fprintf('the constitutive matrix [D] is\n')
disp(D)

% calculation of element stresses and forces in the element


n = input('enter the number of degree of freedom\n');
U = input('enter the displacement matrix\n');
sig = D*B*U;
fprintf('stresses in the element\n')
disp(sig);

3.4.2 MATLAB CODE FOR DISPLACEMENTS AND GRAHPIC


REPRESENTATION OF DISPLACEMENT

% FINITE ELEMENT ANALYSIS USING MATLAB FOR CST ELEMENT %


% plane stress problem %
% calculation of displacement in element %
clear
clc;

% input problem coordinates and connection %


x = zeros(3);
y = zeros(3);
for i=1:3
x(i) = input('enter x coordinates\n');
y(i) = input('enter y coordinates\n');
end

% INPUT properties %
t = input('enter the thickness of triangular plate in mm\n');
E = input('enter the young’s modulus of elasticity of plate\n');
u = input('enter the Poisson’s ratio\n');

% input enter force vector acting on triangular plate %


F = input('enter the force vector\n');

%---------END OF INPUT-----------%
a = [1 x(1) y(1);1 x(2) y(2);1 x(3) y(3)];
A = 0.5*det(a);

22
disp(A);

a1=x(2)*y(3)-x(3)*y(2);
a2=x(3)*y(1)-x(1)*y(3);
a3=x(1)*y(2)-x(2)*y(1);
b1=y(2)-y(3);
b2=y(3)-y(1);
b3=y(1)-y(2);
c1=x(3)-x(2);
c2=x(1)-x(3);
c3=x(2)-x(1);

% calculation of stiffness matrix %


B = (1/(2*A))*[b1 0 b2 0 b3 0;0 c1 0 c2 0 c3;c1 b1 c2 b2 c3 b3];
D = (E/(1-u^2))*[1 u 0;u 1 0;0 0 (1-u)/2];
K = A*t*B.'*D*B;
disp(K);

% separation of nodal displacement stiffness vector %


n = input('enter the displacements present nodes\n');
k=K(n,n);
disp(k)

% calculation of displacements %
U = inv(k)*F;
fprintf('the displacements at the nodes are\n')
disp(U)

% annimation of displacement of triangular element %


figure
hold on
X = [x(1) x(2) x(3) x(1)];
Y = [y(1) y(2) y(3) y(1)];
X1 = [x(1) x(2)+U(1,1)*100 x(3) x(1)];
Y1 = [y(1) y(2)+U(2,1)*100 y(3) y(1)];
grid on
axis([0 50 0 50])
plot(X,Y,X1,Y1,'m--', 'LineWidth', 0.1,'LineWidth', 2)

3.4.3 MATLAB code to find forces in plane strain condition


% FINITE ELEMENT ANALYSIS USING MATLAB FOR CST ELEMENT
% plane strain problem %
% calculation of stresses in element %
clear
clc;

23
% input problem coordinates and connection %
for i=1:3
x(i) = input('enter the x coordinates\n');
y(i) = input('enter y coordinates\n');
end

% INPUT properties %
t = 1; % Given is a plane strain problem %
E = input('enter the young’s modulus of elasticity of plate\n');
u = input('enter the Poisson’s ratio\n');

%---------END OF INPUT-----------%
a = [1 x(1) y(1);1 x(2) y(2);1 x(3) y(3)];
A = 0.5*det(a);
disp(A);

a1=x(2)*y(3)-x(3)*y(2);
a2=x(3)*y(1)-x(1)*y(3);
a3=x(1)*y(2)-x(2)*y(1);
b1=y(2)-y(3);
b2=y(3)-y(1);
b3=y(1)-y(2);
c1=x(3)-x(2);
c2=x(1)-x(3);
c3=x(2)-x(1);

% calculation of stiffness matrix %


B = (1/(2*A))*[b1 0 b2 0 b3 0;0 c1 0 c2 0 c3;c1 b1 c2 b2 c3 b3];
disp(B)
D = (E/((1+u)*(1-2*u)))*[1 u 0;u 1 0;0 0 0.5-u];
disp(D)

% calculation of element stresses in the element %


n = input('enter the number of degree of freedom\n');
U = input('enter the displacement matrix\n');
sig = D*B*U;
disp(sig);

24
CHAPTER 4
RESULTS AND DISCUSSION
4.1 INTRODUCTION

MATLAB code is written for analysis of the 2D triangular elements. On executing a


series of inputs were asked for the analysis like Poisson’s ratio, young’s modulus of
elasticity, coordinates of the 2D element, thickness of element. Input is given in the
command window and the array is assigned to each input and stored in work space for
further calculation and the desired output is done and displayed in command window.
For the further study of behavior of the elements and visualization PLOTS is used in
MATLAB. Plots are used to draw the graphs and 3D visualization, for the better study of
the structural behavior.

4.2 RESULTS
RESULTS for MATLAB code to find stresses in Plane stress condition

enter the x coordinates

10

enter y coordinates

enter the x coordinates

15

enter y coordinates

enter the x coordinates

18

enter y coordinates

12

enter the thickness of triangular plate in mm

25
10

enter the young’s modulus of elasticity of plate

210000

enter the poisson’s ratio

0.25

the gradient matrix [B] is

-0.1591 0 0.0909 0 0.0682 0

0 0.0682 0 -0.1818 0 0.1136

0.0682 -0.1591 -0.1818 0.0909 0.1136 0.0682

the constitutive matrix [D] is

224000 56000 0

56000 224000 0

0 0 84000

enter the number of degree of freedom

enter the displacement matrix

[0.002;0.001;0.0005;0.0015;0.0012;0.0028]

stesses in the element

-36.4000

14.7636

29.4000

26
Results of MATLAB code for displacements and graphic representation of
displacement
enter x coordinates

enter y coordinates

enter x coordinates

30

enter y coordinates

20

enter x coordinates

enter y coordinates

20

enter the thickness of triangular plate in mm

10

enter the young’s modulus of elasticity of plate

70000

enter the Poisson’s ratio

0.3

enter the displacements present nodes

[3,4]

enter the force vector

[500;-1000]

27
area of the triangular plate is

300

the global stiffness matrix is

1.0e+05 *

2.0192 0 0 -1.3462 -2.0192 1.3462

0 5.7692 -1.1538 0 1.1538 -5.7692

0 -1.1538 2.5641 0 -2.5641 1.1538

-1.3462 0 0 0.8974 1.3462 -0.8974

-2.0192 1.1538 -2.5641 1.3462 4.5833 -2.5000

1.3462 -5.7692 1.1538 -0.8974 -2.5000 6.6667

the decomposed stiffness matrix is

1.0e+05 *

2.5641 0

0 0.8974

the displacements at the local nodes are

0.0019

-0.0111

Figure 9: Visualization of displacement using MATLAB

28
Results for MATLAB code to find forces in plane strain condition

enter the x coordinates

enter y coordinates

15

enter the x coordinates

15

enter y coordinates

enter the x coordinates

25

enter y coordinates

15

enter the young’s modulus of elasticity of plate

70000

enter the Poisson’s ratio

0.3

the gradient matrix [B] is

-0.0500 0 0 0 0.0500 0

0 0.0500 0 -0.1000 0 0.0500

0.0500 -0.0500 -0.1000 0 0.0500 0.0500

29
the constitutive matrix [D] is

1.0e+04 *

9.4231 4.0385 0

4.0385 9.4231 0

0 0 2.6923

enter the number of degree of freedom

enter the displacement matrix

[0.005;0.002;0;0;0.005;0]

the stresses in the element are

4.0385

9.4231

10.7692

4.3 DISCUSSIONS
The results obtained using MATLAB code are equal as the results of theoretical finite
element analysis as shown in chapter 3.5. The code is verified with other triangular
elements which is giving exact solutions.

30
CONCLUSIONS
The following conclusions have been drawn from the present study

• The accuracy of solution increased by using MATLAB code compared with theoretical
finite element analysis.

• The problem can be solved within less amount of time.

• Manual computational errors are avoided by using MATLAB code.

• The MATLAB code can be used to find solution of any type of three noded triangular
element.

31
Future Scope of study
 The MATLAB code can be extended for the future study of the 2D structural
elements such as shells and plates.
 As the shells are highly complicated structural elements their analysis can be
easily done by developing the MATLAB programing.
 Axis symmetric elements in finite element are generally analyzed by using
triangular elements. Hence code can be further developed for analysis of such
structures
 High visualization of stresses and displacements can be done by using MATLAB
software.

32
REFERENCES

1. Dhiraj. W. Ghatole “Finite Element Analysis of Stepped Bar using MATLAB and
ANSYS” International Journal of Research in Advent Technology E-ISSN: 2321-
9637, Vol.7, No.1, January 2019.
2. Anton Iulia-Alina, Panaitescu Mariana, Panaitescu Fanel-Viorel
“APPLICATIONS IN MATLAB USING FINITE ELEMENT METHOD”
International Journal of Marine Technology and Environment, http://www.cmu-
edu.eu/jmte, ISSN 1844-6116, vol.2, year 2015.
3. Ranbir Mukhya “Finite Element Analysis of a 2-D Linear Static Structure (Flat
Plate) Using MATLAB,” International Journal of Science and Research (IJSR)
ISSN: 2319-7064, Volume 8 Issue 7, July 2019.
4. R R Mandal, U K Dewangan “Finite Element Modelling of Beam with Eight
Noded Brick Element using MATLAB,” International Journal of Civil
Engineering and Technology (IJCIET) ISSN: 0976-6316, Volume 8, Issue 5, May
2017.
5. Moses Omolayo PETINRIN “Development of Graphical User Interface for Finite
Element Analysis of Static Loading of a Column using MATLAB,” Leonardo
Electronic Journal of Practices and Technologies (LEJPT) ISSN: 1583-1078, p-
ISSN:131-142, Issue 17, July-December 2010.
6. S. Md. Jalaludeen -Finite element analysis in Engineering.

33

Vous aimerez peut-être aussi