*Write down from memory simple finite difference expressions for derivatives etc. Define the meaning of the forward difference, the backward difference and the central difference and the order of the error associated with each, O(Δx) or O(Δx2). Explain spatial and temporal notation.
A finite difference scheme is a way of approximating derivatives of a function.
The forward difference takes the slope between Pi and Pi+1 as its approximation
The backward difference takes the slope between Pi and Pi-1 as its approximation
The central difference takes the average of the forward difference and the backward difference as its approximation to the differential
The forward and backward difference approximations have errors of order Δx, which means they are in error of the size of the grid spacing (Δx). Their inaccuracies are almost equivalent. The central difference method is the most accurate with an error associated of Δx2.
See pdf link at bottom of page.
*Apply finite difference approximations to a simple partial differential equation (PDE) such as the diffusion equation and explain what is meant by an explicit and implicit numerical scheme
If a direct computation of the dependent variables is made in terms of known quantities, the computation is explicit.
If dependent variables are defined by coupled sets of equations, and a matrix or iterative technique is needed to obtain the solution, the numerical method is implicit.
See pdf link at bottom of page.
*Write a simple spreadsheet to solve the explicit numerical scheme for a simple PDE for given boundary and initial conditions and be able to describe the effect of time step size, Δt.
Do on computer
*Show how the implicit finite differences scheme applied to a simple linear PDE leads to a set of linear equations which are tridiagonal in 1D and pentadiagonal in 2D.
See pdf link at bottom of page
*Derive the structure of the pentadiagonal A-matrix in 2D for a given numbering scheme going from (i,j) notation to m-notation where m is an ordered numbering scheme e.g. for the natural numbering scheme, m = (j – 1).NX + i
Look at Figure 10.
The idea is to get rid of the i,j notation to make it simpler to arrange linear equations. NX is the maximum number of grid blocks in the x direction and NY is the maximum number of grid blocks in the y direction.
Given the natural numbering scheme and these values, you can then draw up a table with j values along the y axis and i values along the x axis. The corresponding m values will be in the table and you’re done.
*Describe a solution strategy for the non-linear single phase 2D pressure equation where the fluid and rock compressibility (and density and viscosity) are functions of the dependent variable, pressure, P(x,y,t)
There are two solution strategies for solving the non-linear single phase 2D pressure equation – we can use a numerical equation solver that is tailored for more difficult non-linear problems. This approach is typically the Newton-Raphson method.
Or we can apply an algorithm. Page 28.
*Write down the discretized form of both the pressure and saturation equation for two-phase flow given the governing equations (in simplified form in 1D), and be able to explain why these lead to sets of non-linear algebraic equations.
They are sets of non-linear algebraic equations because we have unknown pressure as the solution and the coefficients are also unknown (saturations).
See pdfs bottom of page.
*Outline with an explanation and a simple flow chart the main idea behind the IMPES solution strategy for the discretized two-phase flow equations.
IMPES stands for Implicit in Pressure, Explicit in Saturation. The approximation can be iterated until it converges but care must be taken with the size of the time step as there are limitations to the model. If the time step is too large the IMPES approximation may give unreasonable and unstable results.
A typical step by step flow chart behind the main idea of the IMPES solution is as follows:
- Set the iteration counter to zero i.e. v = 0
- Take current values of oil saturation and pressure as the v level iteration values
- Set the total mobilities to the forward and backward spatial steps
- Solve the linear implicit pressure equation for pressure at iteration v
- Then update the saturation equation as if it were explicit by taking the oil mobility terms at the latest iteration and the latest values of the pressures just calculated implicitly.
- Calculate the error by comparing the change in pressure or saturations at the current (v) an last (v-1) iterations. The error time may have some scaling issues weighing the pressure and saturation terms because of the units of pressure
- If the error is less than the tolerance the process is complete. If error is greater than tolerance then repeat the process.
*Write down the expanded expressions for a set of linear equations which, in compact form are written A.x = b, where the A matrix is an nxn matrix of known coefficients (aij; i= rows and j=columns), b is a vector of n known values and x is the vector of n unknowns which we are solving for.
See pdf links bottom of page
*Explain clearly the main differences between a direct and an iterative solution method for the set of linear equations, A.x = b.
Gaussian elimination is an example of this method. We begin by following a particular algorithm and taking a specific number of steps to get the answer. We need to use a set of forward elimination steps in order to get the equations into a simple enough form for solution. Then a back substitution set of steps is performed to give the answer.
Jacobi iteration and the LSOR are examples of iterative methods. We begin by making an estimate to the solution vector xo say. We take this iteration as zero, v = 0. We then follow a procedure (algorithm) for improving this guess by iteration to obtain x(1) and continue through each solution vector until the solution converges to the correct x as v increases. Iterative methods do not have a fixed number of steps, thus we cannot tell how quickly it will converge to the correct solution.
*Write down the algorithm for a very simple iterative scheme for solving A.x. =b, and be able to describe the significance of the initial guess, x(0), what is meant by iteration (and iteration counter, v), the idea of convergence of x(v) as v → ∞; and be able to comment on the number of iterations required for convergence, Niter
A simple algorithm:
- Make an initial guess (v=0) at the solution and assign this value to x(0)
- Update the solution to the next iteration (v+1) using the solution for xiv
- Estimate the error term by comparing the last two iteration of the unknowns
- If error is less than tolerance then we are finished. If error is greater then tolerance continue with iterations
Iteration defines a stepwise process in which we continue towards some specified goal by making changes to input parameters. Iteration counter is just the number of iterations we have performed. The idea of convergence is that as we progress through iterations our input data is becoming more accurate and resultantly the error reduces, giving us increasingly more accurate results. Niter is the number of iterations required to achieve convergence. The required number of iterations to achieve convergence is usually unknown in advance
*Explain how to apply (without derivation) the Newton-Raphson method for solving a single non-linear algebraic equation, f(x) = 0
To solve a single non-linear algebraic equation using the Newton-Raphson method we use its algorithm which is given on page 50. It requires a first guess x(0) and an expression for the derivative of x(v) at iteration v.
*Extend the application of the Newton-Raphson to sets of non-linear algebraic equations such as those arising from the discretization of the two-phase pressure and saturation equations
*Understand, but not be able to reproduce the detailed derivation of, the more mathematical explanation of numerical dispersion.
Numerical dispersion and numerical diffusion are interchangeable.
The following a links to my notes that I have scanned. They are supplementary to the information above.