Sei sulla pagina 1di 22

1

MANE 666
FUNDAMENTALS OF FINITE ELEMENT METHODS
TERM PROJECT REPORT


TITLE:
HEAT CONDUCTION IN 2D PLATE USING FINITE ELEMENT METHOD

Prof. Mark S. Shephard












SUBMITTED BY:
MOHIT TYAGI (661016969)
tyagim@rpi.edu


2

TABLE OF CONTENTS
List of Figures and Tables Page
I. Abstract 3
II. Problem Description 4
III. FEM Formulation 6
IV. Mesh generation 9
V. Mapping 11
VI. Numerical integration scheme used to approximate the integrals 13
VII. Outline of the code 15
VIII. Conclusion 20
IX. Reference 21
X. Appendix 22
XI. Results
XII. MATLAB code











3


ABSTRACT

This report deals with solving the heat condition problem in 2-D plate using finite element method. The
initial part of the reports provides an introduction to the problem. This report provides the basic theory
behind the development of the code. Later part of the report explains the structure of the MATLAB
coding. An attempt has been made to verify the preprocessing results. It also contains the post
processing results for few test cases and detailed MALAB code that has been developed to solve the 2D
heat conduction in rectangular plate using FEM.
4

PROBLEM DESCRIPTION:


Fig 1 :System Boundary Conditions
PROBLEM DESCRIPTION:
Present heat conduction problem involves a rectangular domain () as given in Fig 3. Temperature has
been prescribed on the boundaries AB and BC (
g
). Essential boundary condition on bottom edge AB is 0
C and on right edge is non-zero. Natural boundary condition (heat flux) has been prescribed on the
boundaries CD and DA (
h
). Material is isotropic and homogenous with thermal conductivity K. A
constant heat source in the domain () f is given.









5

The values of various parameters used in the problem have been summarized in the following table.

SYSTEM AND BOUNDARY CONDITIONS:
QUANTITY VALUE UNITS DESCRIPTION
K User input W/m*C Conductivity
L 1 m Length
W 1 m Width
T1 0 C Temperature boundary condition on AB
T2 User input C Temperature boundary condition BC
h1 User input W/m Prescribed heat flux DA
h2 User input W/m Prescribed heat flux CD
f User input W/m
2
Constant heat source

Table 1











6

FEM FORMULATION
CLASSICAL LINAER HEAT CONDUCTION STRONG AND WEAK FORMS
For a given domain and boundary such that that =
i
U, =
g

h
and
g

h
=, the formal
statement of the strong form of the boundary value problem is as follows
Given : , g:
g
and h, find u:
i
such that
q
i,i
= in (heat equation) Eq .1
u = g on
g
Eq .2
-
q
i
n
i
= h on
h
Eq. 3
The functions g and h are the prescribed boundary temperatures and heat fluxes respectively. Eq.1 is a
Dirichlet boundary condition and the Eq. 2 is Neumann boundary condition.
q
i
is temperature gradient given by the generalized Fourier Law:
q
i
= - K
ij
u
,j
Eq. 4
The conductivities K
ij
s for the problem in consideration which is isotropic case is K
ij
=K
ij
, where
ij
is
Kronecker delta.
Hence for two space dimension and the isotropic material, the thermal conductivity matrix may be
written as

ij
=K
1 0
0 1
| |
|
\
Eq.5
The weak formulation of the problem goes as follows
Given : , g:
g
and h, find u such that for all w
,
h
i i w q d wfd whd

= +

Eq.6
Substituting Eq.4 in Eq.5 we get
, ,
h
i ij j w k u d wfd whd

= +

Eq.7

7

Eq.7 may be written as
a(w,u)=(w,f)+(w,h)

Eq.8
where ;
a(w,u)= , , i ij j w k u d

Eq.9
(w,f)= wfd

Eq.10
(w,h)

=
h
whd

Eq.11

HEAT CONDUCTION: GALERKIN FORMULATION
Let
h
and
h
be the finite element approximation of and , respectively. Each member of the
h
admits the representation
h
u =
h
v +
h
g Eq.12
The Galerkin formulation id given as follows:
Given f , g and h , find
h
u =
h
v +
h
g
h
, such that for all
h
w
h

( , ) ( , ) ( , ) ( , )
h h h h h h
a w v w f w h a w g

= + Eq.13
Let = {1,2,.,
np
} be the set of global node numbers where
np
is the number of nodal points. Let
g
be the set on nodes that lies on the boundary on which essential boundary condition has been
prescribed (i.e temperature). The complement of
g
in , denotes by -
g
is the set of nodes on
which
h
u is to be determined. The numbers of in the set complement to
g
is equal to the number of
unknowns or the number of equation.
A typical member of
h
is assumed to have form
g
h
A A
A
w N c

=

Eq.14
where
A
N is the shape function associated with node A and
A
c is constant
8

Likewise since
h
v
h

g
h
A A
A
v N d

=

Eq.15
where
A
d is the unknown temperature at node A, and
g
h
A A
A
g N g

=

Eq.16

Substituting Eq.14 Eq.15 Eq.16 in Eq.13 gives
( , ) ( , ) ( , ) ( , )
g g
A B B A A A B B
B B
g
a N N d N f N h a N N g
A


= +


Eq.17

ELEMENT STIFFNESS MATRIX AND FORCE VECTOR
1
[ ]
{ }, 1 ,
node number a,b belongs to the set of A
( , ) ( ) ( )
1
is equal to g if the node number c belongs to do
e
en
e e
h
e e
ab
e e
a en
g
T
e e
ab a b a b
n
e e e
a a a ac c
b
en
e
c
K k
f f a b n
k a N N N k N d
f N f d N hd k g
c n
g

=

=
=

= =
= +


g and zero is otherwise.

Where
en
n is the number of element nodes.




9


MESH GENRATION OF 2D PLATE

Fig 2 : Discretization of the 2D plate

Domain of the problem is discretized into rectangular mesh with variable number of elements in x and y
direction.
1) = ,
gi hi
= and
gi hi
= for i=1,2 ( special dimension which is 2 for the 2D
problem)
2) Red nodes in Fig __ lies in the set
g
. The black nodes lie in the set complementary to
g
that is
set
g
. Total number of black nodes is equal to global degree of freedom and that is also equal
to the number of equations. Nodes in the set
g
will either have zero or non-zero essential
10

boundary condition. The nodes which have zero essential boundary condition have been assigned a
flag {null} and nodes in set
g
with non-zero essential boundary condition prescribed at it has been
assigned a flag{dog}.
The above idea can be summarized as follows:
node is :
if the node
if the node and g 0
if the node and g 0
gi
gi iA
gi iA
a
dof
dog
null



=

For the 2D heat conduction problem in the project, nodes on the bottom edge AB are flagged with null,
since the prescribed temperature at the bottom edge is 0. Nodes on the edge right edge BC are flagged
with dog since the prescribed essential boundary condition is non-zero on that edge. Rest all nodes (
black nodes) are flagged with dof.















11


MAPPING

A bilinear quadrilateral element has been used to map the element in the physical coordinate to natural
coordinate.


Fig 3: Bilinear quadrilateral element and the node numbering
Nodal shape function are given as follows
N
a
(, ) =
1
4
(1+
a
) (1+
a
) Eq.18
Where
a
and
a
are the nodal coordinates in natural coordinate system.
a
a

a

1 -1 -1
12

2 1 -1
3 1 1
4 -1 1
Table 2

Since the bilinear quadrilateral is isoparametric, we can write
1
( , )
en n
e e
a
x a
a
Q N x
=
=

Eq.19
1
( , )
en n
e e
a
y a
a
Q N y
=
=

Eq.20
Where
a
x and y
a
are the coordinates of the nodes of
e

Now, Jacobian is defined as
e
e
y
x
e
e
y
x
Q
Q
J
Q
Q


(

(

(
=
(

(
(

Eq.21
1 1
1, 2, 3, 4,
2 2
1, 2, 3, 4,
3 3
4 4
e e
e e
e e
e e
x y
x y N N N N
N N N N
x y
x y


(
(
(
(
=
(
(

(
(

Eq.22
Using Eq.12, Eq.13 and Eq.14 it turns out that Jacobian
0
1
0 2
e
x
e
y
L
L
J
(
(
(

= Eq.23
Where
e
x
L and
e
y
L element length in the x and y direction respectively (as shown in the figure_____)
13


Therefore determinant of Jacobian is
1
| |
4
J
e e
x y
L L =
of the element
4
e
Area
=















14

NUMERICAL INTEGRATION SCHEME USED TO APPROXIMATE
THE INTEGRALS
2D Gauss Quadrature rule has been used for numerical integration.

Fig 4: 2-D square domain
Let the function that is to be evaluated by the 2X2 Gauss Quadrature rule be ( , ) f , then
1 1
1 1
1
1
1
1 1
( , )
( , ) using 1D gauss quadrature to integrate along
( , ) using 1D gauss quadrature to integrate along
1
1 1
( , ) (
3 3
M
i i
i
M M
j i i j
j i
j i
I f d d
W f d
W W f
W W
f f




=

= =
=
| |

|
\

= =
= +

1 1 1 1 1 1
, ) ( , ) ( , )
3 3 3 3 3 3
f f + +
15

OUTLINE OF THE CODE

In the post processing section write about how you extracted the heat flux inside an element.
Following flow chart captures the essence of the FEM coding.















Fig 5: Flow Chart




START
READ INPUT DATA
SETUP LM ARRAY
CALCULATE GLOBAL
STIFFNESS MATRIX AND
FORCE VECTOR
SOLVE TO FIND TEMEPERATURE
DISTRIBUTION IN THE DOMAIN
POST PROCESSING
16


FEM coding for the current problem broadly can be classified in three parts.
Part1
It consists of taking input from the user about the geometry of the domain and the boundary conditions
and martial input life thermal conductivity and heat source term. This input data is then used to
generate mesh, to extract node information, element information, generating NTYPE matrix, destination
matrix and finally to set up LM array. Based on the LM array it is decided where the terms in the
element stiffness matrix will be used in the forming the global stiffness matrix.
Output of the MATLAB code FEMHeatCondution2D.m, for the following 3X3 mesh and shown boundary
conditions.

Fig: 6 3X3 mesh of the domain
Following are the output f NTYPE , ID and element information
1) Interpretation of NTYPE
First row gives the node number.
Second row gives information about the type of the node i.e the whether the node is dog, dof or null.
0->null, 1->dog, and 2 -> dof
Third row gives ID( Destination matrix)
17

2) Interpretation of ELNODES which matrix gives the element information
First row gives the element number.
All other rows give the nodes associated with that element.



Following is the output for LM array: location vectors for elements. The output can be inferred as
follows:
LM(:,:,a)-> a is the element number.
First row gives the types of nodes the element have i.e the whether a node is dof, dog or null.
Second row give the count of dof and dog. 0 in this row implies that the node is null.

18


19



So based on the output it can be concluded that the coding is properly setting up LM array.






20

PART2 (ASSEMBLY AND SOLVE)
This part involves calculation of elemental stiffness matrix and element load vector, and after that
assembling them to form global stiffness matrix and global load vector.
After assembling one gets a system of linear equation in the formKd f = , where K is global stiffness
matrix, d is the vector of unknowns and f is the global load vector.
PART3 ( POST PROCESSING)
This part involves analyzing the solution and extracting other useful information in the domain like
fluxes. The MATALB code FEMHeatCondution2D.m does the following post processing
1. It recovers nodal temperatures and plot the temperature field
2. Plot contours
3. Plot heat flux vector at the integration points.

CONCLUSION
The main objective of having the experience of FEM coding is achieved through the present
term project. The problem may include other type of the boundary condition like convective
boundary condition. This project helped to gain a first-hand experience of MATLAB coding. The
concepts learned to code a basic 2D heat conduction problem can be used to develop more
complicated physical problems. Overall the project has been an enriching experience as it gave
me a chance to apply the theory learned through lectures into the practice.







21

REFERENCES

1) T.J.R. Hughes, The Finite Element Method: Linear Static and Dynamic Finite Element
Analysis, Dover Pubns., ISBN 0486411818, 2000
2) Lecture notes.
3) http://www.theseus-fe.com/validation/validation_analytic.html#conductionRectangle


















22

APPENDIX
Following is the list of MATLAB code developed to solve the 2D heat conduction problem
1. FEMHeatConduction2D.m %This does Preprocessing, Solve and post processing
2. Kab.m % Calculate element stiffness matrix
3. SourceForce.m% Calculate contribution in Global load vector due to heat source
4. FluxForce.m %Calculate contribution in Global Load Vector due to natural boundary
condition.

Potrebbero piacerti anche