MSE 430 © 2006, J.C.LaCombe 1 Numerical Methods in Diffusion Portions of this lecture were adapted from Elements of Heat and Mass Transfer, 3 rd ed., F.P.

Slides:



Advertisements
Similar presentations
2ª aula Evolution Equation. The Finite Volume Method.
Advertisements

Computational Modeling for Engineering MECN 6040
Chapter 8 Elliptic Equation.
Parabolic Partial Differential Equations
Finite Element Method (FEM) Different from the finite difference method (FDM) described earlier, the FEM introduces approximated solutions of the variables.
Chapter 3 Steady-State Conduction Multiple Dimensions
Isoparametric Elements Element Stiffness Matrices
CHE/ME 109 Heat Transfer in Electronics LECTURE 12 – MULTI- DIMENSIONAL NUMERICAL MODELS.
PARTIAL DIFFERENTIAL EQUATIONS
CHE/ME 109 Heat Transfer in Electronics LECTURE 11 – ONE DIMENSIONAL NUMERICAL MODELS.
Chapter 4 Numerical Solutions to the Diffusion Equation.
Numerical Methods Marisa Villano, Tom Fagan, Dave Fairburn, Chris Savino, David Goldberg, Daniel Rave.
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Instructor: Tim Warburton.
Monte Carlo Methods in Partial Differential Equations.
Module 1 Introduction to Ordinary Differential Equations Mr Peter Bier.
CHAPTER 8 APPROXIMATE SOLUTIONS THE INTEGRAL METHOD
Chapter 5 NUMERICAL METHODS IN HEAT CONDUCTION
MANE 4240 & CIVL 4240 Introduction to Finite Elements
SOLUTION FOR THE BOUNDARY LAYER ON A FLAT PLATE
Numerical Methods Due to the increasing complexities encountered in the development of modern technology, analytical solutions usually are not available.
ME 231 Thermofluid Mechanics I Navier-Stokes Equations.
Lecture Objectives: Review discretization methods for advection diffusion equation Accuracy Numerical Stability Unsteady-state CFD Explicit vs. Implicit.
Louisiana Tech University Ruston, LA Slide 1 Krogh Cylinder Steven A. Jones BIEN 501 Wednesday, May 7, 2008.
Tutorial 5: Numerical methods - buildings Q1. Identify three principal differences between a response function method and a numerical method when both.
Scientific Computing Partial Differential Equations Introduction and
Dr. R. Nagarajan Professor Dept of Chemical Engineering IIT Madras Advanced Transport Phenomena Module 2 Lecture 4 Conservation Principles: Mass Conservation.
ENE 311 Lecture 2. Diffusion Process The drift current is the transport of carriers when an electric field is applied. There is another important carrier.
Chapter 1 Equations, Inequalities, and Mathematical Models
Scientific Computing Partial Differential Equations Poisson Equation.
1 Discretizing The Concentration Equation Mike Grimm Math 1110 March 11, 2002.
1 EEE 431 Computational Methods in Electrodynamics Lecture 4 By Dr. Rasime Uyguroglu
Lecture Objectives: Analyze the unsteady-state heat transfer Conduction Introduce numerical calculation methods Explicit – Implicit methods.
Numerical Methods Fast Fourier Transform Part: Informal Development of Fast Fourier Transform
Discontinuous Galerkin Methods for Solving Euler Equations Andrey Andreyev Advisor: James Baeder Mid.
Module 4 Multi-Dimensional Steady State Heat Conduction.
Mass Transfer Coefficient
To Dream the Impossible Scheme Part 1 Approximating Derivatives on Non-Uniform, Skewed and Random Grid Schemes Part 2 Applying Rectangular Finite Difference.
CEE 262A H YDRODYNAMICS Lecture 15 Unsteady solutions to the Navier-Stokes equation.
Solution of a System of ODEs with POLYMATH and MATLAB, Boundary Value Iterations with MATLAB For a system of n simultaneous first-order ODEs: where x is.
7. Introduction to the numerical integration of PDE. As an example, we consider the following PDE with one variable; Finite difference method is one of.
Chapter 5: Numerical Methods in Heat Transfer
Transient Conduction: Finite-Difference Equations and Solutions Chapter 5 Section 5.9  
Boundary Value Problems l Up to this point we have solved differential equations that have all of their initial conditions specified. l There is another.
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
CIS888.11V/EE894R/ME894V A Case Study in Computational Science & Engineering We will apply several numerical methods to find a steady state solution of.
HEAT TRANSFER FINITE ELEMENT FORMULATION
Heat flux through the wall
FALL 2015 Esra Sorgüven Öner
Discretization Methods Chapter 2. Training Manual May 15, 2001 Inventory # Discretization Methods Topics Equations and The Goal Brief overview.
Advanced Engineering Mathematics, 7 th Edition Peter V. O’Neil © 2012 Cengage Learning Engineering. All Rights Reserved. CHAPTER 4 Series Solutions.
1 Second Law of Thermodynamics - Entropy. 2 Introduction The second low often leads to expressions that involve inequalities.
MULTIDIMENSIONAL HEAT TRANSFER  This equation governs the Cartesian, temperature distribution for a three-dimensional unsteady, heat transfer problem.
Boyce/DiPrima 9 th ed, Ch 11.3: Non- Homogeneous Boundary Value Problems Elementary Differential Equations and Boundary Value Problems, 9 th edition, by.
Finite-Difference Solutions Part 2
ERT 216 HEAT & MASS TRANSFER Sem 2/ Dr Akmal Hadi Ma’ Radzi School of Bioprocess Engineering University Malaysia Perlis.
Lecture Objectives: - Numerics. Finite Volume Method - Conservation of  for the finite volume w e w e l h n s P E W xx xx xx - Finite volume.
Modified Bessel Equations 홍성민. General Bessel Equation of order n: (1) The general solution of Eq.(1) Let’s consider the solutions of the 4.
Computation Geometry Governing Equations Boundary Conditions Initial Conditions Parameters, dimensionless groups Constraints, other requirements Discretization/mesh.
FINITE DIFFERENCE In numerical analysis, two different approaches are commonly used: The finite difference and the finite element methods. In heat transfer.
1 Week 11 Numerical methods for ODEs 1.The basics: finite differences, meshes 2.The Euler method.
Chapter 30.
Boyce/DiPrima 9th ed, Ch 10.8 Appendix A: Derivation of the Heat Conduction Equation Elementary Differential Equations and Boundary Value Problems, 9th.
Lecture 19 MA471 Fall 2003.
21th Lecture - Advection - Diffusion
Finite Volume Method for Unsteady Flows
Objective Numerical methods Finite volume.
Stationary Point Notes
topic4: Implicit method, Stability, ADI method
topic16_cylinder_flow_relaxation
Presentation transcript:

MSE 430 © 2006, J.C.LaCombe 1 Numerical Methods in Diffusion Portions of this lecture were adapted from Elements of Heat and Mass Transfer, 3 rd ed., F.P. Incropera, and D.P. De Witt John Wiley & Sons, NY, 1990 J.C. LaCombe University of Nevada, Reno Reno, NV, USA These lecture notes complement an online learning module and diffusion simulation software that can be found at:

MSE 430 © 2006, J.C.LaCombe 2 Numerical MethodsIntroduction In many real-world problems, the details of the system may not correspond to a known solution to the diffusion equation. In these cases, it is usually possible to produce a solution where the equation is solved through iterative techniques. This is generally a lot of work to do by hand. However, with the aid of a computer, this becomes possible. The techniques used to reach such solutions are known as numerical methods. Situations that often require numerical methods include Multi-dimensional problems (not simply 1-D) Complex Problems Complex Geometry/Shape Complex boundary conditions Complex initial conditions

MSE 430 © 2006, J.C.LaCombe 3 Elements and Nodes Discretization of the Problem The numerical methods we will use in this course solve complex diffusion problems by breaking up the system into manageable parts and solving the diffusion equations for each part simultaneously with all the other parts. To do this, we discretize the problem mathematically by dividing up space into little elements or nodes and treating time as moving forward in small steps. Element Node Component divided into elements

MSE 430 © 2006, J.C.LaCombe 4 Discretization of the Problem Each element is identified using subscripts, and has a finite dimensions. Node m,n

MSE 430 © 2006, J.C.LaCombe 5 Fick’s Laws in 2-D The Finite-Difference Approach Recall: Fick’s 1 st law simply tells us how solute will flow if there is a concentration gradient. Recall: Fick’s 2 nd law is simply a combination of Conservation of Mass with Fick’s 1 st law. Fick’s 2 nd Law in 2-D Cartesian Coordinates. Before we solve this, we need to re-write the equation into a discretized form. The approach presented here is known as a finite-difference solution approach. (1)

MSE 430 © 2006, J.C.LaCombe 6 Discretizing the Spatial DerivativesThe Diffusion Equation Consider first, the spatial 2 nd derivatives on the RHS of Equation (1). The 2 nd derivatives can be thought of more simply as the slope of the 1 st derivatives. This is written (approximated) in the x-direction as (1) (2) Note that the 1 st derivatives here are simply the concentration gradients. We can use the central difference approximation to determine these… Slope of the 1 st derivative Gradient at RHS of CV Gradient at LHS of CV

MSE 430 © 2006, J.C.LaCombe 7 Discretizing the Spatial DerivativesThe Diffusion Equation m,nm+1,nm-1,n m-1,n+1m+1,n+1m,n+1 Eq. (2) further simplifies if we can determine the concentration gradient at the midpoint between nodes. The gradient can be estimated using the concentration values at the neighboring nodes and the distance between the nodes. Thus, mm+1m-1 (3) (4) Evaluate gradient here C(x) (2)

MSE 430 © 2006, J.C.LaCombe 8 Discretizing the Spatial DerivativesThe Diffusion Equation Equations (3) and (4) can now be substituted into (2) to produce the discretized form of the 2 nd spatial derivative in the x direction. (5a) The 1 st and 2 nd derivatives in the y (and z) directions can also be evaluated in a similar manner… (5b) These make up the RHS of Fick’s 2 nd Law (Eq. 1)

MSE 430 © 2006, J.C.LaCombe 9 Discretizing the Time DerivativeThe Diffusion Equation Now that we have discretized Fick’s 2 nd law in space (1), we must discretize it in time as well. To do this, we will introduce a new variable, p, that is an integer that represents the time step. The duration of each step is  t. Thus, the total time, t, is written… (6) The finite-difference approximation to the time derivative (the LHS of Fick’s 2 nd law) is then expressed as… (7) The superscript, p, denotes the time dependence. The time derivative is expressed in terms as the difference in concentrations between the new time (step p+1) and the previous time (step p). This is the LHS of Fick’s 2 nd Law (Eq. 1)

MSE 430 © 2006, J.C.LaCombe 10 The 2-D Diffusion Equation Fick’s 2 nd Law in Discretized Form We present here a solution approach known as the explicit method. In this finite-difference scheme, the concentration at any node m,n at time t+  t is calculated from knowledge of the concentration at the same and neighboring nodes for the preceding time t. We now can combine (5a,b) and (7) to produce the discretized form of the diffusion equation, (1). (8) Note: Other approaches, such as the implicit method, are more efficient with a computer, but require more complex algorithms. Nonetheless, the fundamental principles are the same as we are applying here. We will not be covering these other methods in this course. Fick’s 2 nd Law in discretized form...

MSE 430 © 2006, J.C.LaCombe 11 The Diffusion EquationThe Fourier Number Equation (8) is the general form of our solution. We can simplify the notation a bit if we use square elements, so that  x =  y. Additionally, we can form the following group of parameters, which is commonly known as the dimensionless Fourier Number, Fo. (9) Now, we can re-arrange (8) to solve for the concentration in node m,n at the new time step, p+1. This equation applies to any element/node on the interior of a component. The expression simplifies to… (10) 2-D Interior Node The NEW composition in an element is calculated using the PREVIOUS compositions in the element and its neighbors.

MSE 430 © 2006, J.C.LaCombe 12 The 1-D Diffusion Equation Explicit Method & Solution Stability For the case of 1-D transport, Equation (8) would instead develop into the form of The accuracy of finite-difference solutions may be improved by decreasing the values of  x and  t (I.e., finer discretization). On the other hand, making these values larger will allow the calculation to proceed more quickly. One additional limitation of the explicit method is that it is not always a stable solution. If the values of  x and  t are not small enough, it can cause the solution to oscillate (even when this is physically impossible). (11) 1-D Interior Node

MSE 430 © 2006, J.C.LaCombe 13 Critical Values of FoStability Criteria To prevent such erroneous results when the solution is “unstable”, the values of  x and  t must meet certain criteria (details omitted). For interior nodes, these are, 1-D Stability Criteria 2-D Stability Criteria Recalling, So, once you pick a value of either  x or  t, the other value must be chosen so that the stability criteria is met. Simply re-arrange the equation for Fo to calculate the acceptable value.

MSE 430 © 2006, J.C.LaCombe 14 Other Element Configurations Zero-Flux Elements and Surfaces The equations presented so far (10, 11) are for interior nodes. I.e., each element’s surroundings are geometrically the same in all directions. We can develop similar equations for different element types, but we need to be clever, or it gets messy. A surface node (with no flux flowing through the surface), can be modeled using the same equation as an interior node. All we need to do is include an imaginary node just outside the surface and set its composition to the same as the node just inside the surface. This has the effect of producing a zero net gradient through the surface. I.e., if the surface node is then the no-flux condition is modeled by adding an imaginary node at m+1 and setting to achieve a state of no-flux at node m (no gradient means no net flux). m,n m-1,n m-1,n+1 m,n+1 mm-1 m,n-1 m-1,n-1 External Surface (zero-flux plane) m+1 Imaginary node

MSE 430 © 2006, J.C.LaCombe 15 Other Element Configurations Zero-Flux Elements and Surfaces So, we can model a surface node by modifying the equation for an interior node. Recalling Equation (10) for 2-D, We then incorporate the imaginary node… 2-D Interior Node And are left with the equation for a surface node… 2-D Surface Node In 1-D, this would work out to… 1-D Surface Node (12) (10) (13)

MSE 430 © 2006, J.C.LaCombe 16 Developing Expressions for Other Element Types Other Solution Approaches The method used on the previous slides to discretize the problem is not the only way to produce equations such as Equations (10)-(13). Another method can be used to provide even greater flexibility with boundary conditions. It is simply based on conservation of mass (Recall that Fick’s 2 nd law is also essentially this as well). Let us consider the element surrounding each node to be subject to conservation of mass. This would be written as… Solid State Diffusive Flux Solute “Generated” Stored Mass += In practice, this can be something like solute entering an element at external surface

MSE 430 © 2006, J.C.LaCombe 17 Other Ways to Discretize the Problem Other Solution Approaches Writing this for a generic interior node, we account for all possible influences. As before, minor changes can be made for an external node. Note that here, flux into the node is considered “positive”. Where, (14)

MSE 430 © 2006, J.C.LaCombe 18 Other Ways to Discretize the Problem Diffusion with “Mass Generation” When massaged, Equation (14) evolves into the same form as the earlier equations (10)-(13), except now, we have added in the solute generation term. (15) And in 1-D, this is (16) Thus, there are a variety of approaches to produce the discretized diffusion equations for a variety of different element types.

MSE 430 © 2006, J.C.LaCombe 19 1-D Thick Diffusion CoupleExample An earlier topic presented the analytical solution to the case of a binary diffusion couple. Let’s analyze this using a finite-difference model. Assume D = 1  cm 2 /s, and the initial compositions are C l = 0.75, and C R =  x 1  cm First, the stability criteria for this 1-D arrangement is that Fo  ½. Thus the maximum time step for a stable solution of this problem is 500 seconds.

MSE 430 © 2006, J.C.LaCombe 20 1-D Thick Diffusion CoupleExample Equation (11) is the suitable solution form: To handle the “infinite” ends, we treat them as having no-flux conditions (I.e., the concentration gradient is zero at the ends) using Equation (13). This will be ok, provided that the concentration field never reaches the end during our simulation. The equations are written for each of the 6 elements… These 6 equations must be solved at each time step, p. There will be one equation for each node. Models with lots of elements involve solving lots of equations. (1-D Interior Node)

MSE 430 © 2006, J.C.LaCombe 21 1-D Thick Diffusion CoupleExample This is expressed more concisely in matrix form. The new concentrations at each node are calculated by solving this matrix at each time step. At each step, you use the resulting concentrations from the previous step, C p+1, as the new values of C p. Likewise, to get it all started, you just use the initial concentrations at each node. You can use whatever methods or software you want to solve the matrix. Even a spreadsheet will work…

MSE 430 © 2006, J.C.LaCombe 22 1-D Thick Diffusion CoupleExample MS Excel Worksheet… Double-click above (ppt only) to open the actual spreadsheet!

MSE 430 © 2006, J.C.LaCombe 23 2-D Explicit Finite Difference Equations (  x=  y) 2-D Equation Summary m,n m+1,nm-1,n m,n-1 m,n+1 m,n m+1,nm-1,n m,n-1 m,n+1 m,n m+1,nm-1,n m,n-1 m,n+1 m,n m+1,nm-1,n m,n-1 m,n+1 Interior Node Interior Corner Plane Surface Exterior Corner