#include <wellinfo.h>
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 VecDouble & | getTransportBC () 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 |
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.
Definition at line 27 of file wellinfo.h.
00027 {FLUX,PRESSURE,SOURCE_INJ_RATE,SOURCE_FIXED_PRESSURE};
WellInfo::WellInfo | ( | Point3D | p1, | |
Point3D | p2, | |||
double | value, | |||
ConditionType | bcType | |||
) |
WellInfo::~WellInfo | ( | ) | [inline] |
Definition at line 35 of file wellinfo.h.
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.
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.
double WellInfo::getPressureBC | ( | ) | [inline] |
Definition at line 39 of file wellinfo.h.
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;}
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 |
bool WellInfo::isPointInWell | ( | const VecDouble & | p1 | ) | const |
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 29 of file wellinfo.h.
Definition at line 31 of file wellinfo.h.
double WellInfo::m_value |
Definition at line 30 of file wellinfo.h.
Definition at line 28 of file wellinfo.h.
Definition at line 28 of file wellinfo.h.