The Control-Volume Finite-Difference Approximation to the Diffusion Equation

Similar documents
MMJ1153 COMPUTATIONAL METHOD IN SOLID MECHANICS PRELIMINARIES TO FEM

Module 1 : The equation of continuity. Lecture 4: Fourier s Law of Heat Conduction

Lecture 4.2 Finite Difference Approximation

FINITE-VOLUME SOLUTION OF DIFFUSION EQUATION AND APPLICATION TO MODEL PROBLEMS

The Plane Stress Problem

THE HEATED LAMINAR VERTICAL JET IN A LIQUID WITH POWER-LAW TEMPERATURE DEPENDENCE OF DENSITY. V. A. Sharifulin.

x y plane is the plane in which the stresses act, yy xy xy Figure 3.5.1: non-zero stress components acting in the x y plane

AE/ME 339. K. M. Isaac Professor of Aerospace Engineering. December 21, 2001 topic13_grid_generation 1

1.1 The Equations of Motion

CONSERVATION OF ENERGY FOR ACONTINUUM

One Dimensional Convection: Interpolation Models for CFD

Chapter 2 Basic Conservation Equations for Laminar Convection

where is the Laplace operator and is a scalar function.

UNSTEADY LOW REYNOLDS NUMBER FLOW PAST TWO ROTATING CIRCULAR CYLINDERS BY A VORTEX METHOD

Exercise solutions: concepts from chapter 5

Apply mass and momentum conservation to a differential control volume. Simple classical solutions of NS equations

Triple Integrals in Cartesian Coordinates. Triple Integrals in Cylindrical Coordinates. Triple Integrals in Spherical Coordinates

MA8502 Numerical solution of partial differential equations. The Poisson problem: Mixed Dirichlet/Neumann boundary conditions along curved boundaries

Alternative Boundary Condition Implementations for Crank Nicolson Solution to the Heat Equation

Numerical Solution of Non-Darcian Effects on Natural Convection in a Rectangular Porous Enclosure with Heated Walls

Estimating h Boundary Layer Equations

NST1A: Mathematics II (Course A) End of Course Summary, Lent 2011

FIRST- AND SECOND-ORDER IVPS The problem given in (1) is also called an nth-order initial-value problem. For example, Solve: Solve:

Rancho Bernardo High School/Math Department Honors Pre-Calculus Exit Exam

NUMERICAL COMPUTATION OF PARTICLE TRANSPORT IN TURBULENT FLOW FIELD IN ELECTROSTATIC PRECIPITATOR

KINEMATIC RELATIONS IN DEFORMATION OF SOLIDS

ME 7502 Lecture 2 Effective Properties of Particulate and Unidirectional Composites

Contents. Dynamics and control of mechanical systems. Focuses on

Joule Heating Effects on MHD Natural Convection Flows in Presence of Pressure Stress Work and Viscous Dissipation from a Horizontal Circular Cylinder

Applications of Gauss-Radau and Gauss-Lobatto Numerical Integrations Over a Four Node Quadrilateral Finite Element

TENSOR TRANSFORMATION OF STRESSES

Fluid Mechanics II. Newton s second law applied to a control volume

Functions of Several Variables

Separation of Variables in Cartesian Coordinates

CONSERVATION OF ANGULAR MOMENTUM FOR A CONTINUUM

Towards Higher-Order Schemes for Compressible Flow

The Plane Stress Problem

Two-Dimensional Formulation.

One of the most common applications of Calculus involves determining maximum or minimum values.

6 = 1 2. The right endpoints of the subintervals are then 2 5, 3, 7 2, 4, 2 9, 5, while the left endpoints are 2, 5 2, 3, 7 2, 4, 9 2.

Green s Theorem Jeremy Orloff

International Journal of Applied Mathematics and Physics, 3(2), July-December 2011, pp Global Research Publications, India

Review of the Fundamentals of Groundwater Flow

17. Find the moments of inertia I x, I y, I 0 for the lamina of. 4. D x, y 0 x a, 0 y b ; CAS. 20. D is enclosed by the cardioid r 1 cos ; x, y 3

A first contact with STAR-CCM+ Comparing analytical and finite volume solutions with STAR-CCM+ simulations

7. Choice of approximating for the FE-method scalar problems

Dynamics and control of mechanical systems

CONTINUOUS SPATIAL DATA ANALYSIS

Electromagnetic Induction (EMI) Response from Conducting and Permeable Spheroidal Shells

Chapter 6 2D Elements Plate Elements

Aircraft Structures Structural & Loading Discontinuities

Overview of Convection Heat Transfer

Chapter Adequacy of Solutions

Simplified Fast Multipole Methods for Micromagnetic Modeling

Multivariable Calculus Lecture #13 Notes. in each piece. Then the mass mk. 0 σ = σ = σ

GUIDED WAVES IN A RECTANGULAR WAVE GUIDE

Fully Discrete Energy Stable High Order Finite Difference Methods for Hyperbolic Problems in Deforming Domains: An Initial Investigation

Chapter 6 Laminar External Flow

Lecture on: 3D Dislocation Dynamics: Numerical Treatment

Anti-diffusive Methods for Hyperbolic Heat Transfer

PHY 5246: Theoretical Dynamics, Fall Assignment # 9, Solutions. y CM (θ = 0) = 2 ρ m

And similarly in the other directions, so the overall result is expressed compactly as,

Modeling of Failure along Predefined Planes in Fractured Reservoirs

Boundary-Fitted Coordinates!

UNIT 4 HEAT TRANSFER BY CONVECTION

One Dimensional Convection: Interpolation Models for CFD

Numerical Integration (Quadrature) Another application for our interpolation tools!

BTCS Solution to the Heat Equation

Chapter 4 Transport of Pollutants

Introduction to Differential Equations. National Chiao Tung University Chun-Jen Tsai 9/14/2011

Operations depend on pixel s Coordinates. Context free. Independent of pixel values. I(x,y) I (x,y )

11.1 Double Riemann Sums and Double Integrals over Rectangles

Review Test 2. c ) is a local maximum. ) < 0, then the graph of f has a saddle point at ( c,, (, c ) = 0, no conclusion can be reached by this test.

MAE 323: Chapter 4. Plane Stress and Plane Strain. The Stress Equilibrium Equation

Math 1431 Final Exam Review. 1. Find the following limits (if they exist): lim. lim. lim. lim. sin. lim. cos. lim. lim. lim. n n.

Roe Scheme in Generalized Coordinates; Part I- Formulations

Chapter 3: BASIC ELEMENTS. solid mechanics)

Simulation of Acoustic and Vibro-Acoustic Problems in LS-DYNA using Boundary Element Method

Handout for Adequacy of Solutions Chapter SET ONE The solution to Make a small change in the right hand side vector of the equations

Entropy ISSN

Chemical Reaction and Viscous Dissipation Effects on an Unsteady MHD Flow of Heat and Mass Transfer along a Porous Flat Plate

6.1 The Linear Elastic Model

Physics 101. Vectors. Lecture 2. h0r33fy. EMU Physics Department. Assist. Prof. Dr. Ali ÖVGÜN

Part I. Discrete Models. Part I: Discrete Models. Scientific Computing I. Motivation: Heat Transfer. A Wiremesh Model (2) A Wiremesh Model

Vector Calculus. Vector Fields. Reading Trim Vector Fields. Assignment web page assignment #9. Chapter 14 will examine a vector field.

Finite Difference Methods (FDMs) 1

INTERFACE CRACK IN ORTHOTROPIC KIRCHHOFF PLATES

First Order Equations

Available online at ScienceDirect. Procedia Engineering 90 (2014 )

Physics Gravitational force. 2. Strong or color force. 3. Electroweak force

CHAPTER 2: Partial Derivatives. 2.2 Increments and Differential

Introduction to Finite Di erence Methods

3.5 Finite Differences and Fast Poisson Solvers

Broken Extremals. Variational Methods & Optimal Control lecture 20. Broken extremals. Broken extremals

y=1/4 x x=4y y=x 3 x=y 1/3 Example: 3.1 (1/2, 1/8) (1/2, 1/8) Find the area in the positive quadrant bounded by y = 1 x and y = x3

Math 214 Spring problem set (a) Consider these two first order equations. (I) dy dx = x + 1 dy

Microscopic Momentum Balance Equation (Navier-Stokes)

The embedded finite difference method for the Poisson equation in a domain with an irregular boundary and Dirichlet boundary conditions

Directional derivatives and gradient vectors (Sect. 14.5). Directional derivative of functions of two variables.

Chapter 3: Three faces of the derivative. Overview

Transcription:

The Control-Volume Finite-Difference Approimation to the Diffusion Equation ME 448/548 Notes Gerald Recktenwald Portland State Universit Department of Mechanical Engineering gerr@mepdedu ME 448/548: D Convection-Diffusion Equation Overview Develop a numerical model of the two-dimensional Poisson equation Demonstrate application of the finite volume method for a cartesian mesh Allow for non-uniform mesh, diffusion coefficient, and source term Implement in Matlab Demonstrate truncation error for a model problem with a simple solution Appl to full-developed flow in a rectangle ME 448/548: D Convection-Diffusion Equation page

Model Problem The two dimensional diffusion equation in Cartesian coordinates is Γ φ + Γ φ + S = () where φ is the scalar field, Γ is the diffusion coefficient, and S is the source term ME 448/548: D Convection-Diffusion Equation page D Cartesian Finite Volume Mesh 3 Interior node + + Boundar node Ambiguous corner node j = i = 3 ME 448/548: D Convection-Diffusion Equation page 3

Finite Volume Mesh Notation for a tpical control volume w e Regardless of whether the control volumes sizes are uniform, the node is alwas located in the geometric center of each control volume Thus, δ n W N P E n P w = e P = P s = n P = δ s s δ w S δ e ME 448/548: D Convection-Diffusion Equation page 4 Convert the Differential Equation to a Discrete Equation Integrate over the control volume w e n e s w = Γ φ d d n s Γ φ Γ φ d e w Γ φ Γ φ e w δ n δ s W δ w N P S δ e E n s Γ e φ E φ P δ e φ P φ W Γ w δ w ME 448/548: D Convection-Diffusion Equation page 5

Convert the Differential Equation to a Discrete Equation Integrate the source term e n w s Sdd S P () Note: The Control Volume Finite Difference (CVFD) method treats the source term and diffusion coefficients as piecewise constants This is a rather crude approimation, sa, compared to allowing the source term and diffusion coefficient to var linearl within the control volume However, piecewise constant profiles of S and Γ allow the method to be conservative, ie, conserving mass or energ, automaticall The conservative nature of the CVFD method is one of its primar strengths ME 448/548: D Convection-Diffusion Equation page 6 Convert the Differential Equation to a Discrete Equation Putting pieces back into the model equation gives the discrete sstem of equations where a E = a S φ S a W φ W + a P φ P a E φ E a N φ N = b (3) Γ e δ e, a W = Γ w δ w, a N = Γ n δ n, a S = Γ s δ s a P = a E + a W + a N + a S (4) b = S P (5) This is not a tridiagonal sstem of equations ME 448/548: D Convection-Diffusion Equation page 7

Non-uniform Γ Continuit of flues at the interface requires φ Γ P φ = Γ E φ = Γ e e e+ Use central difference approimations e material material P E Γ e φ E φ P δ e = Γ P φ e φ P δ e (6) δ e- δ e+ Γ e φ E φ P δ e = Γ E φ E φ e δ e+ (7) δ e ME 448/548: D Convection-Diffusion Equation page 8 Non-uniform Γ Equations 6 and 7 can be rearranged as material material φ e φ P = δ e Γ P φ E φ e = δ e+ Γ E Γ e δ e (φ E φ P ) (8) Γ e δ e (φ E φ P ) (9) P E Add Equation 8 and Equation 9 φ E φ P = Γ e δe (φ E φ P ) + δ e+ δ e Γ P Γ E Cancel the factor of (φ E φ P ) and solve for Γ e /δ e to get δ e- δ e δ e+ Γ e δe = + δ e+ = δ e Γ P Γ E Γ E Γ P δ e Γ E + δ e+ Γ P ME 448/548: D Convection-Diffusion Equation page 9

Non-uniform Γ Thus, the diffusion coefficient at the interface that results in flu continuit is Γ e = Γ E Γ P βγ E + ( β)γ P () where β δ e δ e = e P E P () An analogous derivation gives formulas for Γ w, Γ n,andγ s ME 448/548: D Convection-Diffusion Equation page Solving the Sstem of Equations Regardless of uniform or variable Γ, the discrete equation has a five-point stencil, and the discrete equation for an interior node can be written a S φ S a W φ W + a P φ P a E φ E a N φ N = b () To set up the matri for this sstem of equations, we need to re-number the unknowns ME 448/548: D Convection-Diffusion Equation page

Solving the Sstem of Equations Order the nodes: n = i +(j )n With natural ordering the neighbors in the compass point notation have these indices np = i + (j-)*n ne = np + nw = np - nn = np + n ns = np - n 3 + + j = i = 3 Interior node Boundar node Ambiguous corner node ME 448/548: D Convection-Diffusion Equation page Solving the Sstem of Equations This leads to a vector of unknowns φ, φ, φ n, φ, φ, φ i,j φ n,n φ φ φ n φ n+ φ n+ φ n φ N (3) ME 448/548: D Convection-Diffusion Equation page 3

Solving the Sstem of Equations A = a S a W ap a E a N ME 448/548: D Convection-Diffusion Equation page 4 Model Problems Choose the source term so that the eact solution is simple to compute Uniform source term Analtical solution eists, but requires an infinite series 3 Nonuniform diffusivit and concentrated source term This problem is meant to stress the numerical solution code ME 448/548: D Convection-Diffusion Equation page 5

Model Problem Choose a source term that ma be phsicall unrealistic, but one that gives an eact solution that is eas to evaluate π π π π S = + sin sin L L L L The eact solution is π π φ = sin sin L L ME 448/548: D Convection-Diffusion Equation page 6 Model Problem The eact solution is π π φ = sin sin L L 5 5 5 8 6 4 ME 448/548: D Convection-Diffusion Equation page 7

Solutions to Model Problem Show Correct Truncation Error The local truncation error at each node is e i O( ) Since the eact solution is known we can compute e N = e i N Nē N = ē N where N = n n is the total number of interior nodes in the domain, and ē is the average truncation error per node Measured error 3 4 5 6 Measured Theoretical error ~ ( 3 7 3 Since e i O( ), N n,and = L /(n + ), wecanestimate e N ē = O( ) = O L /(n + ) 3 O = O( 3 ) N n n n ME 448/548: D Convection-Diffusion Equation page 8 Model Problem Uniform source term: S = 8 7 6 5 4 3 5 8 6 4 ME 448/548: D Convection-Diffusion Equation page 9

Model Problem 3 Solution with α = Γ = αγ Γ = L 5L S = S = 5L 35 3 5 5L 5L L 5 5 5 8 6 4 ME 448/548: D Convection-Diffusion Equation page Model Problem 4: Full Developed Flow in a Rectangular Duct For simple full-developed flow the governing equation for the aial velocit w is µ w + w dp dz = This corresponds to the generic model equation with φ = w, Γ = µ (= constant), S = dp dz ME 448/548: D Convection-Diffusion Equation page

Model Problem 4: Full Developed Flow in a Rectangular Duct The smmetr in the problem allows alternative was of defining the numerical model Full Duct Quarter Duct L L L L For the full duct simulation depicted on the left hand side, the boundar conditions are no slip conditions on all four walls w(, ) = w(, L )=w(,)=w(l,)= (full duct) ME 448/548: D Convection-Diffusion Equation page Model Problem 4: Full Developed Flow in a Rectangular Duct The smmetr in the problem allows alternative was of defining the numerical model Full Duct Quarter Duct L L L L For the quarter duct simulation depicted on the right hand side, the boundar conditions are no slip conditions on the solid walls ( = L and = L ) w(l,)=w(, L )= (quarter duct) and smmetr conditions on the other two planes u = u = = = ME 448/548: D Convection-Diffusion Equation page 3