S3D User Manual
S3D User Manual
1. INTRODUCTION............................................................................................................................... 1
3. TECHNICAL REFERENCES......................................................................................................... 20
1. Introduction
This is a user manual for S3D Ver 3.2, a three-dimensional streamline simulator. It can
be used to model two-phase waterflooding and also single/two-phase tracer transport
under incompressibility assumptions. The source code (not supplied) is written in
FORTRAN 77 / FORTRAN 90 and runs under any operating system. However, the
executables supplied with the GUI is compiled for Windows. The streamline approach
comprises of two steps: generating streamlines in 3D space and then solving the 1D
transport equations analytically or numerically along the streamlines. The following are
the important features of S3D.
This simulator is meant for educational/research purposes only and is not intended for
commercial use.
• After starting the program, follow these steps: File -> Existing Project. Now
browse to the directory ‘dataFiles’ and inside the directory you will see several
directories related to the computer exercises.
• For testing purposes, enter the directory ‘Homogeneous-5Spot’. Select the file
with extension, *.s3d and click open.
• Now you should be able to view all the data related to this case under the menu
‘Input Data’.
• You can now run the program (Run ->Start) and view the results in Plots.
data01.test
data02.test
data03.test
data04.test
data05.test
welltracer.out
gridpress.out
intermed.out
ratelayer.out
n_of_failsline.out
The first five lines in “stream.dat” are the names of the input files. The first file (e.g.
“data01.test” as above) corresponds to unit 01, second file to unit 02 and so forth for all
the five input files. The next five files are the various output files. A description of the
files are given in the following table.
3
Note : the file extension can be other than ‘.test’ also, e.g. data01.dat or data01.txt.
2.2 Parameters
The parameters specifying the array size are declared in the parameter statements in the
source code (not supplied) and in the common header file "flocom". Prior to the
compilation and execution of the program, these parameters should be correctly defined
corresponding to the expected array size. This version of the program is set for the
following maximum size restrictions.
where:
5
idxa Control parameter for the use of the analytical solution for tracer transport
with longitudinal dispersivity
=0 analytical solution without longitudinal dispersivity
=1 analytical solution with longitudinal dispersivity. This option will work
only if no pressure update is selected (see below).
where:
nx: Number of gridblocks in the x direction in Cartesian coordinate
ny: Number of gridblocks in the y direction in Cartesian coordinate
nz: Number of gridblocks in the z direction in Cartesian coordinate
nphase: Number of phases — note: set nphase = 1 for single phase simulation (e.
g. single phase tracer case); for partioning tracer case and two phase
simulation ( e.g. water flood) set nphase=2.
MaxP: Total number of producers during the entire simulation time, includes
any new producer resulting from infill drilling, e.g. 4 producer initially
and then 1 additional producer after infill drilling, then Maxp=5.
where:
where:
nweli: number of injection wells
iwi(i) : i th location of the gridblock in x direction indicating the location of (i)-
th injection well
jwi(i): j th location of the gridblock in y direction indicating the location of (i)-
th injection well
kwit(i): k th location of the gridblock in z direction indicating the top completion
layer of (i)-th injection well
kwib(i): k th location gridblock in z direction indicating the bottom completion
layer of (i)-th injection well
rwi(i): wellbore radius of (i)-th injection well (ft)
roi(i): equivalent radius of (i)-th injection well (ft) — note: set roi(i) = 0.208dx
for square gridblocks (see details in Peaceman 1978, 1983)
7
Important Note: For incompressible flow as assumed here, the total production
must equal total injection for closed systems. Hence, at least one of the
injection or production wells must be pressure constrained if no flow
boundaries are specified on all sides. Otherwise, the pressure matrix will
become singular (see Aziz and Settari, 1979).
where:
i_update: Control parameter for pressure update.
= 0 No pressure update is required.
= 1 pressure update is required.
Note: If you want to use analytic solutions along streamlines, then specify
i_update = 0 and infill = 0. The ‘infill’ keyword is discussed later.
Production history output is controlled with time_write parameter
discussed below.
i_pup_sol: Control parameter for solution scheme for 1-D waterflood solution
along streamlines.
= 0 Analytical solution.
= 1 Numerical solution.
8
where:
infill: Specifies infill drilling, new well rates or changes in well-configuration.
n_recurrent_total: Number of infill drilling or rate changes. If no infill drilling or
rate changes are desired, then set infill = 0. If infill =1, then we must
specify i_update=1 as we require pressure updates to account for the
changes.
where:
9
where:
idbg: Control parameters for debugging option.
= 0 debugging option off.
= 1 debugging option on.
i_plot: Control parameters for streamline file generation.
= 0 streamline file generation off.
= 1 streamline file generation on.
i_zone: Control parameters for writing out saturation map at each pressure
update
=0 only at the last update time
10
2.3.2 Gridblock and Rock Properties Data (second input file, data02)
The following data groups describe the input data required in the FORTRAN unit 02
input file.
where:
dx(i): length of (i)-th gridblock in x direction (ft)
where:
dy(i): length of (i)-th gridblock in y direction (ft)
where:
dz(i, j, k) : thickness of (i, j, k)-th gridblock in z direction (ft)
where:
depth(i, j, k) : top depth of (i, j, k)-th gridblock (ft)
11
where:
por(i, j, k): porosity at (i, j, k)-th gridblock
where:
permx(i, j, k): permeability in x direction at (i, j, k)-th gridblock (md)
where:
permy(i, j, k) : permeability in y direction at (i, j, k)-th gridblock (md)
Note: permy can also be represented as a fraction of permx. Using ky=kx*1.0
will result in ky=kx.
Label Input variables
permz (((permz(i, j, k), for i=1, nx), for j=1, ny), for k=1, nz)
where:
permz(i, j, k): permeability in z direction at (i, j, k)-th gridblock (md)
Note: permz can also be represented as a fraction of permx. Using kz=kx*1.0
will result in kz=kx.
All the data for porosity and permeability can also be input from an external file
and the user has to specify the file name after each label index.
12
where:
rng(i, j, k): net to gross ratio at (i, j, k)-th gridblock.
where:
irock(i, j, k): rock type for (i, j, k)-th gridblock. If more than one rock type is
used, different relative permeability curves could also be used (in data04).
All the data for ngr and rock type can also be input from an external file and the
user has to specify the file name after each label index.
where:
sat(l, i, j, k): saturation of (l)-th phase at (i, j, k)th gridblock
note: l=1 : water, l=2 : oil
Note: For oil-water, keep nphase=2 for two-phase case. Here the user
can input either the uniform or non-uniform initial saturation. Non-
uniform initial saturation can be input from an external file and the
file name can be mentioned after the label index.
where:
title : title on the 3D streamline model run (up to 80 characters)
where:
nlinei: expected total number of streamlines to be traced — note: the number of
streamlines actually traced by the model will be close to nlinei, but not
necessarily equal to nlinei, because streamlines are drawn in equal areal
increments at the faces of gridblocks of production wells
where:
tcutoff: the threshold time-flight-cutoff value for calculating volumetric sweep
efficiency
where:
nstepc : number of time steps for input of injection tracer concentration
cinj(i, j, k): injection concentration of (j)-th tracer at (i)th time step in (k)th
injection well — note: if nstepc is less than nstep, cinj(nstepc, j, k) is
14
where:
vis : viscosity of water (cp)
fvf : formation volume factor of oil (bbl/STB)
fvfw : formation volume factor of water (bbl/STB)
viso: viscosity of oil (cp)
where:
datum : datum depth (ft)
pdatum: average reservoir pressure (psia).
woc : depth of oil water contact (ft)
Note: The pressure of the reservoir is adjusted based on the pressure constrained
well(s). Recall that at least one production well has to be pressure
constrained to solve the pressure solution for closed systems.
where:
sides: Boundary condition of the reservoir. Six sides of the reservoir can be
“closed” or “open”.
ibl: Control parameter for the boundary condition of the left side of the
reservoir. “l” stands for left.
=0 closed boundary (left side).
=1 open boundary (left side).
pbl: Value of pressure at the open boundary. Only considered if left boundary
is open i.e. ibl = 1
Note: Similarly for other sides. The abbreviations are as follows:
r: right
n: north
s: south
t: top
b: bottom
Note: See first input file for explanation of the keywords. The
“update_time_total” is the cumulative time elapsed from the beginning of
the simulation. The “update_time_total” has to be higher than the
“update_time_total” given in first input file.
Note: Repeat the above four labels for the number of infill drilling. For example,
if infill=2 is specified in first input file, then repeat the four labels twice,
one for each new well configurations.
1. Production.his: This output file gives the output of water cut and oil
production data as a function of time for each well. First column is the time
step, second column is the water cut data and third column is the oil
production data for the producer number 1, then fourth and fifth columns give
18
the water cut and oil production data respectively for the producer number 2
and so on for the other producers. This file can be directly taken to the
EXCEL SPREAD SHEET to make a plot of the water cut and oil rate against
time in days for all producing wells.
2. Tau.dat: This output file gives the time of flight at each grid block. This file
can be taken directly to TECPLOT to make a plot of the time-of-flight
contours. An example time-of-flight contour plot has been shown in the figure
below.
I2 P7
I13 I14
I4
P23 P19 P24
P20 P15 P3 P12 P6
I11 I12 I9 I7
P17 P22 P18 P14 P2 P5
P21 P11
I5 I10 I8
P27 P9 P10 P1 P16 P4 P13
I15 I6
I1 I3
P25 P26 P8
Figure 2- Streamline plot(X-Y view) for a 3D field case with arbitrary well pattern
4. Saturation.dat: This output file gives the water saturation distribution for
each grid blocks at the final time step for the semi-analytical option. This
output can directly be taken to the TECPLOT for plotting the saturation
distribution.
5. Sat_Num.dat: This output file also gives the saturation distribution when
pressure updates are selected and numerical calculations are performed along
streamlines. For other detail see section 2.1. This output can be directly taken
to TECPLOT for plotting the saturation distribution as shown in the above
figure.
20
6. Ratealloc.out: This output file gives the rate allocation for each injector to
each producer. The output is given at each pressure update time and also for
each infill drilling.
7. Vsweep.out: This output file gives the volumetric sweep calculations for each
layer for a particular threshold value of time-of-flight.
8. Recovery.out: This output file gives the recovery (fraction of original oil in
place recovered) at each time step.
3. Technical References
1. Datta-Gupta, A. and King, M.J.: “A Semianalytical Approach to Tracer Flow
Modeling in Heterogeneous Permeable Media,” Advances in Water Resources, 18(1),
9, pp189-24, (1995).
index
idxa
0
nxyz
nx ny nz nphase
41 41 1 2
MaxP
Maximum producing wells(Vertical including all infills)
8
wprod
nwelp
4
iwp jwp kwptop kwpbot rwp rop qp i_constraint pressure
wellID
1 21 1 1 0.25 1.04 3.56 1 2500. 1
21 1 1 1 0.25 1.04 3.56 1 2500. 2
41 21 1 1 0.25 1.04 3.56 1 2500. 3
21 41 1 1 0.25 1.04 3.56 1 2500. 4
winj
nweli
1
iwi jwi kwitop kwibot rwi roi qi i_constraint Pressure wellID
21 21 1 1 0.25 1.04 800.00 0 0. 1
update
i_update
1
i_pup_sol
1
update_time_total n_pup n_factor dtaufrac time_write
500.0 5 2 0.25 20.0
infill
N_recurrent_total
1
tracer
itracer
0
ntrc
1
part diffus disp
0.0 0.0 0.0 0.0 0.0 0.0 0.0
outfmt
dbg
1 1 1
22
Data02
dx
41*52.86
dy
41*52.86
dz
1681*37.
depth
1681*4000.0
por
1681*0.03
permx
perm_high.out
permy
ky=kx*1.0
permz
kz=kx*1.0
ngr
1681*1.0
rock
1
1681*1
sat
1681*0.2
23
Data03
title
test run for a 2d reservoir with infill drilling
nline
number of streamlines
200
tcutoff
Swept Volume Calculation Time
500
cinj
number of time steps for input of injection tracer
2
1*1.0 0.0
24
Data04
fluid
Visw Bo Bw Viso
1.0 1.2 1.0 0.80
press
datum dt.Pressure woc
4000. 4100. 4100.
sides
index pressure at boundary
left
0 4000.
right
0 4000.
north
0 4000.
south
0 4000.
top
0 0.
bottom
0 0.
twoph
itwo_phase itable
1 0
end_kro end_krw sor swc real_no real_nw
0.5 0.8 0.25 0.20 2.0 2.0
density
denw deno
62.5 50.0
25
Data05
wprod
nwelp
8
iwp jwp kwptop kwpbot rwp rop qp i_constraint pressure
WellID
1 21 1 1 0.25 1.04 3.56 1 2500. 1
21 1 1 1 0.25 1.04 3.56 1 2500. 2
41 21 1 1 0.25 1.04 3.56 1 2500. 3
21 41 1 1 0.25 1.04 3.56 1 2500. 4
1 1 1 1 0.25 1.04 3.56 1 2500. 5
41 1 1 1 0.25 1.04 3.56 1 2500. 6
41 41 1 1 0.25 1.04 3.56 1 2500. 7
1 41 1 1 0.25 1.04 3.56 1 2500. 8
winj
nweli
1
iwi jwi kwitop kwibot rwi roi qi i_constraint Pressure WellID
21 21 1 1 0.25 1.04 600.00 0 0. 1
update
i_update
1 /0->no pr_update 1->pr_update
i_pup_sol
1 /0->analytical 1->numerical
update_time_total n_pup n_factor dtaufrac time_write
1000.0 5 2 0.25 20.0
i_plot_stream
1