All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Opm::FlowBCManager Class Reference

This class manages a FlowBoundaryConditions struct in the sense that it encapsulates creation and destruction of the data structure. More...

#include <FlowBCManager.hpp>

Public Types

enum  Side {
  Xmin, Xmax, Ymin, Ymax,
  Zmin, Zmax
}
 Defines the canonical sides for logical cartesian grids.
 

Public Member Functions

 FlowBCManager ()
 Default constructor sets up empty boundary conditions. More...
 
 ~FlowBCManager ()
 Destructor.
 
void clear ()
 Remove all appended BCs. More...
 
void append (const FlowBCType type, const int face, const double value)
 Append a single boundary condition. More...
 
void pressureSide (const UnstructuredGrid &grid, const Side side, const double pressure)
 Add BC_PRESSURE boundary conditions to all faces on a given side. More...
 
void fluxSide (const UnstructuredGrid &grid, const Side side, const double flux)
 Add BC_FLUX_TOTVOL boundary conditions to all faces on a given side. More...
 
const FlowBoundaryConditionsc_bcs () const
 Access the managed boundary conditions. More...
 

Detailed Description

This class manages a FlowBoundaryConditions struct in the sense that it encapsulates creation and destruction of the data structure.

The resulting struct is available through the c_bcs() method.

Constructor & Destructor Documentation

Opm::FlowBCManager::FlowBCManager ( )

Default constructor sets up empty boundary conditions.

By convention, this is equivalent to all-noflow conditions.

Member Function Documentation

void Opm::FlowBCManager::append ( const FlowBCType  type,
const int  face,
const double  value 
)

Append a single boundary condition.

If the type is BC_NOFLOW the value argument is not used. If the type is BC_PRESSURE the value argument is a pressure value. If the type is BC_FLUX_TOTVOL the value argument is a total flux value (m^3/s). Note: unset boundary conditions are noflow by convention, so it is normally not necessary to explicitly append BC_NOFLOW conditions. However, it may make sense to do so if the bc will change during a simulation run. Note: if normal velocity bcs are desired, convert to fluxes by multiplying with face area.

const FlowBoundaryConditions * Opm::FlowBCManager::c_bcs ( ) const

Access the managed boundary conditions.

The method is named similarly to c_str() in std::string, to make it clear that we are returning a C-compatible struct.

void Opm::FlowBCManager::clear ( )

Remove all appended BCs.

By convention, BCs are now equivalent to all-noflow conditions.

void Opm::FlowBCManager::fluxSide ( const UnstructuredGrid &  grid,
const Side  side,
const double  flux 
)

Add BC_FLUX_TOTVOL boundary conditions to all faces on a given side.

The grid must have a logical cartesian structure, and grid faces must be tagged (i.e. grid.cell_facetag must be non-null). Only the set of faces adjacent to cells with minimum/maximum I/J/K coordinate (depending on side) are considered. The flux specified is taken to be the total flux through the side, each individual face receiving a part of the total flux in proportion to its area, so that all faces will have identical normal velocities.

void Opm::FlowBCManager::pressureSide ( const UnstructuredGrid &  grid,
const Side  side,
const double  pressure 
)

Add BC_PRESSURE boundary conditions to all faces on a given side.

The grid must have a logical cartesian structure, and grid faces must be tagged (i.e. grid.cell_facetag must be non-null). Only the set of faces adjacent to cells with minimum/maximum I/J/K coordinate (depending on side) are considered.


The documentation for this class was generated from the following files: