numerical methods in heat mass momentum transfer (lecture notes)jayathimurthy

90
ME 608 Numerical Methods for Heat, Mass and Momentum Transfer Jayathi Y. Murthy Professor, School of Mechanical Engineering Purdue University [email protected] Spring 2006

Upload: api-3803751

Post on 10-Apr-2015

4.998 views

Category:

Documents


21 download

TRANSCRIPT

Page 1: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

ME 608Numerical Methods for Heat, Mass

and Momentum Transfer

Jayathi Y. MurthyProfessor, School of Mechanical Engineering

Purdue [email protected]

Spring 2006

Page 2: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Lecture 1: Introduction to ME 608Conservation Equations

Page 3: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Outline of Lecture

Course organization

Introduction to CFD

Conservation equations, general scalar transport equation

Conservation form

Page 4: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Motivation

Huge variety of industrial flows:

•Rotating machinery

•Compressible/incompressible aerodynamics

•Manifolds, piping

•Extrusion, mixing

•Reacting flows, combustion ….

Impossible to solve Navier-Stokes equations analytically for these applications!

Page 5: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

History

Earliest “CFD” work by L.F. Richardson (1910)» Used human computers» Iterative solutions of Laplace’s eqn

using finite-difference methods, flow over cylinder etc.

» Error estimates, extrapolation to zero error

“So far I have paid piece rates for the operation (Laplacian) of about n/18 pence per coordinate point, n being the number of digits … one of the quickest boys averaged 2000 operations (Laplacian) per week for numbers of 3 digits, those done wrong being discounted …”

Richardson, 1910

Also researched mathematical models for causes of war :

Generalized Foreign Politics (1939)

Arms and Insecurity(1949)

Statistics of Deadly Quarrels (1950)

Lewis F. Richardson (1881-1953)

Page 6: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

History

Relaxation methods (1920’s-50’s)Landmark paper by Courant, Friedrichs and Lewy for hyperbolic equations (1928)Von Neumann stability criteria for parabolic problems (1950)Harlow and Fromm (1963) computed unsteady vortex street using a digital computer. They published a Scientific American article (1965) which ignited interest in modern CFD and the idea of computer experiments Boundary-layer codes developed in the 1960-1970’s (GENMIX by Patankar and Spalding in 1972 for eg.)Solution techniques for incompressible flows published through the 1970’s (SIMPLE family of algorithms by Patankar and Spalding for eg.)Jameson computed Euler flow over complete aircraft (1981)Unstructured mesh methods developed in 1990’s

John

von Neumann (1903-1957)

Richard Courant (1888-1972)

Page 7: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Conservation Equations

Nearly all physical processes of interest to us are governed by conservation equations» Mass, momentum energy conservation

Written in terms of specific quantities (per unit mass basis)» Momentum per unit mass (velocity)» Energy per unit mass e

Consider a specific quantity φ» Could be momentum per unit mass, energy per unit mass..

Write conservation statement for φ for control volume of size

∆x x ∆y x ∆z

Page 8: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Conservation Equations (cont’d)

Accumulation of φ in control volume over time step ∆t =

Net influx of φ into control volume

- Net efflux of φ out of control volume

+ Net generation of φ inside control volume

Page 9: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Conservation Equations (cont’d)

Accumulation:

Generation:

Influx and Efflux:

Page 10: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Diffusion and Convection Fluxes

Diffusion Flux

Convection Flux

Net flux

Velocity Vector

Diffusion coefficient Γ

Page 11: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Combining…

Taking limit as ∆x, ∆y, ∆z -> 0

Page 12: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

General Scalar Transport Equation

Or, in vector form:

Page 13: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Conservation Form

Consider steady state. The conservation form of the scalar transport equation is:

Non-Conservation Form

Finite volume methods always start with the conservation form

Page 14: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

General Scalar Transport Equation

Storage Convection Diffusion Generation

Recall: φ is a specific quantity (energy per unit mass say)

V : velocity vector

Γ: Diffusion coefficient

ρ: density

S: Source term (Generation per unit volume W/m3)

Page 15: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Continuity Equation

0)( =⋅∇+∂∂ Vρρ

t

Here,

φ= 1

Γ= 0

S = 0

Page 16: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Energy Equation

h = sensible enthalpy per unit mass, J/kg

k = thermal conductivity

Sh = energy generation W/m3

Note: h in convection and storage terms

T in diffusion terms

How to cast in the form of the general scalar transport equation?

Page 17: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Energy Equation (cont’d)

Equation of State

Substitute to Find

Here,

φ= h

Γ= k/Cp

S = Sh

Page 18: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Momentum Equation

X-Momentum Equation

jiij

j i

uux x

τ µ⎛ ⎞∂∂

= +⎜ ⎟⎜ ⎟∂ ∂⎝ ⎠

Here,

φ= u

Γ= µ

S = Su - px∂∂

S is good “dumping ground” for everything that doesn’t fit into the other terms

Page 19: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Species Transport Equation

Yi = kg of specie i /kg of mixture

Γi = diffusion coefficient of i in mixture i

Ri = reaction source

Page 20: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Closure

In this lecture we» Developed the procedure for developing the governing

equation for the transport of a scalar φ» Recognized the commonality of transport of

– Mass, momentum, energy, species» Casting all these different equations into this single form is

very useful» Can devise a single method to solve this class of governing

equation

Page 21: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Lecture 2: The General Scalar Transport Equation

Overview of Numerical Methods

Page 22: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Last time…

Wrote conservation statement for a control volume

Derived a general scalar transport equation

Discovered that all transport processes commonalities» Storage» Diffusion» Convection» Generation

Page 23: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

This time…

Examine important classes of partial differential equations and understand their behavior

See how this knowledge applies to the general scalar transport equation

Start a general overview of the main elements of all numerical methods

Page 24: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

General Scalar Transport Equation

Storage Convection Diffusion Generation

Recall: φ is a specific quantity (energy per unit mass say)

V : velocity vector

Γ: Diffusion coefficient

ρ: density

S: Source term (Generation per unit volume W/m3)

Page 25: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Classification of PDEs

Consider the second-order partial differential equation for φ (x,y):

Coefficients a,b,c,d,e,f are linear -- not functions of φ, but can be functions of (x,y)

Discriminant

D < 0 Elliptic PDE

D=0 Parabolic PDE

D>0 Hyperbolic PDE

Page 26: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Elliptic PDEs

Consider 1-D heat conduction in a plane wall with constant thermal conductivity

Boundary conditions

Solution:

To

TL

Page 27: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Elliptic PDE’s

To

TL

• T(x) is influenced by both boundaries

• In the absence of source terms, T(x) is bounded by the values on both boundaries

•Can we devise numerical schemes which preserve these properties?

Page 28: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Parabolic PDEs

Consider 1D unsteady conduction in a slab with constant properties:

Boundary and initial conditions Solution:

T0TiT0

Page 29: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Parabolic PDEs (cont’d)

T0TiT0

• The solution at T(x,t) is influenced by the boundaries, just as with elliptic PDEs

•We need only initial condtions T(x,0). We do not need future conditions

•Initial conditions only affect future conditions, not past conditions

• Initial conditions affect all spatial points in the future

• A steady state is reached as t->∞. In this limit we recover the elliptic PDE.

•In the absence of source terms, the temperature is bounded by initial and boundary conditions

•Marching solutions are possible

Page 30: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Hyperbolic PDEs

Consider the convection of a step change in temperature:

Initial and boundary conditions

Solution:

Page 31: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Hyperbolic PDEs (cont’d)

Page 32: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Hyperbolic PDEs (cont’d)

• Upstream conditions can potentially affect the solution at a point x; downstream conditions do not

• Inlet conditions propagate at a finite speed U

•Inlet condition is not felt at location x until a time x/U

Page 33: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Relation to Scalar Transport Equation

• Contains all three canonical PDE terms

• If Re is low and situation is steady, we get an elliptic equation

• If diffusion coefficient is zero , we get a hyperbolic equation

• If Re is low and situation is unsteady, we get a parabolic equation

• For mixed regimes, we get mixed behavior

Page 34: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Components of CFD Solution

Geometry creation

Domain discretization (mesh generation)

Discretization of governing equations

Solution of discrete equations; accounting for non-linearities and inter-equation coupling

Visualization and post-processing

Page 35: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Solution Process

Analytical solution gives us φ(x,y,z,t). Numerical solution gives us φ only at discrete grid points.The process of converting the governing partial differential equation into discrete algebraic equations is call discretization.

Discretization involves » Discretization of space using mesh generation» Discretization of governing equations to yield sets

of algebraic equations

Page 36: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Mesh Types

Regular and body-fitted meshes

Stair-stepped representation of complex geometry

Page 37: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Mesh types (cont’d)

Block-structured meshes

Unstructured meshes

Page 38: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Mesh Types

Non-conformal mesh

Hybrid mesh

Cell shapes

Page 39: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Mesh Terminology

• Node-based finite volume scheme: φ stored at vertex

• Cell-based finite volume scheme: φ stored at cell centroid

Page 40: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Overview of Finite Difference Method

Step 1: Discretize domain using

a mesh.

Unknowns are located at nodes

Step 2: Expand φ in Taylor series about point 2

Subtracting equations yields

Consider diffusion equation:

Page 41: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Finite Difference Method (cont’d)

Step 3: Adding equations yields

Drop truncated terms:

Step 4: Evaluate source term at point 2:

Second order truncation error

Page 42: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Finite Difference Method (cont’d)

Step 5: Assemble discrete equation

Comments» We can write one such equation for each grid point» Boundary conditions give us boundary values» Second-order accurate» Need to find a way to solve couple algebraic equation set

Page 43: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Overview of Finite Volume Method

Consider the diffusion equation:

Step 1: Integrate over control volume

Page 44: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Finite Volume Scheme (cont’d)

Step 2: Make linear profile assumption between cell centroids for φ. Assume S varies linearly over CV

Step 3: Collect terms and cast into algebraic equation:

Page 45: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Comments

Process starts with conservation statement over cell. We find φ such that it satisfies conservation. Thus, regardless of how coarse the mesh is, the finite volume scheme always gives perfect conservation

This does not guarantee accuracy, however.

The process of discretization yields a flux balance involving face values of the diffusion flux, for example:

Profile assumptions for φ and S need not be the same.

eex

φ∂⎛ ⎞−Γ ⎜ ⎟∂⎝ ⎠

Page 46: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Comments (cont’d)

As with finite difference method, we need to solve a set of coupled algebraic equations

Though finite difference and finite volume schemes use different procedures to obtain discrete equations, we can use the same solution techniques to solve the discrete equations

Page 47: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Closure

In this lecture we

Considered different canonical PDEs and examined their behavior

Understood how these model equations relate to our general scalar transport equations

Started an overview of the important elements of any numerical method

In the next lecture we will complete this overview and start looking more closely at the finite volume method for diffusion problems.

Page 48: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Lecture 3: Overview of Numerical Methods

Page 49: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Last time…

Examined important classes of partial differential equations and understood their behavior

Saw how this knowledge would apply to the general scalar transport equation

Started an overview of numerical methods including mesh terminology and finite difference methods

Page 50: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

This time…

We will continue the overview and examine

Finite difference, finite volume and finite element methods

Accuracy, consistency, stability and convergence of a numerical scheme

Page 51: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Overview of Finite Element Method

Consider diffusion equation

Let be an approximation to φSince is an approximation, it does not satisfy the diffusion equation, and leaves a residual R:

Galerkin finite element method minimizes R with respect to a weight function:

φφ

2

2

d S Rdxφ

Γ + =

Page 52: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Finite Element Method (cont’d)

A family of weight functions Wi, I = 1,…N, (N: number of grid points) is used. This generates N discrete equations for the N unknowns:

Weight function is local – i.e. zero everywhere except close to i

i+1wi

Element iElement i-1

ii-1

Page 53: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Finite Element Method (cont’d)

In addition a local shape function Ni is used to discretize R. Under a Galerkin formulation, the weight and shape functions are chosen to be the same.

Ni

Shape function is non-zero only in the vicinity of node i => “local basis”

Ni-1

i+1i-1 iElement iElement i-1

Page 54: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Finite Element Method (cont’d)

The discretization process again leads to a set of algebraic equations of the form:

Comments» Note how the use of a local basis restricts the relationship

between a point i and its neighbors to only nearest neighbors» Again, we have an algebraic equation set to solve – can use

the same solvers as for finite volume and finite difference methods

, , 1 1 , 1 , 1i i i i i i i i i i ia a a bφ φ φ+ + − −= + +

Page 55: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Comparison of methodsAll three yield discrete algebraic equation sets which must be solved

Local basis – only near-neighbor dependence

Finite volume method is conservative; the others are not

Order or accuracy of scheme depends on » Taylor series truncation in finite difference schemes» Profile assumptions in finite volume schemes» Order of shape functions in finite element schemes

Page 56: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Solution of Linear Equations

Linear equation set has two important characteristics» Matrix is sparse, may be banded» Coefficients are provisional for non-linear problems

Two different approaches» Direct methods» Iterative methods

Approach defines “path to solution”» Final answer only determined by discretization

Page 57: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Direct MethodsAll discretization schemes lead to

Here φ is solution vector [φ1 , φ2 ,…, φN]T.Can invert:

Inversion is O(N3 ) operation. Other more efficient methods exist.» Take advantage of band structure if it exists» Take advantage of sparsity

Page 58: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Direct Methods (cont’d)

Large storage and operation count » For N grid points, must store NxN matrix » Only store non-zero entries and fill pattern

For non-linear problems, A is provisional and is usually updated as a part of an outer loop» Not worth solving system too “exactly”

As a result, direct methods not usually preferred in CFD today

Page 59: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Iterative Methods

Guess and correct philosophyGauss-Seidel scheme is typical:» Visit each grid point

Update using

» Sweep repeatedly through grid points until convergence criterion is met

» In each sweep, points already visited have new values; points not yet visited have old values

Page 60: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Iterative Methods (cont’d)

Jacobi scheme is similar to Gauss-Seidel scheme but does not use latest available values» All values are updated simultaneously at end of sweep.

Iterative are not guaranteed to converge to a solution unless Scarborough criterion is satisfied

Page 61: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Scarborough Criterion

Scarborough criterion states that convergence of an iterative scheme is guaranteed if:

This means that coefficient matrix must be diagonally dominant

Page 62: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Gauss-Seidel Scheme

No need to store coefficient matrix

Operation count per sweep scales as O(N)

However, convergence, even when guaranteed, is slow for large meshes

Will examine alternatives later in course

Page 63: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Accuracy

While looking at finite difference methods, we wrote:

Halving grid size reduces error by factor of four for second-order schemeCannot say what absolute error is – truncation error only gives rate of decrease

Second-order truncation error

Page 64: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Accuracy

Order of discretization scheme is n if truncation error is O(∆xn )When more than one term is involved, the order of the discretization scheme is that of the lowest order term.

Accuracy is a property of the discretization scheme, not the path to solution

Page 65: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Consistency

A discretization scheme is consistent if the truncation error vanishes as ∆x ->0

Does not always happen: What if truncation error is O(∆x/∆t) ?Consistency is a property of the discretization scheme, not the path to solution

Page 66: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Convergence

Two uses of the term» Convergence to a mesh-independent solution through mesh

refinement» Convergence of an iterative scheme to a final unchanging

answer (or one meeting convergence criterion)We will usually use the latter meaning

Page 67: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Stability

Property of the path to solution Typically used to characterize iterative schemesDepending on the characteristics of the coefficient matrix, errors may either be damped or may grow during iterationAn iterative scheme is unstable if it fails to produce a solution to the discrete equation set

Page 68: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Stability

Also possible to speak of the stability of unsteady schemes» Unstable: when solving a time-dependent problem,

the solution “blows up”Von-Neumann (and other) stability analyses determine whether linear systems stable under various iteration/time-stepping schemesFor non-linear/coupled problems, stability analysis is difficult and not much used» Take guidance from linear analysis in appropriate

parameter range; intuition

Page 69: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Closure

This time we completed an overview of the numerical discretization and solution process » Domain discretization» Discretization of governing equations» Solution of linear algebraic set» Properties of discretization and path to solution

– Accuracy, consistency, convergence, stability

Next time, we will start looking at finite volume discretization of diffusion equation

Page 70: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Lecture 4: The Diffusion Equation – A First Look

Page 71: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Last Time…

We completed an overview of the numerical discretization and solution process » Domain discretization» Discretization of governing equations – finite

difference, finite volume, finite element» Solution of linear algebraic set» Properties of discretization and path to solution

– Accuracy, consistency, convergence, stability

Page 72: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

This Time…

We willApply the finite volume scheme to the steady diffusion equation on Cartesian structured meshesExamine the properties of the resulting discretizationDescribe how to discretize boundary conditions

Page 73: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

2D Steady Diffusion

• Consider steady diffusion with a source term:

• Here

• Integrate over control volume to yield

Page 74: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

2D Steady Diffusion

Apply divergence theorem to yield

Page 75: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Discrete Flux Balance

• Writing integral over control volume:

•Compactly:

Page 76: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Discrete Flux Balance (cont’d)

Area vectors given by:

Fluxes given by

Page 77: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

DiscretizationAssume φ varies linearly between cell centroids

Note:» Symmetry of (P, E ) and

(P,W) in flux expression» Opposite signs on (P,E)

and (P,W) terms

Page 78: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Source Linearization

Source term must be linearized as:

Assume SP <0

More on this later!

Page 79: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Final Discrete Equation

P

N

S

EW

Page 80: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Comments

Discrete equation reflects balance of flux*area with generation inside control volume

As in 1-D case, we need fluxes at cell faces

These are written in terms of cell-centroid values using profile assumptions.

Page 81: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Comments (cont’d)

Formulation is conservative: Discrete equation was derived by enforcing conservation. Fluxes balance source term regardless of mesh density

For a structured mesh, each point P is coupled to its four nearest neighbors. Corner points do not enter the formulation.

Page 82: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Properties of Discretization

aP, anb have same sign: This implies that if neighbor φgoes up, φP also goes up

If S=0:

Thus φ is bounded by neighbor values, in keeping with properties of elliptic partial differential equations

Page 83: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Properties of Discretization (cont’d)

What about Scarborough Criterion ?Satisfied in the equality

What about this?

Page 84: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Boundary Conditions

Flux Balance

Different boundary conditions require different representations of Jb

Page 85: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Dirichlet BCs

Dirichlet boundary condition:

φb = φgiven

Put in the requisite flux into the near-boundary cell balance

Page 86: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Dirichlet BC’s (cont’d)

P nbnb

a a>∑

For near-boundary cells:

Satisfies Scarborough Criterion !

Also, φP bounded by interior neighbors and boundary value in the absence of source terms

Page 87: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Neumann BC’s

Neumann boundary conditions : qb given

Replace Jb in cell balance with given flux

Page 88: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Neumann BC’s (cont’d)

P nbnb

a a=∑For Neumann boundaries

So inequality constraint in Scarborough criterion is not satisfied

Also, φP is not bounded by interior neighbors and boundary value even in the absence of source terms – this is is fine because of the added flux at the boundary

Page 89: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Boundary Values and Fluxes

Once we solve for the interior values of φ, we can recover the boundary value of the flux for Dirichletboundary conditions using

Similarly, for Neumann boundary conditions, we can find the boundary value of φ using

Page 90: Numerical Methods in Heat Mass Momentum Transfer (Lecture Notes)JayathiMurthy

Closure

In this lecture we» Described the discretization procedure for the

diffusion equation on Cartesian meshes» Saw that the resulting discretization process

preserves the properties of elliptic equations» Since we get diagonal dominance with Dirichlet bc,

the discretization allows us to use iterative solversNext time, we will look at one more boundary condition (Robbins or mixed bc), source linearization and conjugate heat transfer