WellInfo Class Reference

#include <wellinfo.h>

Collaboration diagram for WellInfo:
Collaboration graph
[legend]

List of all members.

Public Types

enum  ConditionType { FLUX, PRESSURE, SOURCE_INJ_RATE, SOURCE_FIXED_PRESSURE }

Public Member Functions

 WellInfo (Point3D p1, Point3D p2, double value, ConditionType bcType)
 ~WellInfo ()
bool isPointInWell (const VecDouble &p1) const
bool isPointInWell (const Point3D &p1) const
double getInjRate ()
double getPressureBC ()
double getSourceInjRate ()
double getSourceFixedPressure ()
void adjustBoundaryWithGrid (const Point3D &DX)
bool isInnerCell (Point3D &p, Point3D &DX)
ConditionType getBCType ()
bool isSourceWell () const
const VecDoublegetTransportBC () const
void setTransportBC (const VecDouble &v)
double volume ()
double area ()

Public Attributes

Point3D P
Point3D Q
ConditionType m_bcType
double m_value
VecDouble m_transBC

Detailed Description

Store well information for a particular well. The wells specify boundary conditions that can be of three type

FLUX:= The wells are represented as holes in the mesh where we specify the Neumman conditions for the pressure system

PRESSURE:= The wells are represented as holes where we specify the Dirichlet boundary conditions for pressure For FLUX and PRESSURE, the wells have boundary conditions for the transport variables (Saturations, Concentrations, etc) SOURCE:= The well is represented as a source term inside, the region of the well. There are no holes in this case The conditions for the transport is specified using Fixed Values Conditions in all the region ocupied by the wells

Definition at line 24 of file wellinfo.h.


Member Enumeration Documentation

Enumerator:
FLUX 
PRESSURE 
SOURCE_INJ_RATE 
SOURCE_FIXED_PRESSURE 

Definition at line 27 of file wellinfo.h.


Constructor & Destructor Documentation

WellInfo::WellInfo ( Point3D  p1,
Point3D  p2,
double  value,
ConditionType  bcType 
)

Definition at line 3 of file wellinfo.cpp.

00004   :P(p1),Q(p2),m_bcType(bcType),m_value(value)
00005 {
00006   assert(p1[0] < p2[0] &&
00007          p1[1] < p2[1] &&
00008          p1[2] < p2[2]);
00009 }

WellInfo::~WellInfo (  )  [inline]

Definition at line 35 of file wellinfo.h.

00035 {}


Member Function Documentation

void WellInfo::adjustBoundaryWithGrid ( const Point3D DX  ) 

Definition at line 46 of file wellinfo.cpp.

00047 {
00048   double tol = NumericMethods::min(DX[0],DX[1],DX[2])/10.0;
00049   P[0] = floor(P[0]/DX[0])*DX[0];
00050   P[1] = floor(P[1]/DX[1])*DX[1];
00051   P[2] = floor(P[2]/DX[2])*DX[2];
00052 
00053   Q[0] = ceil(Q[0]/DX[0])*DX[0];
00054   Q[1] = ceil(Q[1]/DX[1])*DX[1];
00055   Q[2] = ceil(Q[2]/DX[2])*DX[2];
00056 
00057   //check if the well has at least one cell. If the user specifies a small
00058   //well region, than the well could have no cells, this is considered a
00059   //mistake, after wall if the user specified a well he wants that well
00060   //in the mesh, right ? So in that case we adjust the well
00061   //so it can contain at least one cell of the mesh
00062   if (NumericMethods::a_equal(P[0],Q[0],tol))
00063     Q[0] = P[0]+DX[0];
00064   if (NumericMethods::a_equal(P[1],Q[1],tol))
00065     Q[1] = P[1]+DX[1];
00066   if (NumericMethods::a_equal(P[2],Q[2],tol))
00067     Q[2] = P[2]+DX[2];
00068 
00069 }

double WellInfo::area (  ) 

Definition at line 36 of file wellinfo.cpp.

00037 {
00038   Point3D DX = Q;
00039   DX -=P;
00040 
00041   return 2*(DX[0]*DX[1] + DX[0]*DX[2] + DX[1]*DX[2]);
00042   
00043 }

ConditionType WellInfo::getBCType (  )  [inline]

Definition at line 44 of file wellinfo.h.

00044 {return m_bcType;}

double WellInfo::getInjRate (  )  [inline]

Definition at line 38 of file wellinfo.h.

00038 {assert(m_bcType==FLUX);return m_value;}

double WellInfo::getPressureBC (  )  [inline]

Definition at line 39 of file wellinfo.h.

00039 {assert(m_bcType==PRESSURE);return m_value;}

double WellInfo::getSourceFixedPressure (  )  [inline]

Definition at line 41 of file wellinfo.h.

00041 {assert(m_bcType==SOURCE_FIXED_PRESSURE);return m_value;}

double WellInfo::getSourceInjRate (  )  [inline]

Definition at line 40 of file wellinfo.h.

00040 {assert(m_bcType==SOURCE_INJ_RATE);return m_value;}

const VecDouble& WellInfo::getTransportBC (  )  const [inline]

Definition at line 46 of file wellinfo.h.

00046 {assert(isSourceWell());return m_transBC;}

bool WellInfo::isInnerCell ( Point3D p,
Point3D DX 
)

Definition at line 72 of file wellinfo.cpp.

00073 {
00074   if (!isPointInWell(cellCenter))
00075       return false;
00076 
00077   Point3D p = P;
00078   p+=DX;
00079 
00080   Point3D q = Q;
00081   q-=DX;
00082 
00083   if (p[0] >= q[0] || p[1] >= q[1] ||p[2] >= q[2]) 
00084   {
00085     return false;
00086   }
00087 
00088 
00089   return NumericMethods::isInCube(p,q,cellCenter);
00090 }

bool WellInfo::isPointInWell ( const Point3D p1  )  const

Definition at line 11 of file wellinfo.cpp.

00012 {
00013   return (p1[0] >= P[0] && p1[0] <= Q[0] &&
00014           p1[1] >= P[1] && p1[1] <= Q[1] &&
00015           p1[2] >= P[2] && p1[2] <= Q[2]);
00016           
00017 }

bool WellInfo::isPointInWell ( const VecDouble p1  )  const

Definition at line 18 of file wellinfo.cpp.

00019 {
00020   assert(p1.size() ==3);
00021   return (p1(0) >= P[0] && p1(0) <= Q[0] &&
00022           p1(1) >= P[1] && p1(1) <= Q[1] &&
00023           p1(2) >= P[2] && p1(2) <= Q[2]);
00024           
00025 }

bool WellInfo::isSourceWell (  )  const [inline]

Definition at line 45 of file wellinfo.h.

00045 {return m_bcType == SOURCE_INJ_RATE;}

void WellInfo::setTransportBC ( const VecDouble v  )  [inline]

Definition at line 47 of file wellinfo.h.

00047 {m_transBC=v;}

double WellInfo::volume (  ) 

Definition at line 28 of file wellinfo.cpp.

00029 {
00030   return fabs( (Q[0]-P[0])*(Q[1]-P[1])*(Q[2]-P[2]) );
00031 }


Member Data Documentation

Definition at line 29 of file wellinfo.h.

Definition at line 31 of file wellinfo.h.

Definition at line 30 of file wellinfo.h.

Definition at line 28 of file wellinfo.h.

Definition at line 28 of file wellinfo.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Sun Apr 8 23:13:33 2012 for CO2INJECTION by  doxygen 1.6.3