27 if (!rs_param.
coord.empty()) {
128 for (
USI j = 0; j <
ny; j++) {
129 for (
USI i = 0; i <
nx; i++) {
135 for (
USI k = 1; k <
nz; k++) {
137 for (
USI j = 0; j <
ny; j++) {
138 for (
USI i = 0; i <
nx; i++) {
163 for (
USI k = 0; k <
nz; k++) {
164 for (
USI j = 0; j <
ny; j++) {
165 for (
USI i = 0; i <
nx; i++) {
167 bIdg = k * nxny + j *
nx + i;
172 areaB = 2 *
dy[bIdg] *
dz[bIdg] /
dx[bIdg];
173 areaE = 2 *
dy[eIdg] *
dz[eIdg] /
dx[eIdg];
181 areaB = 2 *
dz[bIdg] *
dx[bIdg] /
dy[bIdg];
182 areaE = 2 *
dz[eIdg] *
dx[eIdg] /
dy[eIdg];
190 areaB = 2 *
dx[bIdg] *
dy[bIdg] /
dz[bIdg];
191 areaE = 2 *
dx[eIdg] *
dy[eIdg] /
dz[eIdg];
203 coordTmp.Allocate(
nx,
ny,
nz);
205 coordTmp.SetupCornerPoints();
232 for (
OCP_USI n = 0; n < CoTmp.numConn; n++) {
234 direction = ConnTmp.directionType;
235 bIdg = ConnTmp.begin;
237 areaB = ConnTmp.Ad_dd_begin;
238 areaE = ConnTmp.Ad_dd_end;
284 if (
ACTNUM[n] == 0 ||
v[n] < e1) {
342 k = n / (
nx *
ny) + 1;
343 j = (n - (k - 1) *
nx *
ny) /
nx + 1;
344 i = n - (k - 1) *
nx *
ny - (j - 1) *
nx + 1;
362 for (
USI k = 0; k <
nz; k++) {
364 for (
USI j = 0; j <
ny; j++) {
366 for (
USI i = 0; i <
nx; i++) {
367 id = k *
nx *
ny + j *
nx + i;
368 tmpP.Points.push_back(
Point3D(tmpX, tmpY,
depth[
id] +
dz[
id] / 2));
369 tmpP.Points.push_back(
371 tmpP.Points.push_back(
373 tmpP.Points.push_back(
375 tmpP.Points.push_back(
Point3D(tmpX, tmpY,
depth[
id] -
dz[
id] / 2));
376 tmpP.Points.push_back(
378 tmpP.Points.push_back(
380 tmpP.Points.push_back(
399 for (
USI k = 0; k <
nz; k++) {
400 for (
USI j = 0; j <
ny; j++) {
401 for (
USI i = 0; i <
nx; i++) {
402 tmpP.Points.push_back(mycord.cornerPoints[i][j][k].p4);
403 tmpP.Points.push_back(mycord.cornerPoints[i][j][k].p5);
404 tmpP.Points.push_back(mycord.cornerPoints[i][j][k].p6);
405 tmpP.Points.push_back(mycord.cornerPoints[i][j][k].p7);
406 tmpP.Points.push_back(mycord.cornerPoints[i][j][k].p0);
407 tmpP.Points.push_back(mycord.cornerPoints[i][j][k].p1);
408 tmpP.Points.push_back(mycord.cornerPoints[i][j][k].p2);
409 tmpP.Points.push_back(mycord.cornerPoints[i][j][k].p3);
447 if (depthMax <
depth[n]) {
450 if (depthMin >
depth[n]) {
473 cout <<
"\n---------------------" << endl
475 <<
"\n---------------------" << endl;
476 cout <<
" depthMax = " << depthMax << endl
477 <<
" depthMin = " << depthMin << endl
478 <<
" dxMax = " << dxMax << endl
479 <<
" dxMin = " << dxMin << endl
480 <<
" dyMax = " << dyMax << endl
481 <<
" dyMin = " << dyMin << endl
482 <<
" dzMax = " << dzMax << endl
483 <<
" dzMin = " << dzMin << endl;
const USI CORNER_GRID
Grid type = corner-point.
unsigned int USI
Generic unsigned integer.
double OCP_DBL
Double precision.
const USI ORTHOGONAL_GRID
Grid type = orthogonal.
unsigned int OCP_USI
Long unsigned integer.
#define OCP_ASSERT(cond, msg)
Assert condition and log user messages in DEBUG mode.
#define OCP_ABORT(msg)
Abort if critical error happens.
USI nx
Num of bulks along x-direction.
USI ny
Num of bulks along y-direction.
USI nz
Num of bulks along z-direction.
Active cell indicator and its index among active cells.
Effective area of intersection surfaces with neighboring cells.
void SetupBasicCornerGrid(const OCP_COORD &CoTmp)
Setup dx,dy,dz,depth, v for a corner-point grid.
OCP_BOOL useVTK
If output in vtk format.
vector< OCP_DBL > ky
Absolute permeability in y-direction: numGrid.
vector< OCP_DBL > v
Volume of cells: numGrid.
void CalNumDigutIJK()
only used in structured grid
vector< OCP_USI > map_Act2All
Mapping from active grid to all grid: activeGridNum.
vector< USI > ROCKNUM
index of rock table for each grid: numGrid
USI nx
Number of cells in x-direction.
void CalActiveGridT(const OCP_DBL &e1, const OCP_DBL &e2)
Calculate the activity of grid cells for ifThermal model.
USI numDigutIJK
number of digits of maximum nx,ny,nz
OCP_USI activeGridNum
Num of active grid.
void SetHexaherdronGridCorner(const OCP_COORD &mycord)
vector< OCP_DBL > SwatInit
Initial water saturation.
void SetupCornerGrid()
Setup corner-point grid.
vector< USI > PVTNUM
Identify PVT region for the blackoil model: numGrid.
vector< OCP_DBL > depth
Depth of center of grid cells: numGrid.
vector< USI > SATNUM
Identify SAT region: numGrid.
vector< OCP_DBL > kz
Absolute permeability in z-direction: numGrid.
USI gridType
Orthogonal or Corner grid.
OCP_USI fluidGridNum
Num of fluid grids.
void SetupGridTag()
Setup grid tag.
vector< USI > gLocation
Top face, bottom face, side face, numGrid.
vector< OCP_DBL > dz
Size of cell in z-direction: numGrid.
void SetHexaherdronGridOrthogonal()
setup polyhedronGrid for orthogonal grid
USI nz
Number of cells in z-direction.
vector< OCPpolyhedron > polyhedronGrid
Coordinates of grid points.
vector< USI > gridTag
Tag of grid: dead, live(fluid), live(rock)
void SetupNeighborCornerGrid(const OCP_COORD &CoTmp)
Setup the neighboring info for a corner-point grid.
vector< OCP_DBL > zcorn
ZValues of a corner-point grid.
vector< GB_Pair > map_All2Flu
Mapping from all grid to fluid grid: numGrid.
vector< OCP_DBL > coord
Lines of a corner-point grid.
void CalActiveGridIsoT(const OCP_DBL &e1, const OCP_DBL &e2)
Calculate the activity of grid cells.
void Setup()
Setup the grid information and calculate the properties.
void OutputBaiscInfo() const
Calculate and return basic informations for grid.
vector< OCP_DBL > thconr
Rock if Thermal conductivity: numGrid.
void InputParam(const ParamReservoir &rs_param, const ParamOutput &output_param)
Input parameters from the internal param structure.
void SetupOrthogonalGrid()
Setup orthogonal grid.
vector< OCP_DBL > poro
Initial porosity of rock cells: numGrid.
USI ny
Number of cells in y-direction.
vector< OCP_DBL > dy
Size of cell in y-direction: numGrid.
void SetupT()
Setup for thermal model.
vector< GB_Pair > map_All2Act
Mapping from grid to active all grid: numGrid.
vector< OCP_DBL > tops
Depth of center of grid cells: numGrid.
vector< OCP_DBL > dx
Size of cell in x-direction: numGrid.
OCP_USI numGrid
Number of all cells.
vector< OCP_DBL > ntg
Net to gross ratio of cells: numGrid.
void CalDepthVOrthogonalGrid()
Calculate the depth and volume for orthogonal grid.
void SetupIsoT()
Setup for Isothermal model.
vector< vector< GPair > > gNeighbor
Neighboring information of grid.
void SetupGridLocation()
Setup Grid location for Structured grid.
void SetupNeighborOrthogonalGrid()
Setup the neighboring info for an orthogonal grid.
vector< OCP_DBL > kx
Absolute permeability in x-direction: numGrid.
Record the initial grid information, all of grids are contained.
OutputVTKParam outVTKParam
See OutputVTKParam.
vector< OCP_DBL > permY
Permeability along the y-direction for each grid.
vector< OCP_DBL > zcorn
TODO: Add Doxygen.
Type_A_r< OCP_DBL > SATNUM
Records the index of SAT region for each grid.
Type_A_r< OCP_DBL > ACTNUM
Records the index of Active region for each grid.
vector< OCP_DBL > poro
Porosity for each grid.
vector< OCP_DBL > dy
Size along the y - direction for each grid.
vector< OCP_DBL > permX
Permeability along the x - direction for each grid.
vector< OCP_DBL > permZ
Permeability along the z-direction for each grid.
vector< OCP_DBL > dx
Size along the x - direction for each grid.
vector< OCP_DBL > tops
Depth of the top surface of the uppermost grids.
Type_A_r< OCP_DBL > PVTNUM
Records the index of PVT region for each grid.
vector< OCP_DBL > ntg
Net to gross for each grid.
vector< OCP_DBL > thconr
Rock ifThermal conductivity.
vector< OCP_DBL > coord
TODO: Add Doxygen.
Dimens dimens
Dimension of grid: the number of grids along x,y,z direction.
Type_A_r< OCP_DBL > ROCKNUM
Records the index of ROCK region for each grid.
vector< OCP_DBL > dz
Size along the z - direction for each grid.
vector< OCP_DBL > Swat
Initial water saturation in each grid.
OCP_USI numGrid
Num of grids.
OCP_BOOL activity
If OCP_FALSE, this param is not given.
vector< T > data
Data of param.