Emilio Zavala. Ricardo Flores. Computational Group. Daniel A. Cervantes ... Alejandro Salazar Sánchez. Daniel Monsivais Velázquez. Renato Leriche Vázquez.
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Computational Methods for Oil Recovery PASI: Scientific Computing in the Americas The Challenge of Massive Parallelism
Luis M. de la Cruz Salas Instituto de Geof´ısica Universidad Nacional Aut´ onoma de M´exico
January 2011 Valpara´ıso, Chile
Comp EOR
LMCS
1 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Mathematical and Computational Group (GMMC) Natural Resources Dept. Dr. Ismael Herrera Revilla Dra. Graciela Herrera Zamarr´ on Dr. Luis M. de la Cruz Salas
Computational Group
Dr. Guillermo Hern´ andez Garc´ıa
Daniel A. Cervantes Cabrera
Dr. Norberto Vera Guzm´ an
Alejandro Salazar S´ anchez Daniel Monsivais Vel´ azquez
Students
Renato Leriche V´ azquez
Esther Leyva
H´ ector U. Barr´ on Garc´ıa
Antonio Carrillo
Ismael Herrera Zamarr´ on
Ivan Contreras
Eduardo Murrieta Le´ on
Alberto Rosas Emilio Zavala Ricardo Flores
http://www.mmc.geofisica.unam.mx Comp EOR
LMCS
2 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Table of contents
1
Oil Reservoir Simulation Motivation
2
General Math & Num Models Axiomatic Formulation Numerical Methods Finite Volume Method
3
Computational Approach TUNA
4
References
Comp EOR
LMCS
3 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Motivation
Table of contents
1
Oil Reservoir Simulation Motivation
2
General Math & Num Models Axiomatic Formulation Numerical Methods Finite Volume Method
3
Computational Approach TUNA
4
References
Comp EOR
LMCS
4 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Motivation
Oil Reservoir Projects
Funded by PEMEX
Comp EOR
LMCS
5 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Motivation
Oil Reservoir Projects
Funded by PEMEX Collaboration with IMP and CIMAT.
Comp EOR
LMCS
5 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Motivation
Oil Reservoir Projects
Funded by PEMEX Collaboration with IMP and CIMAT. 1
WAG injection.
Comp EOR
LMCS
5 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Motivation
Oil Reservoir Projects
Funded by PEMEX Collaboration with IMP and CIMAT. 1
WAG injection.
2
AIR injection.
Comp EOR
LMCS
5 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Motivation
Oil Reservoir Projects
Funded by PEMEX Collaboration with IMP and CIMAT. 1
WAG injection.
2
AIR injection.
Comp EOR
LMCS
3
SLS method.
5 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Motivation
Oil Reservoir Projects
Funded by PEMEX Collaboration with IMP and CIMAT. 1
WAG injection.
2
AIR injection.
3
SLS method.
Oil reservoir simulation is a grand challenge.
Comp EOR
LMCS
5 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Motivation
The major goal of reservoir simulation is to predict future performance of reservoir and find ways and means of optimizing the recovery of some of the hydrocarbons under various operating conditions.
Comp EOR
LMCS
6 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Motivation
The major goal of reservoir simulation is to predict future performance of reservoir and find ways and means of optimizing the recovery of some of the hydrocarbons under various operating conditions. It involves four main interrelated modeling stages:
Comp EOR
LMCS
6 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Motivation
The major goal of reservoir simulation is to predict future performance of reservoir and find ways and means of optimizing the recovery of some of the hydrocarbons under various operating conditions. It involves four main interrelated modeling stages:
And requires a combination of skills of physicists, mathematicians, reservoir engineers, and computer scientists. Comp EOR
LMCS
6 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Motivation
Software Engineering (IEEE Comput Society’s Software Eng. Body of Knowledge) Application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software, and the study of these approaches; that is, the application of engineering to software. Unified Process (UP, Booch et al. [2])
Comp EOR
LMCS
7 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Motivation
Software Engineering (IEEE Comput Society’s Software Eng. Body of Knowledge) Application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software, and the study of these approaches; that is, the application of engineering to software. Unified Process (UP, Booch et al. [2])
Comp EOR
LMCS
8 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Motivation
Software Engineering (IEEE Comput Society’s Software Eng. Body of Knowledge) Application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software, and the study of these approaches; that is, the application of engineering to software. Unified Process (UP, Booch et al. [2])
Requirements
Efficiency Accuracy Abstraction
Comp EOR
LMCS
8 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Motivation
Software Engineering (IEEE Comput Society’s Software Eng. Body of Knowledge) Application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software, and the study of these approaches; that is, the application of engineering to software. Unified Process (UP, Booch et al. [2])
Requirements
Efficiency Accuracy Abstraction We get a software:
Modular Mantainable Reliable Efficient Productive Comp EOR
LMCS
8 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Motivation
Oil production stages First stage of oil reservoir production, primary recovery, the oil is extracted by natural drive mechanism.
Comp EOR
LMCS
9 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Motivation
Oil production stages First stage of oil reservoir production, primary recovery, the oil is extracted by natural drive mechanism. The reservoir pressure can be maintained, using techniques such as gas or water injection. This is known as secondary recovery.
Comp EOR
LMCS
9 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Motivation
Oil production stages First stage of oil reservoir production, primary recovery, the oil is extracted by natural drive mechanism. The reservoir pressure can be maintained, using techniques such as gas or water injection. This is known as secondary recovery. Tertiary or Enhanced Oil Recovery (EOR) is a generic term that embraces several techniques used to increase the amount of crude oil that can be extracted from an oil field. These techniques are based on the injection of materials not normally present in the reservoir, and is the most advanced stage of the exploitation of a reservoir.
Comp EOR
LMCS
9 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Motivation
Oil production stages First stage of oil reservoir production, primary recovery, the oil is extracted by natural drive mechanism. The reservoir pressure can be maintained, using techniques such as gas or water injection. This is known as secondary recovery. Tertiary or Enhanced Oil Recovery (EOR) is a generic term that embraces several techniques used to increase the amount of crude oil that can be extracted from an oil field. These techniques are based on the injection of materials not normally present in the reservoir, and is the most advanced stage of the exploitation of a reservoir.
Primary recovery techniques produce 10 – 15 % of the reservoir’s oil content. Combining the processes of secondary and tertiary recovery techniques, it is possible to produce 30 – 60 % of the reservoir’s total oil content. Comp EOR
LMCS
9 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Axiomatic Formulation
Table of contents
1
Oil Reservoir Simulation Motivation
2
General Math & Num Models Axiomatic Formulation Numerical Methods Finite Volume Method
3
Computational Approach TUNA
4
References
Comp EOR
LMCS
10 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Axiomatic Formulation
Extensive and Intensive Properties
In the physical sciences, intensive property (also called a bulk property, intensive quantity, or intensive variable), is a physical property of a system that does not depend on the system size or the amount of material in the system: it is scale invariant. Density
By contrast, an extensive property (also extensive quantity, extensive variable, or extensive parameter) of a system is directly proportional to the system size or the amount of material in the system. Mass
Comp EOR
LMCS
11 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Axiomatic Formulation
Axiomatic Formulation, (Herrera et al. [3, 4]) I 1
To find extensive E and intensive ψ properties : Z E(t) =
ψ(~x, t)d~x B(t)
2
To establish balances: Z Z Z dE d = ψ(~x, t)d~x = q(~x, t)d~x + dt dt B(t)
B(t)
~τ (~x, t) · ~ndS
(1)
∂B(t)
where q(~x, t) y ~τ (~x, t) are the source term in B(t) and the flux vector through the boundary ∂B(t), respectively Comp EOR
LMCS
12 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Axiomatic Formulation
Axiomatic Formulation, (Herrera et al. [3, 4]) II
Global balance Z
Z Z ∂ψ + ∇ · (~v ψ) d~x = qd~x + ∇ · ~τ d~x ∂t B(t)
B(t)
Local balance
∂ψ + ∇ · (~v ψ) = q + ∇ · ~τ ∂t
Comp EOR
LMCS
(2)
B(t)
(3)
13 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Axiomatic Formulation
Conservative form Defining a “flux function” (see [5]) as f~ = ~v ψ − ~τ we get: Z Z Z ∂ ~ ψd~x + ∇ · f d~x = qd~x ∂t B(t)
B(t)
(4)
B(t)
and therefore ∂ψ + ∇ · f~ = q ∂t
(5)
Equivalently (4) can be written as follows Z Z Z ∂ ~ f · ~ndS = ψd~x + qd~x ∂t B(t)
Comp EOR
∂B(t)
LMCS
(6)
B(t)
14 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Numerical Methods
Table of contents
1
Oil Reservoir Simulation Motivation
2
General Math & Num Models Axiomatic Formulation Numerical Methods Finite Volume Method
3
Computational Approach TUNA
4
References
Comp EOR
LMCS
15 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Numerical Methods
In general, the equations governing a mathematical model of a reservoir cannot be solved by analytical methods.
Comp EOR
LMCS
16 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Numerical Methods
In general, the equations governing a mathematical model of a reservoir cannot be solved by analytical methods. Instead, a numerical model can be produced in a form that is amenable to solution by digital computers.
Comp EOR
LMCS
16 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Numerical Methods
In general, the equations governing a mathematical model of a reservoir cannot be solved by analytical methods. Instead, a numerical model can be produced in a form that is amenable to solution by digital computers. Since the 1950s, numerical models have been used to predict, understand, and optimize complex physical fluid flow processes in petroleum reservoirs.
Comp EOR
LMCS
16 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Numerical Methods
In general, the equations governing a mathematical model of a reservoir cannot be solved by analytical methods. Instead, a numerical model can be produced in a form that is amenable to solution by digital computers. Since the 1950s, numerical models have been used to predict, understand, and optimize complex physical fluid flow processes in petroleum reservoirs. Recent advances in computational capabilities have greatly expanded the potential for solving larger problems and hence permitting the incorporation of more physics into the differential equations.
Comp EOR
LMCS
16 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Numerical Methods
1
Finite Diferences Method (FDM) The FDM can be very easy to implement. Faster than FEM. High accuracy difference schemes can be constructed. In its basic form is restricted to handle only rectangular shapes. Introduce considerable geometrical error and grid orientation effects. Curvilinear coordinates can be used.
Comp EOR
LMCS
17 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Numerical Methods
1
Finite Diferences Method (FDM) The FDM can be very easy to implement. Faster than FEM. High accuracy difference schemes can be constructed. In its basic form is restricted to handle only rectangular shapes. Introduce considerable geometrical error and grid orientation effects. Curvilinear coordinates can be used.
2
Finite Element Method (FEM) The FEM cand handle complicated geometries. Reduce the grid orientation effects. Solid theoretical foundations. Can manage local grid refinement. The quality of a FEM approximation is often higher than in the corresponding FDM approach. FEM is the method of choice in structural mechanics. It is not easy to implement and is slower than FDM.
Comp EOR
LMCS
17 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Numerical Methods 3
Finite Volume Method (FVM) Values are calculated at control volumes. Conservative method: the flux entering a given volume is identical to that leaving the adjacent volume. Can easily be formulated to allow for unstructured meshes. Used in many computational fluid dynamics packages. FVM is in between FDM and FEM: faster and easier to implement than FEM; and more accurate and versatile than FDM.
Comp EOR
LMCS
18 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Numerical Methods 3
Finite Volume Method (FVM) Values are calculated at control volumes. Conservative method: the flux entering a given volume is identical to that leaving the adjacent volume. Can easily be formulated to allow for unstructured meshes. Used in many computational fluid dynamics packages. FVM is in between FDM and FEM: faster and easier to implement than FEM; and more accurate and versatile than FDM.
In oil-reservoir problems we usually require a large number of cells (105 – 106 ), therefore cost of the solution favors simpler and lower order approximation within each cell.
Comp EOR
LMCS
18 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Numerical Methods 3
Finite Volume Method (FVM) Values are calculated at control volumes. Conservative method: the flux entering a given volume is identical to that leaving the adjacent volume. Can easily be formulated to allow for unstructured meshes. Used in many computational fluid dynamics packages. FVM is in between FDM and FEM: faster and easier to implement than FEM; and more accurate and versatile than FDM.
In oil-reservoir problems we usually require a large number of cells (105 – 106 ), therefore cost of the solution favors simpler and lower order approximation within each cell. About 80% – 90% of the total simulation time is spent on the solution of linear systems. Fast linear solvers are crucial to solve sparse, highly non–symmetric, and ill–conditioned systems. Krylov subspace (preconditioned) algorithms are preferred. Comp EOR
LMCS
18 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Finite Volume Method
Table of contents
1
Oil Reservoir Simulation Motivation
2
General Math & Num Models Axiomatic Formulation Numerical Methods Finite Volume Method
3
Computational Approach TUNA
4
References
Comp EOR
LMCS
19 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Finite Volume Method
Finite volume methods are derived on the basis of the conservative form of the balance equations [3, 4, 5]. ∂ ∂t
Z
Z ψd~x + B(t)
∇ · f~d~ x=
Z qd~ x
or
B(t)
B(t)
∂ ∂t
Z
Z ψd~ x+ B(t)
∂B(t)
f~ · ~ndS =
Z qd~ x B(t)
FVM is conservative. Comp EOR
LMCS
20 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Finite Volume Method
N
Conservative form of general balance equation: ∂ ∂t
Z
Z ψd~ x+
B(t)
∇ · f~d~ x=
B(t)
∆x
∆z
Z
n
qd~ x W
B(t)
w f
P
b
B e
∆y E
F
Integrating on ∆t and taking B(t) ≡ ∆V : Z Z Z Z Z Z ∂ ψdV dt + ∇ · f~dV dt = qdV dt ∂t ∆t
∆V
∆t ∆V
s S
∆V = ∆x∆y∆z
∆t ∆V
Notation: NB P E W N S F B
id i, j, k i + 1, j, k i − 1, j, k i, j + 1, k i, j − 1, k i, j, k + 1 i, j, k − 1
nb e w n s f b Comp EOR
id i + 12 , j, k i − 12 , j, k i, j + 12 , k i, j − 12 , k i, j, k + 21 i, j, k − 21 LMCS
t ≡ n; t + ∆t ≡ n + 1 n+1 Z Z g dt g dt ≡ ∆t
n
Zf Zn Ze
Z g dV ≡ ∆V
g dx dy dz b
s
w 21 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Finite Volume Method
Approximation of the integrals: n+1 Z
∂ ∂t
n
Z
N
ψdV dt ≈ ψPn+1 − ψPn ∆V
∆x
∆z
n
∆V n+1 Z Z n
∇ · f~dV dt ≈
W
n+1 Z
F (f~nb )dt
w f
S
¯ Q∆V dt
qdV dt ≈
B e
∆y
s
n+1 Z
Z Z
b
E
F
n
∆V
P
∆V = ∆x∆y∆z
n
∆t ∆V
Theta scheme: n+1 Z
F dt = θF n+1 + (1 − θ)F n ∆t,
0≤θ≤1
n
Explicit (Forward–Euler) Implicit (Backward–Euler) Crank–Nicolson Comp EOR
θ=0 θ=1 θ = 1/2
LMCS
F n ∆t. F n+1 ∆t. (F n + F n+1 )∆t/2. 22 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Finite Volume Method
N
Recall that f~ = ~v ψ − ~ τ:
∆x
∆z
F (f~nb ) ≈
Z
∇ · f~dV =
W
∆V
Ze Zn Zf w
s
n
w f
P
b
B e
∆y E
F
∂(v ψ − τ ) ∂(v ψ − τ ) ∂(v ψ − τ ) x x y y z z + + dxdydz ∂x ∂y ∂z
b
s S
∆V = ∆x∆y∆z
Discretized flux function: F(f~nb ) = (vx ψ − τx )e − (vx ψ − τx )w Ax + (vy ψ − τy )n − (vy ψ − τy )s Ay + (vz ψ − τz )f − (vz ψ − τz )b Az where Ax = ∆y × ∆z, Ay = ∆x × ∆z, Az = ∆x × ∆y, represents the area of the faces. Advective ~v ψ and Diffusive terms ~τ need to be approximated on the faces. Comp EOR
LMCS
23 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Finite Volume Method
Diffusive terms Central differences: e.g. (τx )e = D
∂ψ ψ − ψE =D P ∂x e ∆xe
Advective terms Average : (vx ψ)e = (vx )e (λψE + (1 − λ)ψP ), where λ = Upstream:
xe −xP ∆xe
QUICK (second order upstream)
Upwind if ((vx )e > 0) then ψe = ψP else ψe = ψE end if Comp EOR
if ((vx )e > 0) then ψe = h(ψW , ψP , ψE ) else ψe = h(ψP , ψE , ψEE ) end if LMCS
24 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Finite Volume Method
Implicit, non-linear: n+1 n+1 an+1 ψPn+1 = an+1 ψEn+1 + an+1 ψW + an+1 ψN + an+1 ψSn+1 + P E W N S
an+1 ψFn+1 + an+1 ψBn+1 + qPn F B
Implicit linear: an ψ n+1 = an ψ n+1 + an ψ n+1 + an ψ n+1 + an ψ n+1 + an ψ n+1 + an ψ n+1 + qPn P P E E W W N N S S F F B B
Explicit: n an ψ n+1 = an ψ n + aW ψW + an ψ n + an ψ n + an ψ n + an ψ n + qPn P P E E N N S S F F B B
Comp EOR
LMCS
25 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
Finite Volume Method
Linear Systems
Comp EOR
LMCS
26 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
TUNA
Table of contents
1
Oil Reservoir Simulation Motivation
2
General Math & Num Models Axiomatic Formulation Numerical Methods Finite Volume Method
3
Computational Approach TUNA
4
References
Comp EOR
LMCS
27 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
TUNA
Template Units for Numerical Applications
Natural convection in box-shaped containers
Comp EOR
LMCS
28 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
TUNA
0.5 sin2 (4t) 1 f1 (t) = 0.5 sin2 (4t − 3π) 0
0 −0.5 sin2 (4t − 3π) f2 (t) = 1 −0.5 sin2 (4t − 6π)
Comp EOR
LMCS
for for for for
0 ≤ t < π/8 π/8 ≤ t < 7π/8 7π/8 ≤ t < π π ≤ t < 2π
for for for for
0≤t rules to compile the examples |--- 01StructMesh => uniform structured meshes |--- 02NonUniformMesh => non uniform structured meshes |--- 03Laplace => Solution of Laplace equation |--- 04HeatDiffusion => Solution of heat conduction problems |--- 05ConvDiffForced => Solution of forced convection |--- 06ConvDiff => Solution of natural convection problems |--- 07ConvDiffLES => Solution of turbulent natural convection |--- README.pdf => Explanation of the examples of each directory 1) Unpack TUNA and change to the TUNA dir: % tar zxvf TUNA.tar.gz % cd TUNA
2) Blitz++: http://www.oonumerics.org/blitz/
Comp EOR
LMCS
32 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
TUNA
Template Units for Numerical Applications III -
Unpack with: tar zxvf blitz-09.tar.gz Change to blitz-0.9 with: cd blitz-0.9 Config blitz with: ./configure --prefix=$PWD/../BLITZ Compile and install blitz with: make install
These instruction will install Blitz in the TUNA/BLITZ directory 3) Run the examples - Change to the Examples directory: cd Examples - Edit the files tuna-cfd-rules.in Change the environment variable BASE according to your paths. (e.g. BASE = /home/luiggi/TUNA) - Then, e.g. change to the 06ConvDiff dir: % cd 06ConvDiff % make mesh(length_x, num_nodes_x, length_y, num_nodes_y, length_z, num_nodes_z); ScalarField3D ScalarField3D ScalarField3D ScalarField3D ScalarField3D
T(mesh.getExtentVolumes()); p(mesh.getExtentVolumes()); u(mesh.getExtentVolumes()); v(mesh.getExtentVolumes()); w(mesh.getExtentVolumes());
Range all = Range::all(); T(T.lbound(firstDim), all, all) = left_wall; T(T.ubound(firstDim), all, all) = right_wall;
Comp EOR
LMCS
// u-velocity // v-velocity // w-velocity
// Left // Rigth
35 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
TUNA
Example: Natural Convection III ScalarEquation energy(T, A, b, mesh.getDeltas()); energy.setDeltaTime(dt); energy.setNeumann(TOP_WALL); energy.setNeumann(BOTTOM_WALL); energy.setDirichlet(LEFT_WALL, left_wall); energy.setDirichlet(RIGHT_WALL, right_wall); energy.setNeumann(FRONT_WALL); energy.setNeumann(BACK_WALL); energy.setUvelocity(us); energy.setVvelocity(vs); energy.setWvelocity(ws); energy.print(); Momentum_XCoDi mom_x(us, A, b, mesh.getDeltas()); Momentum_YCoDi mom_y(vs, A, b, mesh.getDeltas()); Momentum_ZCoDi mom_z(ws, A, b, mesh.getDeltas()); PressureCorrection press(pp, A, b, mesh.getDeltas());
Comp EOR
LMCS
36 / 43
Oil Reservoir Simulation
General Math & Num Models
Computational Approach
References
TUNA
Example: Natural Convection IV template class CDS_CoDi : public ScalarEquation< CDS_CoDi< Tprec, Dim > > { public: typedef Tprec prec_t; typedef typename TunaArray::huge ScalarField; CDS_CoDi() : ScalarEquation() { } ~CDS_CoDi() { }; inline inline inline inline };
void void void void
calcCoefficients1D(); calcCoefficients2D(); calcCoefficients3D(); printInfo() { std::cout