28
Galerkin’s Method for Differential Equation d 2 y dx 2 + B y + Q= 0 C onsidera D E A W ithainitialboundaryconditiondy/dx= y= 0 atx=0 1 2 3 4 5 y 1 y 2 y 3 y 4 y 5 1 2 y 1 y 2 L IfwehaveaexactsolutionthenRHS ofequationIwillbezero In the FEM schem e we assum e a displacem entfunction fory which isapproxim ate y=a 1 + a 2 x or {y }= [ N 1 N 2 ] y 1 y 2 Since y isapproximate,RHS willnotbezero,itwillhavesomeerrororresidue d 2 y dx 2 + B y + Q= R A In order to make the the residue a minimum at least at few selected nodal points, we use orthogonality condition f i f j =0 f i = [N ] T f j=R and (I) 1 2 w here x x N 1 , N= L L

Galerkin’s Method for Differential Equation

  • Upload
    yaron

  • View
    77

  • Download
    6

Embed Size (px)

DESCRIPTION

Galerkin’s Method for Differential Equation. (I). In order to make the the residue a minimum at least at few selected nodal points, we use orthogonality condition. (II). Integrating the first term of equation II. Equation II becomes. - PowerPoint PPT Presentation

Citation preview

Page 1: Galerkin’s Method for Differential Equation

Galerkin’s Method for Differential Equation

d 2y

dx2+ B y + Q =0

Consider a DE

A

With a initial boundary condition dy/dx = y = 0 at x =0

1 2 3 4 5

y1 y2 y3 y4 y5

1 2

y1 y2L

If we have a exact solution then RHS of equation I will be zeroIn the FEM scheme we assume a displacement function for ywhich is approximate

y = a1 + a2 x

or { y } = [ N1 N2 ]y1y2

Since y is approximate, RHS will not be zero, it will have some error or residue

d 2y

dx2 + B y + Q =RA

In order to make the the residue a minimum at least at few selected nodal points, we use orthogonality condition fi fj = 0

fi = [ N ]T fj = Rand

(I)

1 2

where

x xN 1 , N =

L L

Page 2: Galerkin’s Method for Differential Equation

d 2 y

d x 2+ B y + QA[ N ]T dx = o

= 0[ N ]T R dx

(II)

Taking u = , du = , dv = , v =[ N ]T[ N ]Tddx

ddx

ddx

y ddx

y

Integrating the first term of equation II

[ N ]Tddx

ddx

[ N ]T ydx

0

L

[ N ]Td y

d xd 2 y

d x 2A = Adx A

[ N ]TB dxyddx

ddx

[ N ]T ydx

0

L

[ N ]Td y

d xA A [ N ]TQ dx = 0

0

L

0

L

0

L

Equation II becomes

Page 3: Galerkin’s Method for Differential Equation

y1y2

{ y } = [ N1 N2 ] , N1 = ( 1 - x/L) N2 = x/L

ddx

ddx

[ N ]T y y1y2

-1

1

1L

= , 1L

= { -1 1 }

The first term is based on initial boundary conditions. For the given problem dy/dx is known only at x = o, and at subsequent points at x = l, 2L …. is not known and hence subsequent terms are ignored.

AN1

N20

Ld y

d xA

-1

1

1L

{ -1 1 } dx1L

y1y2

B1 - x/L

x/L

{ (1 - x/L) (x/L) } dx

1 - x/L

x/LQ dx = 0

0

L

0

L

0

L

y1y2

A

0

d y

d xA

L

-1

12

QLy1y2

B L

6

1

0

1

-1

1

2

2

1

y1y2

1

1

= 0

A

L

-1

12

QLy1y2

B L

6

1

-1

1

2

2

1

y1y2

1

1

= 0

For Element 1

For subsequent elements

Page 4: Galerkin’s Method for Differential Equation

A

0

d y

d x

1

0

0

0

A

L

-1

2

-1

y1

y2

y3

y4

1

-1 -1

2

-1

-1

1

2QLB L

6

1

2

2

1

For 3 Element assembyy1

y2

y3

y4

1

4

1

2

1 1

4

1

1

2

Using the conditions dy/dx = y1 = 0 and solving the system of equations, y2, y3, and y4 can be solved

Page 5: Galerkin’s Method for Differential Equation

Heat & Mass Transfer

Page 6: Galerkin’s Method for Differential Equation

• Basic DE for one dimesion

in generate outE E U E

-Change in stored energyU

-Energy generated(source or sink) inside the control volumegeneratedE

-Energy output from control volumeoutE

xq x dxq

x dx x dx

Q

S1S2

S3 (area around the perimeter)

Heat & Mass Transfer

Page 7: Galerkin’s Method for Differential Equation

- heat conducted(heat influx) into the control volume at surface edge x (kW/m2 or Btu/h-ft2)

xq

- heat conducted out of control volume at surface edge x+dxx dxq

-the internal heat source(heat generated/unit volume) or a sink (heat drawn out of volume) (kW/m3 or Btu/h-ft3)

Q

-Area of control volume surfaceA

x x dxq Adt QAdx dt U q Adt

From Fourier’s law of heat conduction

x xx

dTq k

dx

-thermal conductivity in x direction xxk

-temperature; T - Temperature gradientdT

dx

Page 8: Galerkin’s Method for Differential Equation

Using Taylor expansion:

The change in stored energy:

Specificheat×mass×change in temperature U

c -specific heat in kWh/kg

......x dx x

dff f dx

dx

| [ ( ) ]x dx xx x dx xx xx

dT dT d dTq k k k dx

dx dx dx dx

( )U c Adx dT

( ) [ ( ) ]xx xx xx

dT dT d dTk Adt QAdx dt c Adx dT k k dx Adtdx dx dx dx

Page 9: Galerkin’s Method for Differential Equation

For steady state condition:

For 2 dimension case:

0T

t

( ) 0xx

d dTk Q

dx dx

2

20xx

d Tk Qdx

( ) ( ) 0xx yy

T Tk k Q

x x y y

xq x dxq

yq

y dyq

Q

Simplify the equation:

( )xx

d dT Tk Q c

dx dx t

Page 10: Galerkin’s Method for Differential Equation

Boundary Conditions

Page 11: Galerkin’s Method for Differential Equation

Heat transfer with conduction

For a conducting solid in contact with fluid, there will be a heat transfer between solid and fluid.

in generate out transferE E U E E

( )xx x dx h

dTk Adt QAdx dt c Adx dT q Adt q Pdxdtdx

Heat flow by convection: ( )hq h T T h -Heat transfer or convection coeffient

T -Temperature of solid surfaceT -Temperature of liquid

( ) ( )xx

T T hPk Q c T T

x x t A

Page 12: Galerkin’s Method for Differential Equation

One dimensional Problem

11 1 2 2 1 2

2

( ) [ ]t

T x N t N t N Nt

1 21t 2tL

x

1 21 ,

where

x xN N

L LThe temperature gradient matrix

g{ } { } [ ][ ]

dTg B t

dx

1 2 1[ ] [ ] [ 1 1]

dN dNB

dx dx L

The heat flux/temperature gradient relationship is given by

[ ]{ }xq D g [ ] [ ]xxwhere D k

Page 13: Galerkin’s Method for Differential Equation

Casting the governing DE into integral form using Galcerkin approach.

( ) 0 Txx

v

d dT dTN k Q c dv I

dx dx dt

0 can be written (using integration by parts u dv = uv )

( ) [ ] [ ]

L

TT T

xx

v v s

The first term vdu

d dT dN dT dTN k dv D dv N D dxds

dx dx dx dx dx

equation I becomes

[ ] [ ] 0 T

T T T

v v v s

The

dN dT dT dTD dv N Qdv N c dv N D dxds

dx dx dt dx

The last integrand [ ] T

s

dTN D dxds

dxcan be written as

2 3

2 3( ) T T

s s

N qdS N h T T dS

Page 14: Galerkin’s Method for Differential Equation

[ ] T

T T

v v v

dN dT dTI D dv N Qdv N c dv

dx dx dt

2 3 3

2 3 3 0 T T T

s s s

N qdS N hTdS N hT dS

3 3

3 3{ } [ ]{ } { } T T T

v s s

B DB dv t N h N t dS cN N t dS

3 2

3 2 T T T

s v s

N hT dS N Qdv N qdS

Page 15: Galerkin’s Method for Differential Equation

1 1 1

2 2 2

1 1 2 1 2 1

1 1 1 2 1 26 6

xxt t tAk hPL cA

t t tL

1 1 1

1 1 12 2 2

hT PL QAL qPL

t1t2

{T} = [ N1 N2 ] N1 = ( 1 - x/L)

N2 = x/L

ddx

[ N ]T -1

1

1L

= ,BT=dx

1L

= { -1 1 }t1t2

dT,,

In case the surface S2 convects heat in addition to heat flux, additional boundaryCondition is required for the last element

2

00 0( )

0 1

iT

jjs

TN h T T hA

T hAT

1 1 1

2 2 2

1 1 2 1 2 1 0 0

1 1 1 2 1 2 0 16 6

ixx

j

Tt t tAk hPL cAhA

Tt t tL

01 1 1

1 1 12 2 2

hT PL QAL qPL

hAT

For the last element

Page 16: Galerkin’s Method for Differential Equation
Page 17: Galerkin’s Method for Differential Equation
Page 18: Galerkin’s Method for Differential Equation
Page 19: Galerkin’s Method for Differential Equation
Page 20: Galerkin’s Method for Differential Equation
Page 21: Galerkin’s Method for Differential Equation
Page 22: Galerkin’s Method for Differential Equation
Page 23: Galerkin’s Method for Differential Equation

Structural vs Heat Transfer

Structural Analysis Thermal Analysis

•Assume displacement function

•Stress/strain relationships

•Derive element stiffness

•Assemble element equations

•Solve nodal displacements

•Solve element forces

•Select element type

•Assume temperature function

•Temperature relationships

•Derive element conduction

•Assemble element equations

•Solve nodal temperatures

•Solve element gradient/flux

•Select element type

Page 24: Galerkin’s Method for Differential Equation

Finite Element 2-D ConductionAssume (Choose) a Temperature Function

3 Nodes 1 Element

2 DOF: x, y

Assume a linear temperature function for each element as:

3

2

1

321

321

y x 1

),(

a

a

a

yaxaa

yaxaayxt

where u and v describe temperature gradients at (xi,yi).

Page 25: Galerkin’s Method for Differential Equation

Finite Element 2-D ConductionAssume (Choose) a Temperature Function

re temperatunodalt

function shapeN

function etemperaturT

m

j

i

mji

mmjjii

t

t

t

NNNT

tNtNtNT

Page 26: Galerkin’s Method for Differential Equation

Finite Element 2-D ConductionDefine Temperature Gradient Relationships

ji mi

jji m

m

i j m

i j m

NT N N t x x x x

g tT NN N

ty y y y

β β β1B N

γ γ γx 2A

Analogous to strain matrix: {g}=[B]{t}

[B] is derivative of [N]

gDgq

q

y

x

yy

xx

K 0

0 K

:Gradient ratureflux/TempeHeat

Page 27: Galerkin’s Method for Differential Equation

Derive Element Conduction Matrix and Equations

3

TT

V S

i i i j i mT

j i j j j m

Sm i m j m m

Conduction Convection

k B D B dV h N N dS

N N N N N N

tA B D B h N N N N N N ds

N N N N N N

i

jm

h

i i i i i j i j i m i m

i mj i j i j j j j j m j m

m i m i m j m j m m m m

2 0 1htLtK

0 0 04A 6

1 0 2

Finite Element 2-D Conduction

Page 28: Galerkin’s Method for Differential Equation

T

Q

V

1QV

f Q N dV 1 for constant heat source3

1

elementeach for

tkf

Stiffness matrix is general term for a matrix of known coefficients being multiplied by unknown degrees of freedom, i.e., displacement OR temperature, etc. Thus, the element conduction matrix is often referred to as the stiffness matrix.

2

*T* i mq

S

1q tL

f q N ds 0 on side i-m2

1