i the application of finite element method in 2d heat...

21
i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT DISTRIBUTION PROBLEMS FOR IRREGULAR GEOMETRY NOR HAFIZAH BINTI AHMAD KAILANI A thesis submitted in partial fulfillment of the requirements for the award of the degree of Master of Science (Mathematics) Faculty of Science Universiti Teknologi Malaysia JANUARY 2014

Upload: dinhmien

Post on 26-Aug-2019

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

i

THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT

DISTRIBUTION PROBLEMS FOR IRREGULAR GEOMETRY

NOR HAFIZAH BINTI AHMAD KAILANI

A thesis submitted in partial fulfillment of the

requirements for the award of the degree of

Master of Science (Mathematics)

Faculty of Science

Universiti Teknologi Malaysia

JANUARY 2014

Page 2: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

iii

To my beloved father and mother,

Ahmad Kailani bin Kosnin

Re’ha binti Junit

To my supervisor,

Dr. Yeak Su Hoe

And also to all my friends.

Thank you for your love, support and guidance.

Page 3: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

iv

ACKNOWLEDGEMENTS

In The Name of ALLAH, The Most Beneficent, The Most Merciful, all praise

is only to ALLAH, The Lord of Everything, who gives me strength and patience to

finish up my thesis on time.

First and foremost, I would like express my deepest gratitude to my

supervisor, Dr Yeak Su Hoe, for his guidance and support throughout the preparation

of this thesis. His advice is so much appreciated.

Next, I would like to thank my parents, Ahmad Kailani bin Kosnin and Re’ha

binti Junit for their endless support.

Lastly, a special thanks to my friends that have been helping me from the

beginning until the end of this thesis.

Page 4: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

v

ABSTRACT

In mathematics, the finite element method (FEM) is a numerical technique

for finding approximate solutions of boundary value problems from differential

equations. The term ‘finite element’ stems from the procedure in which a structure is

divided into small but finite size elements. FEM is very useful for problems with

complicated geometries, loadings, and material properties where analytical solutions

cannot be obtained. In this research, simple irregular problem is used as an example

of industry problems to be solved using FEM and finite difference method (FDM).

Matlab programming is used as a calculation medium for both FEM and FDM

methods respectively. Since the results of the problem for both methods converge, it

also proves that the results are valid. Hence we can conclude that simple irregular

problem can be solved using FEM and FDM. From this research, we also discovered

that FEM produces more stable and consistent result compared to FDM for the

solution of simple irregular problem and the results are presented in graphs.

Page 5: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

vi

ABSTRAK

Dalam matematik, kaedah unsur terhingga adalah kaedah berangka bagi

mencari penyelesaian anggaran untuk masalah nilai sempadan untuk persamaan

pembezaan. Istilah 'Unsur terhingga' berpunca daripada prosedur di mana struktur

yang dibahagikan kepada unsur-unsur bersaiz kecil tetapi terhingga. Kaedah unsur

terhingga amat berguna untuk masalah berkaitan dengan geometri yang rumit, beban,

dan sifat bahan di mana penyelesaian analisis tidak boleh diperolehi. Dalam kajian

ini, masalah geometri tidak sekata untuk dua dimensi taburan haba dipilih sebagai

satu contoh masalah industri yang perlu diselesaikan menggunakan kaedah unsur

terhingga dan kaedah perbezaan terhingga. Pengaturcaraan Matlab digunakan

sebagai medium pengiraan bagi kedua-dua kaedah tersebut. Disebabkan hasil yang

didapati daripada pelaksanaan masalah geometri tidak sekata menggunakan kaedah

unsur terhingga dan kaedah perbezaan terhingga menumpu , ia juga membuktikan

bahawa hasil yang diperolehi adalah betul. Oleh itu, boleh disimpulkan bahawa

masalah geometri tidak sekata boleh diselesaikan menggunakan kaedah unsur

terhingga dan kaedah perbezaan terhingga Melalui kajian ini, kaedah unsur

terhingga didapati dapat menghasilkan jawapan yang lebih stabil dan konsisten jika

dibandingkan dengan kaedah perbezaan terhingga dan semua hasil yang didapati

dipersembahkan di dalam graf.

Page 6: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

vii

CONTENTS

CHAPTER TITLE PAGE

DECLARATION ii

DEDICATION iii

ACKNOWLEDGEMENT iv

ABSTRACT v

ABSTRAK vi

CONTENTS vii

LIST OF TABLES x

LIST OF FIGURES xi

LIST OF SYMBOLS xiv

LIST OF APPENDICES xv

1 INTRODUCTION 1

1.0 Background of Study 1

1.1 Problem Statement 2

1.2 Objectives of Study 3

1.3 Scope of Study 4

Page 7: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

viii

1.4 Significance of Study 4

1.5 Organization of Research 5

2 LITERATURE REVIEW 6

2.0 Introduction 6

2.1 The Application of FDM for Heat Distribution 6

Problems

2.2 The Application of FEM for Heat Distribution 9

Problems

2.2.1 Galerkin Approach for 2D Heat 9

Conduction

2.3 A Cartesian Grid Finite-Difference Method 14

for 2D Incompressible Viscous Flows in Irregular

Geometries

2.3.1 Finite Difference Approximation on 15

Non-Uniform Meshes

3 MATHEMATICAL FORMULATION 18

3.0 Introduction 18

3.1 Finite Element Method (FEM) and Finite 18

Difference Method (FDM)

3.2 2D Regular Geometry Heat Distribution Problem 19

3.2.1 Solve 2D Regular Geometry Heat 20

Distribution Problem using FEM

3.3 2D Simple Irregular Geometry Heat Distribution 22

Problem

Page 8: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

ix

3.3.1 Solve 2D Simple Irregular Geometry Heat 24

Problem using FDM

3.3.2 Solve 2D Simple Irregular Geometry Heat 28

Distribution Problem using FEM

4 NUMERICAL RESULT AND DISCUSSION 36

4.0 Introduction 36

4.1 Numerical result for Regular Geometry Heat 36

Distribution Problem using FEM

4.2 Numerical results for Simple Irregular Geometry 39

Heat Distribution Problem using FDM

4.3 Numerical results for Simple Irregular Geometry 42

Heat Distribution Problem using FEM

4.4 The Comparison between FDM and FEM for 44

Solving 2D Simple Irregular Geometry Heat

Distribution Problem

5 CONCLUSION AND RECOMMENDATIONS 46

5.0 Introduction 46

5.1 Conclusion 46

5.2 Recommendations 47

REFERENCES 48

APPENDIX 50

Page 9: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

x

LIST OF TABLE

TABLE TITLE PAGE

3.1 Overview of FDM and FEM 19

3.2 Linear triangular element for regular 22

geometry problem

3.3 Linear triangular element for simple 32

irregular geometry problem

4.1 The temperature distribution for 2D 44

simple irregular geometry heat distribution

problem using FEM and FDM

4.2 The temperature values at (0.5, 0.5) for FDM 45

and FEM Solution

4.3 The temperature values at (0.5, 1.5) for FDM 45

and FEM Solution

Page 10: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

xi

LIST OF FIGURES

FIGURE TITLE PAGE

2.1 Calculation molecule for Laplace equation 9

2.2 The example of 2D heat distribution problem 11

2.3 (a) Generic 2D domain and (b) Illustration of grid 15

generation by ray tracing (b)

2.4 Main points (circles), and resulting non-uniform 15

grid

2.5 Non uniform grid with nx + 1 grid points 16

distribute arbitrarily

2.6 (a) and (b) Fictitious grid points in a domain with 17

concave boundary sections. (c) Final

non-structured grid (squares)

3.1 2D regular geometry heat distribution problem 19

3.2 Generation of nodes and elements for regular 21

geometry problem using FEM

3.3 2D simple irregular geometry heat distribution 23

problem

3.4 Flow chart of finite difference method 24

Page 11: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

xii

3.5 Node generation for simple irregular problem 25

using FDM

3.6 Boundary conditions for simple irregular 27

problem

3.7 Flow chart of finite element method 29

3.8 Geometry and boundary conditions for simple 30

irregular problem using FEM

3.9 Node generation for simple irregular problem 30

using FEM

3.10 Element generation for simple irregular problem 31

using FEM

4.1 Heat distribution for regular geometry problem 37

using FEM

4.2 Error in the result for the implementation of 38

regular geometry problem using FEM (nsize=2)

4.3 Error in the result for the implementation of 38

regular geometry problem using FEM (nsize=4)

4.4 Error in the result for the implementation of 39

regular geometry problem using FEM (nsize=8)

4.5 Heat distribution for simple irregular geometry 40

problem using FDM (nsize=2)

4.6 Heat distribution for simple irregular geometry 41

problem using FDM (nsize=4)

4.7 Heat distribution for simple irregular geometry 41

problem using FDM (nsize=8)

4.8 Heat distribution for simple irregular geometry 42

problem using FEM (nsize=2)

Page 12: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

xiii

4.9 Heat distribution for simple irregular geometry 43

problem using FEM (nsize=4)

4.10 Heat distribution for simple irregular geometry 43

problem using FEM (nsize=8)

Page 13: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

xiv

LIST OF SYMBOLS

- delta

T - global virtual temperature vector

eT - displacement vector

eK - the stiffness matrix

eF - load vector

Q - heat generation

iE - truncation error

- pi

n - normal flux

T - temperature

Ae - area of the element

det(J) - determinant of Matrix J

ST - specified temperature

Sq - specified heat flux

Sc - convection

Page 14: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

xv

LIST OF APPENDICES

APPENDICES TITLE PAGE

A Matlab coding for 2D regular geometry 50

heat distribution problem

Page 15: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

1

CHAPTER 1

INTRODUCTION

1.0 Background of Study

The finite element method (FEM) is a computational or numerical technique

which gives approximate solutions of boundary value problem arising normally in

physics and engineering (Pepper and Heinrich, 1992). Chao and Chow (2002) stated

that the fundamental idea of FEM is to discretise the domain into several

subdomains, or finite elements. These elements can be irregular and possess different

properties so that they form a basis to discretise complex structures, or structures

with mixed material properties.

Further, they can accurately model the domain boundary regardless of its

shape. Boundary value problems, sometimes called as field problems is a

mathematical problem in which one or more dependent variables must satisfy

specific conditions on the boundary of domain and satisfy a differential equation

everywhere within a known domain independent variables. The examples of field

variables are physical displacement, temperature, heat flux and fluid velocity

depending on the type of physical problem being analysed. FEM cuts a structure into

several elements (pieces of the structure) then reconnects elements at “nodes” as if

nodes were pins or drops of glue that hold elements together. This process results in

Page 16: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

2

a set of simultaneous algebraic equations. According to Hutton (2004), the term

finite element was first coined by Clough in 1960. In the early 1960s, and engineers

used the method for approximate solutions of problems in stress analysis, fluid flow,

heat transfer, and other areas.

Apart from FEM, Finite difference method (FDM) is a common numerical

method for the solution of partial differential equations (PDEs) and ordinary

differential equation (ODEs). FDM involves discretization of the spatial domain, the

differential equation, and boundary conditions, and a subsequent solution of a large

system of linear equations for the approximate solution values in the nodes of the

numerical mesh.

In FDM one starts with the differential formulation and by a process of

discretization transforms the problem into a system of interlinked simultaneous

algebraic equations that then must be solved in order to determine an approximation

to the desired solution. Discretization consists of first introducing a mesh of nodes by

subdividing the solution domain into a finite number of sub domains and then

approximating the derivatives in the boundary value problem by means of

appropriate finite difference ratios which can be obtained from a truncated Taylor

series expansion. As a result, system of interlinked simultaneous algebraic equations

is obtained that then must be solved in order to determine an approximation to the

desired solution (Reimer and Cheviakov, 2012).

For comparing the two methods, FEM actually models the differential

equations and uses numerical integration to get the solution at discrete points while

the FDM models the differential equation using finite difference formulas derive

from truncated Taylor series expansion.

1.1 Problem Statement

Page 17: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

3

A numerical method is a technique for obtaining approximate solutions of

many types of engineering problems. The need for numerical methods arises from

the fact that for most practical engineering problems their analytical solutions do not

exist. While the governing equations and boundary conditions can usually be written

for these problems, difficulties introduced by either irregular geometry or other

discontinuities are difficult to be solved analytically. FEM and FDM are the

examples of numerical methods that can be used to solve this kind of problems.

Though FDM is easier to compute as well as to code, some problems that involved

complex geometry is either difficult or completely cannot be solved by FDM.

Generally FDM is a simple method to use for common problems defined on regular

geometries, such as an interval in one dimension (1D), a rectangular domain in two

dimensions (2D), and a cubic in three dimensions (3D). Meanwhile FEM is a

complex method but it can be used to solve complex geometry problems. That is why

FEM is essential for industrial problem computational purposes. Hence for this

research, our aim is to solve 2D simple irregular geometry heat distribution problems

using FEM and FDM and compare the result for both methods.

1.2 Objectives of Study

The objectives of this study are:

(I) To implement FEM and FDM for heat distribution problems.

(II) To develop the coding for 2D regular geometry heat distribution problem

using FEM and 2D simple irregular geometry heat distribution problem using

FEM and FDM in Matlab programming.

(III) To compare the results of FEM and FDM on 2D simple irregular geometry

heat distribution problems.

Page 18: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

4

1.3 Scope of Study

This study will emphasize on the fundamental theory of FEM and FDM and

its application towards the solution for heat distribution problems especially for

irregular geometry case and the implementation through Matlab. The Matlab coding

is developed based on Laplace equation for irregular geometries using FDM whereas

Galerkin method is used for solution related to FEM. The solution for FDM and

FEM approaches ultimately end up with having system of linear equations. System

of linear equation can be solved using many methods such as Gauss elimination

method, LU decomposition method, QR decomposition method and Jacobi method.

However, in this research we used Jacobi method since the method is an iterative

method that first generates inexact results and subsequently refines its results at each

iteration, with the residuals converging at an exponential rate giving values that are

correct to specified accuracy (Fraser, 2008).

1.4 Significance of Study

This research benefits the student which gives them a better understanding

about the application of FDM and FEM in preparing them to solve the real world of

engineering problems. Other than that, this study will help engineers to solve many

industrial practical problems particularly involved complicated domains. For

instance, in a frontal crash simulation it is possible to increase prediction accuracy in

important areas like the front of the car and reduce it in its rear (thus reducing cost of

the simulation). This application can be extended to soil mechanics, heat transfer,

fluid flow, magnetic field calculations, and other areas. The introduction of the

digital computer has made possible the solution of the large-order systems of

equations.

Page 19: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

5

1.5 Organization of Research

There are five chapters in this research. In Chapter 1, we will discuss about

the introduction of this research, problem statement, objective, scope and

significance of the research. Next, we will present the literature review regarding

FDM and FEM in Chapter 2. After that, we will introduce the mathematical

formulation of the problem and explain theoretically the steps for the solution of the

problems using FDM and FEM in Chapter 3. Then, in chapter 4 we will present the

numerical results for FDM and FEM obtained from Matlab and discuss the results.

Finally, in Chapter 5, we conclude our research and present some suggestions for

future research.

Page 20: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

48

REFERENCES

Pepper, D. W. and Heinrich, J. C. (1992). The Finite Element Method Basic

Concepts and Applications. Hemisphere Publishing Corporation.

Chao, T. Y. and Chow, W. K. (2002). A Review on The Applications of Finite

Element Method to Heat Transfer and Fluid Flow. International Journal on

Architectural Science. 3(1), 1-19.

Hutton, D. V. (2004). Fundamentals of Finite Element Analysis. New York: The

McGraw-Hill Companies.

Reimer, A. S and Cheviakov, A. F. (2012). A Matlab-Based Finite Difference

Solver for the Poisson Problem with Mixed Dirichlet-Neumann Boundary

Conditions. Department of Mathematics and Statistics. University of Saskatchewan.

Fraser, W. R. (2008). Gaussian Elimination vs. Jacobi Iteration. Project Report.

MCS 471. UIC.

Smith, G. D. (1985). Numerical Solution of Partial Differential Equations: Finite

Difference Methods. 3rd

edition. United states: Oxford University Press. 15-28.

Cailletaud. G and E. S. Arem (2003). Introduction to Finite Element Method. Centre

de Materiaux. Paris.

Rojas, E. S., Casanova, J. O., Pino, C. D. and Feria, R. F. (2004). A Cartesian Grid

Finite-Difference Method for 2D Incompressible Viscous Flows in Irregular

Geometries. Journal of Computational Physics. 2(1), 302–318.

Calhoun, D. and LeVeque, R. J. (2000). An Cartesian Grid Finite-Volume Method

for The Advection–Diffusion Equation in Irregular geometries. J.

Comput. Phys.143–180.

Page 21: i THE APPLICATION OF FINITE ELEMENT METHOD IN 2D HEAT ...eprints.utm.my/id/eprint/48636/1/NorHafizahAhmadKailaniMFS2014.pdfDalam matematik, kaedah unsur terhingga adalah kaedah berangka

49

Turkel, E. (1986). Accuracy of Schemes with Nonuniform Meshes for Compressible

Fluid-Flows. J. Appl. Numer. Math. 529–550.

Briggs and William, L. (1987). Numerical Recipes. 2nd

edition. Philadelphia: A

Multigrid Tutorial.

Anis Zafirah (2010), Finite Element Solution of Heat Conduction Problem. Thesis

Master. Utm.

Dixit, S. U. (2004). Finite Element Method: An Introduction. Department of

Mechanical Engineering, Indian Institute of Technology Guwahati. India. 781- 039.

Peir’o, J. and Sherwin, S. (2010). Finite Difference, Finite Element and Finite

Volume Methods for Partial Difference Equations. Department of Aeronautics,

Imperial College. London. UK.

Larson, G. M. and Bengzon, F. (2010). The Finite Element Method: Theory,

Implementation, and Practice. Springer.

Subramanian ,S. J. (2009). Introduction to Finite Element Method. Department of

Engineering Design. Indian Institute of Technology. Madras.

Bokil, V. A. and Gibson, N. L. (2007). Finite Difference, Finite Element and Finite

Volume Methods for the Numerical Solution of PDEs. Department of Mathematics.

Oregan State University Corvallis. OR.

Roylance, D. (2001). Finite Element Analysis. Department of Materials Science and

Engineering. Massachusetts Institute of Technology. Cambridge.