240 likes | 741 Views
Analytical Solution of the Diffusivity Equation. Home. HOME. Introduction. Analytical Solution. Radial System. Linear System. Programming Exercise. Resources. Learning Objectives. Learning objectives in this module: Develop problem solution skills using computers and numerical methods
E N D
Home HOME Introduction Analytical Solution Radial System Linear System Programming Exercise Resources
Learning Objectives • Learning objectives in this module: • Develop problem solution skills using computers and numerical methods • Review flow equations and methods for analytical solution the equations • Develop programming skills using FORTRAN • No new FORTRAN elements are introduced in this module, you should, from what you have learnt earlier, be able to solve this problem without any problems
Introduction • In analysis of fluid flow in petroleum reservoirs, we need partial differential equations that describe the fluids flowing and the reservoir they are flowing in. Then we need to be able to solve the equations for the conditions of flow that we are interested in. Derivation of the equations normally involves the following elements: • Continuity equations • Darcy’s equations • PVT relationships for the fluids • Compressibility of reservoir rock • Examples of such equations are the simplest forms of the diffusivity equations for linear and radial flow
Introduction r • Below, the geometries of the two simple reservoir systems and the corresponding partial differential equations are shown: Linear flow Radial flow
Analytical Solution • In order to solve the partial differential equations shown earlier, we need to have initial conditions, i.e. initial pressure distribution in the system, and boundary conditions, i.e. rates or pressures at for instance left and right sides of the systems. We will examine two of the most common sets of conditions and analytical solutions for these Linear System Radial System
Linear System x=L Qin x=0 • For the linear system, we have a horizontalporous 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 one-phase partial differential equation (PDE) for this system, in it’s simplest form, is called the lineardiffusivity equation. It is valid for one-dimensional flow of a liquid in a horizontal system, where it is assumed that porosity (), viscosity (), permeability (k ) and compressibility (c ) all are constants. PR PL Qout
Linear System • The linear diffusivity equation may be written as: • (1) • If the initial pressure of the rod is PR , and we assume constant pressures at the end faces, PL and PR for left and right faces, respectively, we have the following analytical solution: • (2) Continue
Linear System • 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: • Click to see what the equation reduces to as time increases (2) (3) ? which is the expression for a straight line
Linear System P Left side pressure Steady state solution Transient solution Initial and right side pressure x • The corresponding steady state differential equation is obtained by setting the right hand side of Eq. (1) equal to zero: • Graphically, the solution may be presented as: (4) As can be observed from the figure, the pressure will increase in all parts of the system for some period of time (transient solution), and eventually approach the final distribution (steady state), described by a straight line between the two end pressures
Radial System • For the radial system below (one-dimensional cylindrical coordinates), we have a horizontal porous disk, where fluid is being injected at the outer boundary and produced at the center. The one-phase one-dimensional (radial) flow equation (PDE) in this coordinate system becomes: • For an infinite reservoir at an initial pressure Pi and with P(r∞)=Pi • and well rate qfrom a well in the center(at r=rw) the analytical solution is: • where is the exponential integral Continue (5) rw r Continue (6)
Radial System • A steady state solution does not exist for an infinite system, since the pressure will continue to decrease as long as we produce from the center. However, if we use a different set of boundary conditions, so that: • we can solve the steady state form of the equation: • By integrating twice, the steady state solution becomes: (7) Continue (8) Continue (9)
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: • Make a FORTRAN program that computes the analytical solutions of Eqs. (2) and (6). When the program is started, it should ask on the screen which geometry should be used, LIN or RAD, and the name of the input data file (where all parameters are to be read from) • Read from the screen which values of x (or r) and t the solution should be computed for. • The results should be written to the screen as well as to an output file • Data set for linear system • Data set for radial system Here Here
Data Set for Linear System • k = permeability [Darcy] • L = length (of rod) [cm] • =viscosity [cp] • = porosity c = compressibility [atm-1]
Data Set for Radial System • k = permeability [Darcy] • rw=wellbore radius [cm] • =viscosity [cp] • = porosity c = compressibility [atm-1] q=flowrate [cm3/s]
Resources Introduction to Fortran Fortran Template here The whole exercise in a printable format here Web sites • Numerical Recipes In Fortran • Fortran Tutorial • Professional Programmer's Guide to Fortran77 • Programming in Fortran77
General information About the author
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
References • See for instance: • H. S. Carslaw and J. C. Jaeger: Conduction of Heat in Solids, 2nd ed., Oxford, 1985 • Numerical Recipes in Fortran in pdf format online: Numerical Recipes in Fortran
Summary Subsequent to this module you should... • be able to keep track of loops and conditional statements • have no problems handling output and input data • have obtained a better understanding on solving problems in Fortran