CE 8022 09 A Mathematical Approach for Discretization

5
22 09 A Mathematical Approach for Discretization e previous set of notes we saw how we could numerically solve 1 0 1 0 0 2 2 2 2 2 y , x , y T x T T T ith boundary conditions 1 y on 100 1 0 0 on 0 T x , x , y T Using a control Volume Method P N E W S w n e s 0 n e s w S dS x T K dS x T K dS y T K dS x T K dS n T K sically balances the net heat flow by diffusion into a control vo cal approach that only requires an integral form of the governing preferred in this class ---BUT we can also take a more mathematic p a discrtization directly from our point from eq

description

CE 8022 09 A Mathematical Approach for Discretization. In the previous set of notes we saw how we could numerically solve. With boundary conditions. N. Using a control Volume Method. n. w. e. W. E. P. s. S. - PowerPoint PPT Presentation

Transcript of CE 8022 09 A Mathematical Approach for Discretization

Page 1: CE 8022 09   A Mathematical Approach for Discretization

CE 8022 09 A Mathematical Approach for Discretization

In the previous set of notes we saw how we could numerically solve

101002

2

2

22

y,x,y

T

x

TTT

With boundary conditions

1yon 100

100on 0

T

x,x,yT

Using a control Volume Method

P

N

EW

S

w

n

e

s

0

nesw

S

dSx

TKdS

x

TKdS

y

TKdS

x

TK

dSnTK

That physically balances the net heat flow by diffusion into a control volume

This physical approach that only requires an integral form of the governing equIs the one preferred in this class ---BUT we can also take a more mathematical apporachand develop a discrtization directly from our point from eq

Page 2: CE 8022 09   A Mathematical Approach for Discretization

101002

2

2

22

y,x,y

T

x

TTT

A Finite Difference Solution

In this case our discretization is with a structured grid (mesh) of square elementsWith node points at each vertex

P E

N

S

W

Taylor Series Expansions about P in x-direction

)(ox

T

x

T

x

TTT)x(T PEP

43

33

2

22

62

)(ox

T

x

T

x

TTT)x(T PWP

43

33

2

22

62

Forward

Backward

Add )(ox

TTTT PEW

42

222

So )(oy

TTTT),(o

x

TTTT PNSPEW 22

2

22

2

2

2

22

(1)

On sub in (1) and neglecting terms at and smaller than 2

4WSEN

PTTTT

T

Page 3: CE 8022 09   A Mathematical Approach for Discretization

Essential Ingredients of a Numerical method

We have seen two ways of moving from a continuous PDE to a set of algebraic equations in approximate values of the unknown filed at discrete node points

What have been the key ingredients

1. The discretization--Placing the node points in the domain

i

i

row1 row2 row3

row4 col1 col2 col3 col4

a. Grid

b. Mesh

c. Cloud

Examples

A structured grid--the location of a node is uniquely specified by a row and a column index—hence it has abuild in data struture

An Un-structured grid—A mesh ofElements with nodes placed at Strategic points e.g., element vertices(requires a data structure to Locate nodes, identify neigbours nodesAnd elements)

Clouds– simply populate domain with nodes with no formal background mesh.Simple data structure—list of nodes and location. Neighboring nodes defined byAll nodes that fall within a given radiusOf give node

nb

inbnbii baa02

2. Data Structure– a means to navigate and construct geometric entities associated witha node and it neighbors

3. Combine the discretization and the data structure with the math/physics of the Problem at hand to arrive at an algebraic relationship for the unknown at a node point i in terms of the unknown values at neighboring points (nb)

coefficients Accounts for source termsTransients and boundary conditions

Page 4: CE 8022 09   A Mathematical Approach for Discretization

61

72

60 62

50

An EXAMPLE discretization and Data structure for our test problem

Node Centered Control volumes

Here I will introduce a data structureThat is awkward for the current case which has a clear structured grid BUTCan be generalized for the case of Unstructured grids

Data Struturea. Number nodes consecutively from 1—n (121)

1 2 11

12

50

60 61 62

72

121

For each node i identify its region of support The nodes that are “connected” to the node of interest

The number of nodes in the support is denoted Sin

The support nodes are listed in COUNTER CLOCKWISE ORDERAnd stored in

j,iS

In example shown

,S,S,S,S,S ,,,,, 6250607262 561461361261161

At internal node alwaysInclude one moreTo close loop

461 Sn

1

12

2 0122 312111 ,,, S,S,S

21 Sn Indicates boundary

Note counter clockwise orderArranged to stay inside domain

Page 5: CE 8022 09   A Mathematical Approach for Discretization

1 2

23

12

50

60 61 62

72

11

111

We also need to account for the boundariesFirst we number the boundary segments according to –In current problem we usefour 4segn Each segment has

bsegn nodes Stored in The vector

k,segB

11223

10011111

11310393

23133

,,,

,,b

B,B,B

,,B,B,n

1

2

3

4

MATLAB CODE

%control_exclear all

datacoefficientsolve

Down Load from Web Page