Numerical Solution of the Diffusivity Equation. FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation.

Slides:



Advertisements
Similar presentations
Lect.3 Modeling in The Time Domain Basil Hamed
Advertisements

Computational Modeling for Engineering MECN 6040
Chapter 8 Elliptic Equation.
The structure and evolution of stars
Chapter 3 Steady-State Conduction Multiple Dimensions
PART 7 Ordinary Differential Equations ODEs
INFINITE SEQUENCES AND SERIES
Computer-Aided Analysis on Energy and Thermofluid Sciences Y.C. Shih Fall 2011 Chapter 6: Basics of Finite Difference Chapter 6 Basics of Finite Difference.
Transfer Functions Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: The following terminology.
Development of Empirical Models From Process Data
Transfer Functions Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: The following terminology.
Numerical Methods for Partial Differential Equations
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 9 Instructor: Tim Warburton.
© 2011 Autodesk Freely licensed for use by educational institutions. Reuse and changes require a note indicating that content has been modified from the.
The Finite Difference Method This section presents a quick overview bout the finite difference method. This method can be used to solve any partial differential.
Numerical Methods Due to the increasing complexities encountered in the development of modern technology, analytical solutions usually are not available.
Rev.S08 MAC 1105 Module 3 System of Equations and Inequalities.
Finding roots of equations using the Newton-Raphson method
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Lecture 35 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
Scientific Computing Partial Differential Equations Introduction and
Finite Differences Finite Difference Approximations  Simple geophysical partial differential equations  Finite differences - definitions  Finite-difference.
© Arturo S. Leon, BSU, Spring 2010
Use of Matlab for Analysis and Plotting of Accoustic Well Data.
Chapter 9: Differential Analysis of Fluid Flow SCHOOL OF BIOPROCESS ENGINEERING, UNIVERSITI MALAYSIA PERLIS.
UNDERSATURATED OIL-GAS SIMULATION IMPES SOLUTION
REVIEW OF BASIC STEPS IN DERIVATION OF FLOW EQUATIONS
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
DISCRETIZATION AND GRID BLOCKS NTNU Author: Professor Jon Kleppe Assistant producers: Farrokh Shoaei Khayyam Farzullayev.
Analytical Solution of the Diffusivity Equation. FAQReferencesSummaryInfo Learning Objectives Introduction Analytical Solution Linear Systems Radial Systems.
1 EEE 431 Computational Methods in Electrodynamics Lecture 4 By Dr. Rasime Uyguroglu
Copyright © 2010 Pearson Education, Inc. All rights reserved Sec
Sorting Data. FAQReferencesSummaryInfo Learning Objectives Introduction Arrays Subroutine subprograms Program Exercise Resources Quiz Home HOME Arrays.
Module 4 Multi-Dimensional Steady State Heat Conduction.
Author: Professor Jon Kleppe
Elliptic PDEs and the Finite Difference Method
In section 11.9, we were able to find power series representations for a certain restricted class of functions. Here, we investigate more general problems.
Xianwu Ling Russell Keanini Harish Cherukuri Department of Mechanical Engineering University of North Carolina at Charlotte Presented at the 2003 IPES.
Chapter 2 Laplace Transform 2.1 Introduction The Laplace transform method can be used for solving linear differential equations. Laplace transforms can.
Press the button to start Numerical Reservoir Simulation.
Introduction To UNIX. FAQReferencesSummaryInfo Resources Introduction Learning Objectives Log on User Interface Commands List of Commands Useful Info.
Engineering Analysis – Computational Fluid Dynamics –
Engineering Analysis – Computational Fluid Dynamics –
3 DERIVATIVES.  Remember, they are valid only when x is measured in radians.  For more details see Chapter 3, Section 4 or the PowerPoint file Chapter3_Sec4.ppt.
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.
In Chapters 6 and 8, we will see how to use the integral to solve problems concerning:  Volumes  Lengths of curves  Population predictions  Cardiac.
Lecture 40 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
ERT 210/4 Process Control & Dynamics DYNAMIC BEHAVIOR OF PROCESSES :
Topics 1 Specific topics to be covered are: Discrete-time signals Z-transforms Sampling and reconstruction Aliasing and anti-aliasing filters Sampled-data.
1 Chapter 6 Time Delays Time delays occur due to: 1.Fluid flow in a pipe 2.Transport of solid material (e.g., conveyor belt) 3.Chemical analysis -Sampling.
ERT 216 HEAT & MASS TRANSFER Sem 2/ Dr Akmal Hadi Ma’ Radzi School of Bioprocess Engineering University Malaysia Perlis.
TH EDITION LIAL HORNSBY SCHNEIDER COLLEGE ALGEBRA.
CHAPTER 2 MASS BALANCE and APPLICATION
Computational Fluid Dynamics Lecture II Numerical Methods and Criteria for CFD Dr. Ugur GUVEN Professor of Aerospace Engineering.
Solution of linear equations using Gaussian elimination Author: Jon Kleppe NTNU Assistant producer: Joachim Tro.
Chapter 4 Fluid Mechanics Frank White
Finite Difference Methods
Computing Oil Reserves Using Statistical Distribution of Porosities
Advanced Numerical Methods (S. A. Sahu) Code: AMC 51151
Time Delays Chapter 6 Time delays occur due to: Fluid flow in a pipe
ME/AE 339 Computational Fluid Dynamics K. M. Isaac Topic2_PDE
Topic 3 Discretization of PDE
topic4: Implicit method, Stability, ADI method
Topic 3 Discretization of PDE
topic4: Implicit method, Stability, ADI method
Topic 8 Pressure Correction
topic4: Implicit method, Stability, ADI method
The structure and evolution of stars
Topic 3 Discretization of PDE
Presentation transcript:

Numerical Solution of the Diffusivity Equation

FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation Time Expansion Explicit Difference Equation Programming Exercise Resources Home HOME Introduction Numerical Approximation Programming Exercise Resources Taylor Series Approximations Time Expansion Explicit Difference Equation Discrete Systems

FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation Time Expansion Explicit Difference Equation Programming Exercise Resources Learning Objectives Learning objectives in this module 1.Develop problem solution skills using computers and numerical methods 2.Review the Gaussian elimination method for solving simultaneous linear equations 3.Develop programming skills using FORTRAN FORTRAN elements in this module -input/output -do-loops -subroutines -common blocks

FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation Time Expansion Explicit Difference Equation Programming Exercise Resources Introduction The figure below shows a horizontal porous rod, where fluid is being injected into the left face at a flow rate Q. The injected fluid will be transported through the rod and eventually be produced out of the right face of the rod. The partial differential equation (PDE) for this system, in it’s simplest form, is called the linear diffusivity equation. It is valid for one-dimensional flow of a liquid in a horizontal system, where it is assumed that porosity (f), viscosity (m), permeability (k) and compressibility (c) all are constants. It may be written as: (1) Q in x=0 x=L Q out PLPL PRPR Continue

FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation Time Expansion Explicit Difference Equation Programming Exercise Resources Introduction This simplified equation may be solved analytically. For instance, if the initial pressure of the rod is P R, and we assume constant pressures at the end faces, P L and P R for left and right faces, respectively, we have the following analytical solution: (2) The pressure solution is dependent on position, x, as well as time, t. As time increases, the exponential term becomes smaller, and eventually the solution reduces to the steady-state form: (3) Continue Continue

FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation Time Expansion Explicit Difference Equation Programming Exercise Resources Introduction The derivation of the analytical solution of the diffusivity equation is the same as was used in the previous module. For real systems involving fluid flow in reservoirs, however, we are seldom able to obtain analytical solutions to the flow equations. This is because the reservoir properties are not constant, and the reservoir geometry is normally very complex. Therefore, most of the time we need to solve the equations numerically. In the next section, we will give a brief introduction to discrete systems and finite difference solutions. Gas Oil Water Remember that it doesn’t always look like this...

FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation Time Expansion Explicit Difference Equation Programming Exercise Resources N i+2 i+1 i i-1 i-2 Discrete Systems In order to solve Eq. (1) numerically by means of the finite difference method, we need to go from a continuous system description, as shown in Fig. 1, to a discrete system. To discretize, we simply divide the porous rod into a number of grid blocks, as shown below: A system of N grid blocks, each of length  x, now defines the discrete system. This type of grid is called a block-centered grid, and the grid blocks are assigned indices, i, referring to the mid-point of each block, representing the average property of the block. xx 1 Click in each block to see its index

FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation Time Expansion Explicit Difference Equation Programming Exercise Resources Taylor Series Approximations Next, we need to convert Eq. (1) from a continuous partial differential form to a discrete difference form. For this, we make use of the well-known Taylor series expansions. A function may be expressed in terms of and its derivatives as: (4) Replacing the function f(x) with pressure P(x,t), we may write the following expansions along the x-axis (at constant time, t ): Forwards Backwards (5) (6) Continue

FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation Time Expansion Explicit Difference Equation Programming Exercise Resources Taylor Series Approximations By adding the two expressions, and solving for the second derivative, we get the following expression: By neglecting the higher order terms, we may write the following approximation This is called a central approximation of the second derivative. The smaller the grid blocks used, the smaller will be the error involved. For simplicity, we will change the notation, so that the grid index system is used for indicating position (grid block), and a superscript is used to indicate time level: (7) (8) (9) Continue

FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation Time Expansion Explicit Difference Equation Programming Exercise Resources Time Expansion At constant position, x, the pressure function may be expanded in forward direction with regard to time: By solving for the first derivative, and neglecting the higher order terms, we obtain the following approximation: or, by employing the index system: (9) (10) (11)

FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation Time Expansion Explicit Difference Equation Programming Exercise Resources Explicit Difference Equation Now, we may substitute Eqs. (9) and (11) into Eq. (1), and obtain the difference equation needed for the numerical solution: Actually, Eq. (12) is not valid for the end blocks, ie. blocks 1 and N. These blocks need some special treatment because the blocks i-1 and N+1 that enter into the formulas do not exist. We will not get into the derivations for these blocks here, but give the results below. The complete form of Eq. (12) becomes: (12) (13) Continue

FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation Time Expansion Explicit Difference Equation Programming Exercise Resources Explicit Difference Equation The initial conditions and the boundary conditions are: In the numerical solution procedure, the two boundary conditions are applied immediately, so that they in practice also are initial pressures

FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation Time Expansion Explicit Difference Equation Programming Exercise Resources Explicit Difference Equation We may now solve Eq. (13) for average pressures in grid blocks (i=1,...,N) explicitly. The solution starts at time t=  t, and we solve for all pressures at that time level, since all pressures at t=0 are known. Then we proceed to the next time step, and solve for pressures at t=2  P, since all pressures at t=  t now are known, and so on. In the computer program, we will let index I represent the grid block position, and index J represent time level. Thus, we have the following system of equations to be programmed: Here, J max is the total number of time steps (15) Continue

FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation Time Expansion Explicit Difference Equation Programming Exercise Resources Program Exercise This programming exercise involves the construction of a reservoir simulation program, although in a very simple form. The following steps should be carried out: 1.Make a FORTRAN program that solves the set of equations given in Eq. (15), and writes the computed pressures in each grid block to an ouput file, for each time step (t=0,  t, 2  t, 3  t,...). The FORTRAN program should also include the analytical solution (exercise 8), and the results should be written to the output file together with the numerical solution. 2.Organize the program so that you have a main program for input and output, and that calls a subroutine ANALYTICAL for analytical solution, and another subroutine FINITEDIFF for the numerical solution.

FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation Time Expansion Explicit Difference Equation Programming Exercise Resources Program Exercise 3.Run the program with the following data: N=10 k=1,0 Darcy P 0 =1 atm L=100 cm  =1,0 cP P R =1 atm A=10 cm 3 c=0,0001 atm -1 P L =2 atm  t=0,0005 s  =0,2 Run the program for 600 time steps, so that the pressures are beginning to stabilize. Write only the results to file every 10th step. 4.Use Excel or another plotting program to plot pressures in grid block number 1 (x=5 cm) vs. time, both for numerical and analytical solutions, so that you can get an impression of the numerical error involved in the numerical solution.

FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation Time Expansion Explicit Difference Equation Programming Exercise Resources Introduction to Fortran Fortran Template here The whole exercise in a printable format here Web sites  Numerical Recipes In Fortran Numerical Recipes In Fortran  Fortran Tutorial Fortran Tutorial  Professional Programmer's Guide to Fortran77 Professional Programmer's Guide to Fortran77  Programming in Fortran77 Programming in Fortran77

FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation Time Expansion Explicit Difference Equation Programming Exercise Resources General information Title:Numerical Solution of the Diffusivity Equation Teacher(s):Professor Jon Kleppe Assistant(s):Per Jørgen Dahl Svendsen Abstract:Provide a good background for solving problems within petroleum related topics using numerical methods 4 keywords:Diffusivity Equation, Fortran, Flow Equations, Reservoir simulation Topic discipline: Level:2 Prerequisites:None Learning goals:Develop problem solution skills using computers and numerical methods Size in megabytes:0.7 MB Software requirements:MS Power Point 2002 or later, Flash Player 6.0 Estimated time to complete: Copyright information:The author has copyright to the module and use of the content must be in agreement with the responsible author or in agreement with About the author

FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation Time Expansion Explicit Difference Equation Programming Exercise Resources FAQ No questions have been posted yet. However, when questions are asked they will be posted here. Remember, if something is unclear to you, it is a good chance that there are more people that have the same question For more general questions and definitions try these Dataleksikon Webopedia Schlumberger Oilfield Glossary

FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation Time Expansion Explicit Difference Equation Programming Exercise Resources References W. H. Preuss, et al., “Numerical Recipes in Fortran”, 2nd edition Cambridge University Press, 1992  References to the textbook : Chapter 19 - Partial Differential Equations  The Textbook can also be accessed online: Numerical Recipes in Fortran

FAQReferencesSummaryInfo Learning Objectives Introduction Discrete Systems Taylor Series Approximation Time Expansion Explicit Difference Equation Programming Exercise Resources Summary Subsequent to this module you should...  be able to effectively use Fortran  know the different program structures, such as Nag routines and subroutines  know the format constructions