2d model for steady state temperature distribution ... · pdf file2d model for steady state...

30
2D Model For Steady State Temperature Distribution Finite Element Method Vinh Nguyen University of Massachusetts Dartmouth December 14, 2010

Upload: builien

Post on 09-Feb-2018

249 views

Category:

Documents


0 download

TRANSCRIPT

2D Model For Steady State TemperatureDistribution

Finite Element Method

Vinh Nguyen

University of Massachusetts Dartmouth

December 14, 2010

Introduction

Advisor

Dr. Nima Rahbar: Civil Engineering

Project Objective

To learn the fundamentals of matrices and how to analyzethem.

To learn how to use Matlab and finite element method toconstruct a 2D computer model for temperature distribution.

Nguyen 2D Model For Temperature Distribution

What is finite element method?

Finite Element Method is:

A numerical method.

A very popular technique used in engineering over the last 10years.

Can be used to find the approximate solutions for complicatedproblems such as partial differential equations.

Nguyen 2D Model For Temperature Distribution

What is finite element method?-Example

Calculate the area A of the given geometry. ”A” can beArea,Temperature, Stress etc.

Nguyen 2D Model For Temperature Distribution

What is finite element method?-Example

Divide into smaller pieces (triangular, rectangular etc).

Assemble the pieces together.

Nguyen 2D Model For Temperature Distribution

Project Description

This project is a PDE problem (Laplace’s 2nd order equation):

δ2ϑ

δx2+δ2ϑ

δy2= 0, Ω = 0 < x < 5; 0 < y < 10 (1)

With boundary conditions:

ϑ(x , 0) = 0 0 < x < 5 (2)

ϑ(y , 0) = 0 0 < y < 10 (3)

ϑ(x , 10) = 100 sin(πx

10) 0 < x < 5 (4)

δϑ

δx(5, y) = 0 0 < y < 10 (5)

The Exact Solution is found to be:

ϑ(x , y) =100 sinh(πy

10 ) sin(πx10 )

sinh(π)(6)

Nguyen 2D Model For Temperature Distribution

Description-Using Finite Element Method

!

!

!

!

Divide the the plate intosmall pieces.

Assemble the piecestogether.

Nguyen 2D Model For Temperature Distribution

25 Nodes (32 Elements) — Finite Element vs. RealSolution

0 1 2 3 4 50

1

2

3

4

5

6

7

8

9

10Temperature Distribution

Horizontal Side

Vert

ical S

ide

45

50

55

60

65

70

75

80

85

90

Student Version of MATLAB

Nguyen 2D Model For Temperature Distribution

81 Nodes (128 Elements) — Finite Element vs. RealSolution

0 1 2 3 4 50

1

2

3

4

5

6

7

8

9

10Temperature Distribution

Horizontal side

Ve

rtic

al sid

e

70

75

80

85

90

Student Version of MATLAB

Nguyen 2D Model For Temperature Distribution

324 Nodes (512 Elements) — Plate vs. MatLab Solution

0 1 2 3 4 50

1

2

3

4

5

6

7

8

9

10Temperature Distribution

Horizontal side

Vert

ical sid

e

82

84

86

88

90

92

94

96

Student Version of MATLAB

Nguyen 2D Model For Temperature Distribution

Maximum Error Plot

0 1 2 3 4 50

1

2

3

4

5

6

732 elements

X!axis

Pe

rce

nta

ge

Err

or

0 1 2 3 4 50

0.5

1

1.5

2128 elements

X!axis

Pe

rce

nta

ge

Err

or

0 1 2 3 4 50

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45512 elements

X!axis

Pe

rce

nta

ge

Err

or

0 1 2 3 4 50

0.02

0.04

0.06

0.08

0.1

0.12

0.141682 elements

X!axis

Pe

rce

nta

ge

Err

or

Student Version of MATLAB

Nguyen 2D Model For Temperature Distribution

Temperature Distribution (Right Side)

ϑ(x , y) =100 sinh

(πy10

)sin

(πx10

)sinh(π)

0 1 2 3 4 5 6 7 8 9 100

10

20

30

40

50

60

70

80

90

100

Vertical Axis

Te

mp

era

ture

Student Version of MATLAB

Nguyen 2D Model For Temperature Distribution

Building The Mesh For Hole Defect Model

0 1 2 3 4 50

1

2

3

4

5

6

7

8

9

10Mesh

1 2 3 4 5

6 7 8 9 10

11 12 13 14

15 16 17 18 19

20 21 22 23 24

(1) (2) (3) (4)

(5) (6) (7) (8)

(9) (10)

(11) (12)

(13) (14)

(15) (16)

(17) (18) (19) (20)

(21) (22) (23) (24)

X!axis

Y!axis

Student Version of MATLAB

Nguyen 2D Model For Temperature Distribution

Defect Model vs. Original Model

0 1 2 3 4 50

1

2

3

4

5

6

7

8

9

10Temperature Distribution

X!axis

Y!

axis

55

60

65

70

75

80

85

90

95

Student Version of MATLAB

(a) Hole model

0 1 2 3 4 50

1

2

3

4

5

6

7

8

9

10Temperature Distribution

X!axis

Y!

axis

45

50

55

60

65

70

75

80

85

90

95

Student Version of MATLAB

(b) Original model

Figure 9: Matlab’s numerical results for the defected model and the original model from left to right (a), (b)

As in the figure we can see that heat is spreading further to the left at the top part and further down onthe right side of the plate with hole.

0.3.4 Matlab Code for Temperature Distribution of The Defected Model

The temperature distribution in this model is controlled by boundary conditions as below

%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!%% Boundary cond i t i on s %%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!%% pre s c r i b e d d i sp lacement ( e s s e n t i a l boundary cond i t i on )%% Idb ( i ,N)=1 i f the degree o f freedom i o f the node N i s p r e s c r i b e d% =0 otherw i s e%% 1) i n i t i a l i z e Idb to 0idb=zeros ( ndf , nnp ) ;% 2) enter the f l a g f o r p r e s c r i b e d d i sp lacement boundary cond i t i on sfor i = 1 : nxd

idb (1 , i )=1;end

for i = 1 : nxd : ( nyd"(nxd!1)+1)idb (1 , i )=1;

end

for i = nxd"(nyd!1)+1:nxd"( nyd )idb (1 , i )=1;

end

12

Nguyen 2D Model For Temperature Distribution

Right Side Temperature Distribution

0 1 2 3 4 5 6 7 8 9 100

10

20

30

40

50

60

70

80

90

100

Vertical Axis

Te

mp

era

ture

Student Version of MATLAB

Nguyen 2D Model For Temperature Distribution

Right Side Temperature Distribution

0 1 2 3 4 5 6 7 8 9 100

10

20

30

40

50

60

70

80

90

100

Vertical Axis

Tem

pera

ture

Square Plate

Original

Student Version of MATLAB

Nguyen 2D Model For Temperature Distribution

Current Project: Importing Mesh

Meshing with Matlab is very difficult for complex geometries.Use ABAQUS R© to sketch and mesh desired geometries.ABAQUS R© is a commercial engineering software for finiteelement analysis.After meshing with ABAQUS R©, the mesh is imported to theheat code to do analysis.

Nguyen 2D Model For Temperature Distribution

Current Project: Eclipse Hole Model

Sketch theplate

Create theplate

Mesh theplate

Nguyen 2D Model For Temperature Distribution

Importing The Mesh To Matlab

0 1 2 3 4 50

1

2

3

4

5

6

7

8

9

10Eclipse Hole Mesh

Horizontal Axis

Ve

rtic

al A

xis

Student Version of MATLAB

ABAQUS R© exports thenodes and connectivity ofelements as ipn.file.

The ipn file need be totranslated to .mat file tobe readable by Matlab.

After importing theelements and nodes to theheat code, the mesh isthen generated as shown.

Nguyen 2D Model For Temperature Distribution

Project Description

PDE problem (Laplace’s 2nd order equation):

δ2ϑ

δx2+δ2ϑ

δy2= 0, Ω = 0 < x < 5; 0 < y < 10 (7)

With boundary conditions:

ϑ(x , 0) = 0 (8)

ϑ(y , 0) = 0 (9)

ϑ(x , 10) = 100 sin(πx

10)(10)

δϑ

δx(5, y) = 0 (11)

δϑ

δx(Ellipse) = 0 (12)

Ellipse :(x − 2.5)2

1.5+

(y − 5)2

7.8= 1 (13)

Nguyen 2D Model For Temperature Distribution

0 1 2 3 4 50

1

2

3

4

5

6

7

8

9

10Temperature Distribution

X!Axis

Y!

Axis

3

3.5

4

4.5

5

Student Version of MATLAB

Nguyen 2D Model For Temperature Distribution

Right Side Temperature Distribution

0 1 2 3 4 5 6 7 8 9 100

10

20

30

40

50

60

70

80

90

100

Vertical Axis

Tem

pera

ture

Student Version of MATLAB

Nguyen 2D Model For Temperature Distribution

Right Side Temperature Trend

0 1 2 3 4 5 6 7 8 9 100

10

20

30

40

50

60

70

80

90

100

Vertical Axis

Tem

pera

ture

square hole

Original

Eclipsehole

Student Version of MATLAB

Nguyen 2D Model For Temperature Distribution

My Code vs. ABAQUS

Abaqus

0 1 2 3 4 50

1

2

3

4

5

6

7

8

9

10Temperature Distribution

X!Axis

Y!

Axis

3

3.5

4

4.5

5

Student Version of MATLAB

My Code

Nguyen 2D Model For Temperature Distribution

My Code vs. ABAQUS

Abaqus Result

0 1 2 3 4 5 6 7 8 9 100

10

20

30

40

50

60

70

80

90

100

Vertical Axis

Tem

pera

ture

Student Version of MATLAB

My Code’s Result

Nguyen 2D Model For Temperature Distribution

Error Between Abaqua and Matlab

!"##$%

&'(#)%

*#+,#-'$.-#)/0)*"#)12("$)!23#)

4/3# 56)7/3#)1#8.9$ :--/-);<=

% 0 > >

? 4.34 @AB@ >A>?

B 9.43 CA@B >A>%

@ 16.12 %DA%% >A>E

F 24.51 ?@AF >A>B

D 34.2 B@A%G >A>F

E 44.12 @@A% >A>@

G 53.58 FBAFG >A>%

C 63.96 D@A>B >A%%

%> 78.36 EGA@B >A>C

%% 100 %>> >

HI'J.8)1#8.9$

Nguyen 2D Model For Temperature Distribution

Result with heat source or heat sink at the hole

0 1 2 3 4 50

1

2

3

4

5

6

7

8

9

10Temperature Distribution

X!Axis

Y!

Axis

3

3.5

4

4.5

5

Student Version of MATLAB

Temperature at hole U=25

0 1 2 3 4 50

1

2

3

4

5

6

7

8

9

10Temperature Distribution

X!Axis

Y!

Axis

3

3.5

4

4.5

5

Student Version of MATLAB

Temperature at holeU=100

Nguyen 2D Model For Temperature Distribution

Future Research

Goals

Continue to learn finite element method.

Do analysis with different materials of different thermalconductivities.

Nguyen 2D Model For Temperature Distribution

References

[Civil Engineering Dept] Dr. Nima RahbarFundamental Matrix AlgebraUniversity of Massachusetts Dartmouth, Summer 2010.

[Mechanical Engineering Dept] Dr.R. KrishnakumarIntroduction to Finite element Methodhttp: // www. youtube. com/ watch? v= djd9-f-onLs , June208Indian Institute of Technology, Madras

Questions?

????????????????????????????????????????????????????????????

Nguyen 2D Model For Temperature Distribution