MeshHoleInfo Class Reference

#include <meshholeinfo.h>

List of all members.

Public Member Functions

 MeshHoleInfo (double pwx, double pwz, double pwy1, double pwy2)
bool isCellInHole (Point3D &p1, Point3D &p2) const
bool isPointInViscinity (const Point3D &p1, const Point3D &rad) const
double getNormalVelocityFromInjectionRate (double inj, const Point3D &DX)

Public Attributes

double wx
double wz
double wy1
double wy2

Detailed Description

MeshHoleInfo

Definition at line 10 of file meshholeinfo.h.


Constructor & Destructor Documentation

MeshHoleInfo::MeshHoleInfo ( double  pwx,
double  pwz,
double  pwy1,
double  pwy2 
)

Definition at line 3 of file meshholeinfo.cpp.

00003                                                                        {
00004     assert(pwy2 >  pwy1);
00005     wx = pwx;
00006     wz = pwz;
00007     wy1 = pwy1;
00008     wy2 = pwy2;
00009   }


Member Function Documentation

double MeshHoleInfo::getNormalVelocityFromInjectionRate ( double  inj,
const Point3D DX 
)

Definition at line 50 of file meshholeinfo.cpp.

00051 {
00052   double dX=DX[X],dY=DX[Y],dZ=DX[Z];
00053   double totalArea = (floor(wy2/dY) - floor(wy1/dY) + 1)*(2*dZ*dY + 2*dX*dY); 
00054   totalArea+=2*dX*dZ;
00055   return inj/totalArea;
00056 }

bool MeshHoleInfo::isCellInHole ( Point3D p1,
Point3D p2 
) const

Definition at line 12 of file meshholeinfo.cpp.

00013 {
00014   assert(p1[X] < p2[X]);
00015   assert(p1[Y] < p2[Y]);
00016   assert(p1[Z] < p2[Z]);
00017   /*  if ((wx > p1[X]) && (wx < p2[X]) && (wz > p1[Z]) && (wz < p2[Z]))
00018   {
00019     printf("XZ matches");
00020     if ( (p1[Y] > wy2) || (p2[Y] < wy2))
00021       printf("but Y dont");
00022     else
00023       printf("and Y too");
00024       }*/
00025     
00026   return ( (wx > p1[X]) && (wx <= p2[X]) &&
00027            (wz > p1[Z]) && (wz <= p2[Z]) &&
00028            !( (p1[Y] > wy2) || (p2[Y] < wy2))); 
00029 
00030     
00031 }

bool MeshHoleInfo::isPointInViscinity ( const Point3D p,
const Point3D rad 
) const

Check if a point is in the viscinity of the hole

Parameters:
p The point to be checked
rad This is the radius in each dimension where the area around the well is considered a viscinity. Actually the well is represented geometrically by a line. So the viscinity of the well is a parallelogram with center given by this line and radius in each dimension given by this parameter.
Returns:

Definition at line 42 of file meshholeinfo.cpp.

00043 {
00044   return (fabs(p[X] - wx) < rad[X]) &&  (fabs(p[Z] - wz) < rad[Z]) &&
00045     (p[Y] > (wy1 - rad[Y])) && (p[Y] < ( wy2 + rad[Y]));
00046     
00047 }


Member Data Documentation

Definition at line 17 of file meshholeinfo.h.

Definition at line 17 of file meshholeinfo.h.

Definition at line 17 of file meshholeinfo.h.

Definition at line 17 of file meshholeinfo.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:17 2012 for CO2INJECTION by  doxygen 1.6.3