.. _spec_region_meth_sec: Special Region Definition Methods ========================================= Different methods are available in PFLOTRAN to define a space portion within the reservoir (volume, surface or point), depending on the type of grids. For structured grids the following methods are available: * :ref:`Surface REGION by lower and upper coordinates` * :ref:`Volume REGION by IJK coordinates` * :ref:`Boundary REGION by specifying face location` For unstructured_explcit grids only the following method is available * :ref:`REGIONs by external files` These methods are described one-by-one in the paragraphs below. .. _surf_region_coord_bounds_sec: Surface REGION by lower and upper coordinate bounds ------------------------------------------------------------- Surface regions can be defined once the upper and lower coordinates bounds are known. This method is only available for structured grids. Reservoir boundaries for structured grids, can be defined with the following instructions: :: REGION : specifies the region name COORDINATES : specify the minimum values for the x, y and z coordinates : specify the maximum values for the x, y and z coordinates END FACE : [WEST, EAST, SOUTH, NORTH, BOTTOM, TOP] END face_location indicate either be the west, east, south, north, bottom or top facets in the grid blocks intersected by the surface. The user must be sure that the surface defined by coordinates, and the face location identify an actual domain boundary, and not an internal surface. For example, when defining a boundary located at the west of the reservoir, the surface must have a constant x value, corresponding to the lower I logical coordinate bound, and use face_location=WEST. The example below shows the definition of a west boundary (or a portion of it) of a reservoir. :: REGION west COORDINATES 0.0 0.0 0.0 0.0 2000.0 120.0 / FACE WEST / .. _vol_region_coord_ijk_sec: Volume REGION by IJK coordinates ---------------------------------------------------- This method can be used when the IJK coordinates (I,J,K) of the reservoir portion to use to create a region are known. The method, which relies on IJK coordinates can be applied to structured grids only, using the ``BLOCK`` keyword as follows: :: REGION : specifies the region name BLOCK END I_min, I_max, J_min, J_max, K_min, K_max define the lower and upper bounds of the IJK coordinates that define the region. See example below: :: REGION inj1 BLOCK 1 28 10 15 1 6 END Note that this BLOCK definition of a region cannot be used with GRDECL files (which are unstructured in PFLOTRAN terminology). .. _boundary_region_face_sec: Boundary REGION by specifying face location ------------------------------------------------------- When using the structured grid type, and an entire side boundary is requested, the present method can be adopted using the ``CARTESIAN_BOUNDARY`` keyword, as follows: :: REGION : specifies the region name CARTESIAN_BOUNDARY : [WEST, EAST, SOUTH, NORTH, BOTTOM, TOP] END face_location can either be the west, east, south, north, bottom or top boundary of the reservoir. See example below: :: REGION south_boundary CARTESIAN_BOUNDARY SOUTH END Note that this ``BLOCK`` definition of a region cannot be used with GRDECL files (which are unstructured in PFLOTRAN terminology). .. _region_ext_file_sec: REGIONs by external files ------------------------------------ In the case of unstructured grids the regions can be conveniently defined using external files generated by other software packages. This applies to unstructured_explicit grids, to both volume and surface regions. :: REGION : specifies the region name FILE : specifies the name of the external file to load END The external file where the region is defined can be a list of cell ids or faces depending if the region is a volume, a surface or an array of points. See example below: :: REGION inj2 FILE inj2.txt END External file region may be used to generate two different type of regions: * Volume regions, i.e. group of grid blocks, which defines a portion of the reservoir where to apply source/sink terms or an observation, see Volume REGION defined by external files. * Surface regions, i.e. a group of cell facets, which define a reservoir boundary where to apply a boundary condition, see Surface REGION defined by external files. Volume REGION defined by external files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The file that defines a volume region is a list of natural ids, each identifying the id of the grid block as reported in the explicit unstructured grid. The file extension is .txt, and it does not have any header. An example is: :: REGION inj2 FILE volume_region.txt END An example for the file volume_region.txt above is: :: volume_region.txt: 34 36 45 56 Surface REGION defined by external files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The file that defines a surface region is a list of faces, each specifying the same id of the boundary cell the face is attached to, the face centroids coordantes, and the face area. The file has an header that specify the number of connections that describe the surface. It may be use to define a reservoir boundary where to apply a boundary condition. :: CONNECTIONS ....................... ..................... This type of file are usually generated using software able to select boundary cells. Below an example that show its use. Region definition: :: REGION east_boundary_region FILE east_boundary_region_file.txt END Contents of east_boundary_region_file.txt: :: CONNECTIONS 18117 27826 202.1343344 12099.998 -1690.488061 477.999283 37213 201.5764552 12099.998 -1691.66311 477.999283 46616 202.1343344 12099.998 -1692.878647 477.999283 Example of use in a BOUNDARY_CONDITION: :: BOUNDARY_CONDITION east_boundary_condition FLOW_CONDITION vertical_equilibration REGION east_boundary_region END