Sunteți pe pagina 1din 38

ANALYSIS OF THREE FINITE ELEMENTS AND

FOUR NODE SYSTEM USING MATLAB AND


ANSYS APDL
Submitted in partial fulfillment of the requirements

of the degree of

Bachelor of Engineering
(Course Project)
by

BALKAR SINGH MANNY : 60005140040


ATHARVA NARKAR : 60005140055
ARMAAN VALJEE : 60005140112
RUSHIKESH YADAV : 60005140119

Under Project Guide:

PROF. RAJNARAYAN YADAV

Mechanical Engineering

Dwarkadas J. Sanghvi College of Engineering


University of Mumbai
2017-18
Page | 1
CERTIFICATE

This is to certify that the project entitled Analysis of Three Elements and Four
Node System Using MATLAB and ANSYS is a bonafide work of Balkar Singh
Manny (60005140040), Atharva Narkar (60005140055) ,Armaan
Valjee(60005140112) and Rushikesh Yadav(60005140119) submitted to the
University of Mumbai in partial fulfillment of the requirement for the award of the
degree of Bachelor of Engineering in Mechanical Engineering.

Project Guide Head of Department

(Prof. Rajnarayan Yadav) (Dr. K.N. Vijay Kumar)

Page | 2
ABSTRACT

The report presents analysis of thin plate in tension by using MATLAB and ANSYS.
Although there are many existing commercial engineering software such as STAAD
Pro, and LUSAS etc., but most of them are expensive. Finite Element Analysis is
the most suitable tool to analyze the thin plate. This is because finite element analysis
is cheaper. The study is conducted to prove finite element analysis using non-linear
analysis is able to give a similar result as the MATLAB test. This report consists the
development of thin plate, finite element analysis using ANSYS software and
simulation using MATLAB. Results generated from the analysis of thin plate using
ANSYS software are compared with the existing engineering software MATLAB
for validation.

Page | 3
TABLE OF CONTENTS

Title Page No.


List of Figures 6

Chapter 1: Introduction 7
1.1 Title 7
1.2 Aim 7
1.3 Project Development 7

Chapter 2: Literature Review 8

Chapter 3: Plane Stress 9


3.1 Introduction 9
3.2 Displacement, Strain and Stresses 9
3.3 Boundary Condition 10
3.4 Potential Energy 11
3.5 Finite Element Discretization 11
3.6 Element Energy 12
3.7 Quadrilateral Element Q4 12

Chapter 4: Introduction to MATLAB 16


4.1 What is MATLAB ? 16
4.2 MATLAB Systems 16

Chapter 5: Introduction to ANSYS 18


5.1 Overview 18
5.2 General Procedure 18
5.3 F.E.M. Process 19

Chapter 6: Thin Plate in Traction 20

Chapter 7: MATLAB Codes and Results 21


7.1 MATLAB Problem Code 21
7.2 Code for Form stiffness 2D 21
7.3 Code for Solution 21
7.4 Code for Stresses 2D 21
7.5 Finite Element Mesh for a thin plate in tension 21
7.6 Displacement in XX direction 22

Page | 4
7.7 Stress xx on deformed shape 22
7.8 MATLAB Output 23
7.9 Displacement on Nodes 23

Chapter 8: ANSYS Results 26


8.1 Finite Element Mesh (Undeformed shape) 26
8.2 Deformed Shape 27
8.3 Nodal Displacement 28
8.4 Displacement on ANSYS 28

Chapter 9: Comparison of Results 31

Chapter 10: Conclusion 32

Chapter 11: Appendix 33

Chapter 12: References 38

Page | 5
List of Figures

Figure No. Title Page No.


3.1 Plane Stress: Illustration of domain and boundary 10
3.2 Quadrilateral Q4 element in Natural Co-ordinates 13
3.3 One and Two Gauss Point Integration 15
6.1 Thin Plate in Traction 20
7.1 MATLAB- Finite Element Mesh 21
7.2 MATLAB- Displacement in XX direction 22
7.3 MATLAB- Stress on deformed shape 22
8.1 ANSYS- Finite Element Mesh 26
8.2 ANSYS- Deformed Shape 27
8.3 ANSYS- Nodal Displacement 28

Page | 6
CHAPTER 1
INTRODUCTION

1.1 TITLE ANALYSIS OF THIN PLATE IN TRACTION USING MATLAB AND


ANSYS

1.2 AIM

To analyze thin plate in tension using MATLAB and ANSYS

1.3 PROJECT DEVELOPMENT


The analysis of a three elements and four nodes using matlab and ansys

The object is divided into n number of elements by application of finite
element method to get better results.

with MATLAB, once the code is executed we move on to FEM
Initially we begin
using ANSYS.

The individual results are evaluated and compared.

Page | 7
CHAPTER 2

LITERATURE REVIEW

The Element Free Galerkin Method was first developed by Belytschko in 1994 . It is based
on the Diffuse Element Method developed by Nayroles in1992. He used the Moving Least
Square Approximation or the Local Regression or Loss which was invented by Lancaster
and Salkauskas 1980 to determine the shape functions. Belytschko along with Krysl in
1999 developed the EFG method for thin plates or Kirchhoff plates. Their study revealed
the optimal quadrature order and the most favorable support size for EFG analysis. G.R.
Liu in his book entitled Mesh Free Methods: Moving beyond the Finite Element Method
describes the EFG method in detail.

Many numerical examples are used to show convergence studies and influence of factors
such as number of nodes, quadrature points, support size domains etc. In addition to this,
G.R. Liu created a source code for analysis of the EFG Method in FORTRAN, the code
was published in their book entitled An Introduction to Mesh Free Methods and their
Programming. J. Dolbow and T. Belytschko also created source codes for the EFG method
in their paper An introduction to programming the mesh-less Element Free Galerkin
Method. The paper explained in detail the algorithm and flow chart for programming the
EFGM for both 1D and 2D problem domains. A clarification of the algorithm and the logic
behind it is expressed very lucidly in the paper. In addition to this the MATLAB source
codes for the same are also given. In order to simplify the problem a uniform distribution
of nodes is taken and a Gaussian quadrature order of 4 is assumed.

The content of the above mentioned books and journals have helped us in achieving a clear
understanding of the Element Free Galerkin method as well as provide us with a clear idea
of its ANALYSIS OF THREE ELEMENTS AND FOUR NODE SYSTEM USING
MATLAB coding logic, technique and procedure. The simulation package used for the
analysis of some of the numerical examples has been developed by G.R.Liu at the Centre
for advanced computation in engineering sciences.

Page | 8
CHAPTER 3

PLANE STRESS

3.1 Introduction:

Plane stress analysis refers to problems where the thickness is quite small when compared
to other dimensions in the reference plane xy. The loads and boundary conditions are
applied at the reference or middle plane of the structure. Displacements are computed at
the reference plane. The stresses related with z coordinates are assumed to be very small
and not considered in the formulation. In this chapter we consider only isotropic,
homogeneous materials, and the four-node quadrilateral (Q4).

3.2 Displacement, strain and stresses:

The plane stress problem considers two global displacements, u and v, defined in global
directions x and y, respectively.

Strains are obtained by derivation of displacements

Page | 9
Fig. 3.1 Plane stress: illustration of domain () and boundary

() By assuming a linear elastic material, we obtain stresses as

where E is the modulus of elasticity and the Poissons coefficient.

The static equilibrium equations are defined as

where bx, by are body forces.

3.3 Boundary conditions


Essential or displacement boundary conditions are applied on the boundary displacement
part , as

Natural or force boundary conditions are applied on , so that

Page | 10
where is the surface traction per unit area, and n the normal vector to the plate.

If necessary, n can be computed in natural coordinates by

3.4 Potential energy


The potential energy can be defined as
= U W
where U is the elastic strain deformation,

The energy produced by the external forces is given by

3.5 Finite element discretization


Given a domain denoted by e and a boundary denoted by e, the n-noded finite
element displacement vector is defined by 2n degrees of freedom,

Interpolation of displacements
The displacement vector in each element is interpolated by the nodal
displacements as

Where denote the element shape functions. This can also be expressed in
matrix form as

Page | 11
The strain vector can be obtained by derivation of the displacements as

where B is the strain-displacement matrix. This matrix is needed for


computation of the stiffness matrix, and the stress vector at each element.

3.6 Element energy


The total potential energy can be defined at each element by

where the strain energy is defined as

and the energy produced by the surface tractions is given by

We can introduce these expressions into the total potential energy as

where the element stiffness matrix is obtained as

and the vector of nodal forces is obtained as

3.7 Quadrilateral element Q4


We consider a quadrilateral element, illustrated in figure 3.2. The element is defined by
four nodes in natural coordinates (, ). The coordinates are interpolated as

Page | 12
where Ni are the Lagrange shape functions, given by

Displacements are interpolated as

where u, v are the displacements at any point in the element and ui, vi; i = 1, ..., n
the nodal displacements.

Derivatives can be found as

Fig. 3.2 Quadrilateral Q4 element in natural coordinates

Page | 13
In matricial form, we can write relations as

where J is the Jacobian operator, relating natural and global coordinates. The
derivatives with respect to the global coordinates can be found as

Note that in very distorted elements the Jacobian inverse, may not exist.

The stiffness matrix is then obtained by

Note that B depends on the element natural coordinates , . The element


volume is given by

where detJ is the determinant of the Jacobian matrix and h the thickness of the plate.
The integral in the stiffness matrix is computed numerically by Gauss quadrature in two
dimensions. Taking

where F = BTCBdetJ, we perform the numerical computation by

Here Fi,j is a matrix dependent on the natural points (i, j ). Integration points (i, j) and
integration weights depend on the type of integration the user wishes to perform. In the
four-node element we can use a 2 2 numerical integration for exact integration.

The Gauss quadrature in two dimensions replaces the integration by a summation over
Gauss points, by

Page | 14
Fig. 3.3 One Gauss point integration ( = 0, = 0); two Gauss point integration (, =
1/3 )

where p, q are the number of integrating points in the , directions, respectively, and wi,
wj are the corresponding weights, as illustrated in figure 3.3, for some integration orders.
The stiffness matrix can be computed using 2 2 Gauss points as

All Gauss points have unit weight, in this integration rule.

Page | 15
CHAPTER 4
INTRODUCTION TO MATLAB

4.1 What is MATLAB ?


MATLAB (matrix laboratory) is a multi-paradigm numerical computing environment and
fourth-generation programming language. A proprietary programming language developed
by MathWorks, MATLAB allows matrix manipulations, plotting of functions and data,
implementation of algorithms, creation of user interfaces, and interfacing with programs
written in other languages, including C, C++, Java, Fortran and Python.

Although MATLAB is intended primarily for numerical computing, an optional toolbox


uses the MuPAD symbolic engine, allowing access to symbolic computing capabilities. An
additional package, Simulink, adds graphical multi-domain simulation and model-based
design for dynamic and embedded systems. Typical uses include:

Math and computation.

Algorithm development.

Modeling, simulation, and prototyping.

Data analysis, exploration, and visualization.

Scientific and engineering graphics.

Application development, including Graphical User Interface building.

4.2 The MATLAB System


The MATLAB system consists of five main parts:

1. The MATLAB language:


This is a high-level matrix/array language with control flow statements, functions, data
structures, input/output, and object-oriented programming features. It allows both
"programming in the small" to rapidly create quick and dirty throw-away programs, and
"programming in the large" to create complete large and complex application programs.

2. The MATLAB working environment:


This is the set of tools and facilities that you work with as the MATLAB user or
programmer. It includes facilities for managing the variables in your workspace and

Page | 16
importing and exporting data. It also includes tools for developing, managing, debugging,
and profiling M-files, MATLAB's applications.

3. Handle Graphics:
This is the MATLAB graphics system. It includes high-level commands for two-
dimensional and three-dimensional data visualization, image processing, animation, and
presentation graphics. It also includes low-level commands that allow you to fully
customize the appearance of graphics as well as to build complete Graphical User
Interfaces on your MATLAB applications.

4. The MATLAB mathematical function library:


This is a vast collection of computational algorithms ranging from elementary functions
like sum, sine, cosine, and complex arithmetic, to more sophisticated functions like matrix
inverse, matrix eigenvalues, Bessel functions, and fast Fourier transforms.

5. The MATLAB Application Program Interface (API):


This is a library that allows you to write C and FORTRAN programs that interact with
MATLAB. It include facilities for calling routines from MATLAB (dynamic linking),
calling MATLAB as a computational engine, and for reading and writing MAT-files.

Page | 17
CHAPTER 5
INTRODUCTION TO ANSYS

5.1 Overview
Finite element method is a numerical method and is used to solve problems governed by a
differential equation. It can be used to analyze complex problems with varying shape
boundary conditions, loading and material properties. But this method gives an
approximate solution thus MATLAB is preferred for high precision operations. ANSYS is
general-purpose finite element analysis (FEA) software package. The software implements
equations that govern the behavior of these elements and solves them all; creating a
comprehensive explanation of how the system acts as a whole. These results then can be
presented in tabulated or graphical forms.

The multifaceted nature of ANSYS also provides a means to ensure that users are able to
see the effect of a design on the whole behavior of the product, be it electromagnetic,
thermal, and mechanical and many more. It permits an evaluation of a design without
having to build and destroy multiple prototypes in testing.

Finite Element Method (F.E.M), is said to be a numerical method to solve differential


equations. Engineering problems are analyzed by forming differential equations for
different processes and solving the same by applying suitable boundary conditions.

5.2 General Procedure


Procedure of finite element method is given in following steps-:
1. Physical engineering problem such as thermal or structural or electrical network
problem is expressed as mathematical model in the form of differential equation known as
Governing Differential Equation (G.D.E).

2. As the solution is an approximate one, the RHS of governing differential equation is


equated to zero but some quantity which is known as the residue and our aim is to minimize
the residue to the maximum extent value.
3. The domain of the problem is then divided into a number of small sub domains k known
as elements of some finite lengths or shapes as the case may be. This process is known as
Discretization.

Page | 18
4. The governing differential equation as obtained above is analyzed for a single element
by obtaining what is called as Element Matrix Equation (E.M.E) using Rayleigh-Ritz Weak
Formulation Method.

5. Such matrix equations for each element are now formed by suitably substituting the
values in the matrix equations produced for a general element.

6. All the element matrix equations are now assembled to form a Global Matrix Equation
(G.M.E).

7. Global boundary conditions are then imposed and equations are now solved to get the
required solutions for unknowns.
8. The results obtained have to be suitably verified before confirming the solution.

5.3 F.E.M. Process


The process is divided into three steps:-
1. Pre-processing
It involves the preparation of data such as nodal coordinates, connectivity, boundary
conditions and loads and materials used,

2. Processing
This stage involves stiffness generation, solutions of equations, resulting in evaluation of
nodal variables.

3. Post processing
This stage deals with the presentation and display of results.

The thin plate is modelled using ANSYS APDL. ANSYS is a major product for computer
based Prototyping. ANSYS Structural software addresses the unique concerns of pure
structural simulations without the need for a lot of extra tools. These are general-purpose
finite element modeling packages for numerically solving mechanical problems, including
static or dynamic structural analysis (both linear and non-linear), heat transfer and fluid
problems, as well as acoustic and electro-magnetic problems.

Page | 19
CHAPTER 6
THIN PLATE IN TRACTION

We considered a thin plate under uniform traction forces at its extremes. The problem
is illustrated in figure 6.1.

Fig. 6.1

Modulus of Elasticity E=10e7;

Poisons ratio = 0.3;

Traction Force P= 1e6.

Page | 20
CHAPTER 7
MATLAB CODES AND RESULTS

7.1 MATLAB PROBLEM CODE


7.2 CODE FOR FORM STIFFNESS 2D
7.3 CODE FOR SOLUTION
7.4 CODE FOR STRESSES 2D
*Refer Chapter 11 Appendix for all the MATLAB codes

7.5 FINITE ELEMENT MESH FOR A THIN PLATE IN TENSION

Figure 7.1

Page | 21
7.6 DISPLACEMENT IN XX DIRECTION

Figure 7.2

7.7 STRESS xx ON DEFORMED SHAPE

Figure 7.3

Page | 22
7.8 MATLAB OUTPUT

Natural Derivatives = Shape Function =

-0.1057 -0.1057 0.1667


0.1057 -0.3943 0.0447
0.3943 0.3943 0.1667
-0.3943 0.1057 0.6220

7.9 DISPLACEMENT ON NODES

NODE UX
1. 0 31. 0.0224999999999978
2. 0.00249999999999976 32. 0.0249999999999976
3. 0.00499999999999952 33. 0.0274999999999973
4. 0.00749999999999928 34. 0.0299999999999971
5. 0.00999999999999903 35. 0.0324999999999969
6. 0.0124999999999988 36. 0.0349999999999967
7. 0.0149999999999985 37. 0.0374999999999965
8. 0.0174999999999983 38. 0.0399999999999962
9. 0.0199999999999980 39. 0.0424999999999961
10. 0.0224999999999978 40. 0.0449999999999959
11. 0.0249999999999976 41. 0.0474999999999959
12. 0.0274999999999973 42. 0.0499999999999958
13. 0.0299999999999971 43. 0
14. 0.0324999999999969 44. 0.00249999999999976
15. 0.0349999999999967 45. 0.00499999999999952
16. 0.0374999999999965 46. 0.00749999999999928
17. 0.0399999999999962 47. 0.00999999999999903
18. 0.0424999999999961 48. 0.0124999999999988
19. 0.0449999999999960 49. 0.0149999999999985
20. 0.0474999999999959 50. 0.0174999999999983
21. 0.0499999999999959 51. 0.0199999999999980
22. 0 52. 0.0224999999999978
23. 0.00249999999999976 53. 0.0249999999999976
24. 0.00499999999999952 54. 0.0274999999999973
25. 0.00749999999999928 55. 0.0299999999999971
26. 0.00999999999999903 56. 0.0324999999999969
27. 0.0124999999999988 57. 0.0349999999999967
28. 0.0149999999999985 58. 0.0374999999999964
29. 0.0174999999999983 59. 0.0399999999999963
30. 0.0199999999999980 60. 0.0424999999999961

Page | 23
61. 0.0449999999999960 104. 0.0474999999999959
62. 0.0474999999999959 105. 0.0499999999999959
63. 0.0499999999999959 106. 0
64. 0 107. 0.00249999999999976
65. 0.00249999999999976 108. 0.00499999999999952
66. 0.00499999999999952 109. 0.00749999999999927
67. 0.00749999999999928 110. 0.00999999999999903
68. 0.00999999999999903 111. 0.0124999999999988
69. 0.0124999999999988 112. 0.0149999999999985
70. 0.0149999999999985 113. 0.0174999999999983
71. 0.0174999999999983 114. 0.0199999999999980
72. 0.0199999999999980 115. 0.0224999999999978
73. 0.0224999999999978 116. 0.0249999999999976
74. 0.0249999999999976 117. 0.0274999999999973
75. 0.0274999999999973 118. 0.0299999999999971
76. 0.0299999999999971 119. 0.0324999999999969
77. 0.0324999999999969 120. 0.0349999999999967
78. 0.0349999999999967 121. 0.0374999999999965
79. 0.0374999999999965 122. 0.0399999999999963
80. 0.0399999999999963 123. 0.0424999999999962
81. 0.0424999999999961 124. 0.0449999999999960
82. 0.0449999999999960 125. 0.0474999999999960
83. 0.0474999999999959 126. 0.0499999999999959
84. 0.0499999999999959 127. 0
85. 0 128. 0.00249999999999976
86. 0.00249999999999976 129. 0.00499999999999951
87. 0.00499999999999952 130. 0.00749999999999927
88. 0.00749999999999928 131. 0.00999999999999903
89. 0.00999999999999903 132. 0.0124999999999988
90. 0.0124999999999988 133. 0.0149999999999985
91. 0.0149999999999985 134. 0.0174999999999983
92. 0.0174999999999983 135. 0.0199999999999981
93. 0.0199999999999980 136. 0.0224999999999978
94. 0.0224999999999978 137. 0.0249999999999976
95. 0.0249999999999976 138. 0.0274999999999973
96. 0.0274999999999973 139. 0.0299999999999971
97. 0.0299999999999971 140. 0.0324999999999969
98. 0.0324999999999969 141. 0.0349999999999967
99. 0.0349999999999967 142. 0.0374999999999965
100. 0.0374999999999965 143. 0.0399999999999963
101. 0.0399999999999963 144. 0.0424999999999962
102. 0.0424999999999961 145. 0.0449999999999960
103. 0.0449999999999960 146. 0.0474999999999960

Page | 24
147. 0.0499999999999960 190. 0
148. 0 191. 0.00249999999999975
149. 0.00249999999999976 192. 0.00499999999999951
150. 0.00499999999999951 193. 0.00749999999999927
151. 0.00749999999999927 194. 0.00999999999999902
152. 0.00999999999999903 195. 0.0124999999999988
153. 0.0124999999999988 196. 0.0149999999999986
154. 0.0149999999999986 197. 0.0174999999999983
155. 0.0174999999999983 198. 0.0199999999999981
156. 0.0199999999999981 199. 0.0224999999999978
157. 0.0224999999999978 200. 0.0249999999999976
158. 0.0249999999999976 201. 0.0274999999999973
159. 0.0274999999999974 202. 0.0299999999999971
160. 0.0299999999999971 203. 0.0324999999999969
161. 0.0324999999999969 204. 0.0349999999999967
162. 0.0349999999999967 205. 0.0374999999999965
163. 0.0374999999999965 206. 0.0399999999999963
164. 0.0399999999999963 207. 0.0424999999999962
165. 0.0424999999999962 208. 0.0449999999999961
166. 0.0449999999999960 209. 0.0474999999999960
167. 0.0474999999999960 210. 0.0499999999999961
168. 0.0499999999999960 211. 0
169. 0 212. 0.00249999999999975
170. 0.00249999999999976 213. 0.00499999999999951
171. 0.00499999999999951 214. 0.00749999999999926
172. 0.00749999999999927 215. 0.00999999999999902
173. 0.00999999999999903 216. 0.0124999999999988
174. 0.0124999999999988 217. 0.0149999999999986
175. 0.0149999999999986 218. 0.0174999999999983
176. 0.0174999999999983 219. 0.0199999999999981
177. 0.0199999999999981 220. 0.0224999999999978
178. 0.0224999999999978 221. 0.0249999999999976
179. 0.0249999999999976 222. 0.0274999999999973
180. 0.0274999999999973 223. 0.0299999999999971
181. 0.0299999999999971 224. 0.0324999999999969
182. 0.0324999999999969 225. 0.0349999999999967
183. 0.0349999999999967 226. 0.0374999999999965
184. 0.0374999999999965 227. 0.0399999999999963
185. 0.0399999999999963 228. 0.0424999999999962
186. 0.0424999999999962 229. 0.0449999999999961
187. 0.0449999999999961 230. 0.0474999999999961
188. 0.0474999999999960 231. 0.0499999999999961
189. 0.0499999999999960 232. 0

Page | 25
CHAPTER 8
ANSYS RESULTS

8.1 FINITE ELEMENT MESH (UNDEFORMED SHAPE)

Figure 8.1

Page | 26
8.2 DEFORMED SHAPE

Figure 8.2

Page | 27
8.3 NODAL DISPLACEMENT

Figure 8.3

8.4 DISPLACEMENT ON ANSYS

PRINT U NODAL SOLUTION PER NODE

***** POST1 NODAL DEGREE OF FREEDOM LISTING *****

LOAD STEP= 1 SUBSTEP= 1


TIME= 1.0000 LOAD CASE= 0

THE FOLLOWING DEGREE OF FREEDOM RESULTS ARE IN THE


GLOBAL COORDINATE SYSTEM

Page | 28
NODE UX NODE UX NODE UX
1 0.0000 42 0.10000E-01 83 0.18088E-01
2 0.50000E-01 43 0.75000E-02 84 0.20349E-01
3 0.25000E-02 44 0.50000E-02 85 0.22610E-01
4 0.50000E-02 45 0.25000E-02 86 0.24871E-01
5 0.75000E-02 46 -0.10380E-14 87 0.27132E-01
6 0.10000E-01 47 -0.93404E-15 88 0.29393E-01
7 0.12500E-01 48 -0.83191E-15 89 0.31654E-01
8 0.15000E-01 49 -0.73140E-15 90 0.33913E-01
9 0.17500E-01 50 -0.62797E-15 91 0.36161E-01
10 0.20000E-01 51 -0.52519E-15 92 0.38364E-01
11 0.22500E-01 52 -0.41720E-15 93 0.40445E-01
12 0.25000E-01 53 -0.30163E-15 94 0.42253E-01
13 0.27500E-01 54 -0.17011E-15 95 0.43468E-01
14 0.30000E-01 55 0.43450E-01 96 0.43477E-01
15 0.32500E-01 56 0.43450E-01 97 0.43468E-01
16 0.35000E-01 57 0.22610E-02 98 0.22213E-02
17 0.37500E-01 58 0.45220E-02 99 0.44427E-02
18 0.40000E-01 59 0.67830E-02 100 0.66640E-02
19 0.42500E-01 60 0.90440E-02 101 0.88853E-02
20 0.45000E-01 61 0.11305E-01 102 0.11107E-01
21 0.47500E-01 62 0.13566E-01 103 0.13328E-01
22 0.50000E-01 63 0.15827E-01 104 0.15549E-01
23 0.50000E-01 64 0.18088E-01 105 0.17771E-01
24 0.50000E-01 65 0.20349E-01 106 0.19992E-01
25 0.50000E-01 66 0.22610E-01 107 0.22213E-01
26 -0.11430E-14 67 0.24871E-01 108 0.24435E-01
27 0.47500E-01 68 0.27132E-01 109 0.26656E-01
28 0.45000E-01 69 0.29393E-01 110 0.28877E-01
29 0.42500E-01 70 0.31654E-01 111 0.31099E-01
30 0.40000E-01 71 0.33913E-01 112 0.33319E-01
31 0.37500E-01 72 0.36161E-01 113 0.35530E-01
32 0.35000E-01 73 0.38364E-01 114 0.37706E-01
33 0.32500E-01 74 0.40445E-01 115 0.39793E-01
34 0.30000E-01 75 0.42253E-01 116 0.41710E-01
35 0.27500E-01 76 0.22610E-02 117 0.22079E-02
36 0.25000E-01 77 0.45220E-02 118 0.44158E-02
37 0.22500E-01 78 0.67830E-02 119 0.66237E-02
38 0.20000E-01 79 0.90440E-02 120 0.88316E-02
39 0.17500E-01 80 0.11305E-01 121 0.11040E-01
40 0.15000E-01 81 0.13566E-01 122 0.13247E-01
41 0.12500E-01 82 0.15827E-01 123 0.15455E-01

Page | 29
124 0.17663E-01 163 0.11623E-01 202 0.47463E-01
125 0.19871E-01 164 0.13948E-01 203 0.43411E-01
126 0.22079E-01 165 0.16273E-01 204 0.45227E-01
127 0.24287E-01 166 0.18597E-01 205 0.41581E-01
128 0.26495E-01 167 0.20922E-01 206 0.43156E-01
129 0.28703E-01 168 0.23247E-01 207 0.39445E-01
130 0.30911E-01 169 0.25571E-01 208 0.40873E-01
131 0.33118E-01 170 0.27896E-01 209 0.37179E-01
132 0.35317E-01 171 0.30221E-01 210 0.38504E-01
133 0.37487E-01 172 0.32545E-01 211 0.34868E-01
134 0.39584E-01 173 0.34868E-01 212 0.36105E-01
135 0.41570E-01 174 0.37179E-01 213 0.32545E-01
136 0.22213E-02 175 0.39445E-01 214 0.33700E-01
137 0.44427E-02 176 0.41581E-01 215 0.30221E-01
138 0.66640E-02 177 0.43411E-01 216 0.31292E-01
139 0.88853E-02 178 0.24071E-02 217 0.27896E-01
140 0.11107E-01 179 0.48142E-02 218 0.28885E-01
141 0.13328E-01 180 0.72213E-02 219 0.25571E-01
142 0.15549E-01 181 0.96284E-02 220 0.26478E-01
143 0.17771E-01 182 0.12036E-01 221 0.23247E-01
144 0.19992E-01 183 0.14443E-01 222 0.24071E-01
145 0.22213E-01 184 0.16850E-01 223 0.20922E-01
146 0.24435E-01 185 0.19257E-01 224 0.21664E-01
147 0.26656E-01 186 0.21664E-01 225 0.18597E-01
148 0.28877E-01 187 0.24071E-01 226 0.19257E-01
149 0.31099E-01 188 0.26478E-01 227 0.16273E-01
150 0.33319E-01 189 0.28885E-01 228 0.16850E-01
151 0.35530E-01 190 0.31292E-01 229 0.13948E-01
152 0.37706E-01 191 0.33700E-01 230 0.14443E-01
153 0.39793E-01 192 0.36105E-01 231 0.11623E-01
154 0.41710E-01 193 0.38504E-01 232 0.12036E-01
155 0.46746E-01 194 0.40873E-01 233 0.92986E-02
156 0.44678E-01 195 0.43156E-01 234 0.96284E-02
157 0.46746E-01 196 0.45227E-01 235 0.69740E-02
158 0.44678E-01 197 0.45290E-01 236 0.72213E-02
159 0.23247E-02 198 0.47463E-01 237 0.46493E-02
160 0.46493E-02 199 0.45445E-01 238 0.48142E-02
161 0.69740E-02 200 0.47623E-01 239 0.23247E-02
162 0.92986E-02 201 0.45290E-01 240 0.24071E-02

MAXIMUM ABSOLUTE VALUES


NODE 22
VALUE 0.50000E-01

Page | 30
CHAPTER 9
COMPARISON OF RESULTS

Comparing displacement for first 20 nodes:

MATLAB ANSYS
Node (DOF) Displacement (Uxx) Node (DOF) Displacement (Uxx)
1 0 1 0.0000
2 0.00249999999999976 2 0.25000E-02
3 0.00499999999999952 3 0.50000E-02
4 0.00749999999999928 4 0.75000E-02
5 0.00999999999999903 5 0.10000E-01
6 0.0124999999999988 6 0.12500E-01
7 0.0149999999999985 7 0.15000E-01
8 0.0174999999999983 8 0.17500E-01
9 0.0199999999999980 9 0.20000E-01
10 0.0224999999999978 10 0.22500E-01
11 0.0249999999999976 11 0.25000E-01
12 0.0274999999999973 12 0.27500E-01
13 0.0299999999999971 13 0.30000E-01
14 0.0324999999999969 14 0.32500E-01
15 0.0349999999999967 15 0.35000E-01
16 0.0374999999999965 16 0.37500E-01
17 0.0399999999999962 17 0.40000E-01
18 0.0424999999999961 18 0.42500E-01
19 0.0449999999999960 19 0.45000E-01
20 0.0474999999999959 20 0.47500E-01

The displacement values in MATLAB and ANSYS are almost same.

Page | 31
CHAPTER 10
CONCLUSION

Thus we studied the thin plate in traction by MATLAB and ANSYS. Finite Element
method is one of the best method to study the deformation of thin plate. The behavior of
thin plate under plane stress is analyzed and evaluated. The results obtained from
MATLAB and ANSYS are almost similar.

Page | 32
CHAPTER 11
APPENDIX

7.1 MATLAB PROBLEM CODE


% clear memory
clear all;colordef white;clf

% materials
E = 10e7; poisson = 0.30;

% matriz C
C=E/(1-poisson^2)*[1 poisson 0;poisson 1 0;0 0 (1-poisson)/2];

% load
P = 1e6;

%Mesh generation
Lx=5;
Ly=1;
numberElementsX=20;
numberElementsY=10;
numberElements=numberElementsX*numberElementsY;
[nodeCoordinates, elementNodes] = ...
rectangularMesh(Lx,Ly,numberElementsX,numberElementsY);
xx=nodeCoordinates(:,1);
yy=nodeCoordinates(:,2);
drawingMesh(nodeCoordinates,elementNodes,'Q4','k-');
numberNodes=size(xx,1);

% GDof: global number of degrees of freedom


GDof=2*numberNodes;

% calculation of the system stiffness matrix


stiffness=formStiffness2D(GDof,numberElements,...
elementNodes,numberNodes,nodeCoordinates,C,1,1);

% boundary conditions
fixedNodeX=find(nodeCoordinates(:,1)==0); % fixed in XX
fixedNodeY=find(nodeCoordinates(:,2)==0); % fixed in YY
prescribedDof=[fixedNodeX; fixedNodeY+numberNodes];

% force vector (distributed load applied at


xx=Lx) force=zeros(GDof,1);

Page | 33
rightBord=find(nodeCoordinates(:,1)==Lx);
force(rightBord)=P*Ly/numberElementsY;
force(rightBord(1))=P*Ly/numberElementsY/2;
force(rightBord(end))=P*Ly/numberElementsY/2;

% solution
displacements=solution(GDof,prescribedDof,stiffness,force);

% displacements
disp('Displacements')
jj=1:GDof; format
f=[jj; displacements'];
fprintf('node U\n')
fprintf('%3d %12.8f\n',f)
UX=displacements(1:numberNodes);
UY=displacements(numberNodes+1:GDof);
scaleFactor=10;

% deformed shape figure


drawingField(nodeCoordinates+scaleFactor*[UX
UY],...
elementNodes,'Q4',UX);%U XX hold on
drawingMesh(nodeCoordinates+scaleFactor*[UX
UY],...
elementNodes,'Q4','k-');
drawingMesh(nodeCoordinates,elementNodes,'Q4','k--');
colorbar
title('U XX (on deformed shape)')
axis off

% stresses at nodes
stresses2D(GDof,numberElements,elementNodes,numberNodes,...
nodeCoordinates,displacements,UX,UY,C,scaleFactor)

7.2 CODE FOR FORM STIFFNESS 2D


function
[stiffness,mass]=formStiffness2D(GDof,numberElements,...
elementNodes,numberNodes,nodeCoordinates,C,rho,thickness)

% compute stiffness matrix (and mass matrix)


% for plane stress Q4 elements

stiffness=zeros(GDof);

Page | 34
mass=zeros(GDof);

% 2 by 2 quadrature
[gaussWeights,gaussLocations]=gaussQuadrature('complete');

for e=1:numberElements
indice=elementNodes(e,:);
elementDof=[ indice indice+numberNodes ];
ndof=length(indice);

% cycle for Gauss point


for q=1:size(gaussWeights,1)
GaussPoint=gaussLocations(q,:);
xi=GaussPoint(1);
eta=GaussPoint(2);

% shape functions and derivatives


[shapeFunction,naturalDerivatives]=shapeFunctionQ4(xi,eta)

% Jacobian matrix, inverse of Jacobian,


% derivatives w.r.t. x,y
[Jacob,invJacobian,XYderivatives]=...
Jacobian(nodeCoordinates(indice,:),naturalDerivatives);

% B matrix
B=zeros(3,2*ndof);
B(1,1:ndof) = XYderivatives(:,1)';
B(2,ndof+1:2*ndof) = XYderivatives(:,2)';
B(3,1:ndof) = XYderivatives(:,2)';
B(3,ndof+1:2*ndof) = XYderivatives(:,1)';

% stiffness matrix
stiffness(elementDof,elementDof)=...
stiffness(elementDof,elementDof)+...
B'*C*thickness*B*gaussWeights(q)*det(Jacob);
% mass matrix
mass(indice,indice)=mass(indice,indice)+...
shapeFunction*shapeFunction'*...
rho*thickness*gaussWeights(q)*det(Jacob);
mass(indice+numberNodes,indice+numberNodes)=...
mass(indice+numberNodes,indice+numberNodes)+...
shapeFunction*shapeFunction'*...
rho*thickness*gaussWeights(q)*det(Jacob);

end
end

Page | 35
7.3 CODE FOR SOLUTION
function
displacements=solution(GDof,prescribedDof,stiffness,force)
% function to find solution in terms of global
displacements activeDof=setdiff([1:GDof]', ...
[prescribedDof]);
U=stiffness(activeDof,activeDof)\force(activeDof);
displacements=zeros(GDof,1);
displacements(activeDof)=U;

7.4 CODE FOR STRESSES 2D


function stresses2D(GDof,numberElements,...
elementNodes,numberNodes,nodeCoordinates,...
displacements,UX,UY,C,scaleFactor)

% 2 by 2 quadrature
[gaussWeights,gaussLocations]=gaussQuadrature('complete');

% stresses at nodes
stress=zeros(numberElements,size(elementNodes,2),3);
stressPoints=[-1 -1;1 -1;1 1;-1 1];

for e=1:numberElements
indice=elementNodes(e,:);
elementDof=[ indice indice+numberNodes ];
nn=length(indice);
for q=1:size(gaussWeights,1)
pt=gaussLocations(q,:);
wt=gaussWeights(q);
xi=pt(1);
eta=pt(2);
% shape functions and derivatives
[shapeFunction,naturalDerivatives]=shapeFunctionQ4(xi,eta)

% Jacobian matrix, inverse of Jacobian,


% derivatives w.r.t. x,y
[Jacob,invJacobian,XYderivatives]=...
Jacobian(nodeCoordinates(indice,:),naturalDerivatives);

% B matrix
B=zeros(3,2*nn);
B(1,1:nn)= XYderivatives(:,1)';

Page | 36
B(2,nn+1:2*nn) = XYderivatives(:,2)';
B(3,1:nn) = XYderivatives(:,2)';
B(3,nn+1:2*nn) = XYderivatives(:,1)';

% element deformation
strain=B*displacements(elementDof);
stress(e,q,:)=C*strain;
end
end

% drawing stress fields


% on top of the deformed shape figure
drawingField(nodeCoordinates+scaleFactor*[UX
UY],...
elementNodes,'Q4',stress(:,:,1));%sigma XX hold
on drawingMesh(nodeCoordinates+scaleFactor*[UX
UY],...
elementNodes,'Q4','k-');
drawingMesh(nodeCoordinates,elementNodes,'Q4','k--');
colorbar
title('Sigma XX stress (on deformed shape)')
axis off

Page | 37
CHAPTER 12
REFERENCES

1) MATLAB Codes for Finite Element Analysis Solids and Structures, Vol. 157, A.J.M
Ferreira
2) MATLAB Programming with Applications for Engineers Stephen J. Chapman
3) Analysis of thin plates by the element-free Galerkin method - P. Krysl, T. Belytschko
4) www.mathworks.com/products/matlab/
5) ScienceDirect.com - http://www.sciencedirect.com/
6) Wikipedia http://www.wikipedia.com/

Page | 38

S-ar putea să vă placă și