www.mooseframework.org
PeacemanBorehole.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #ifndef PEACEMANBOREHOLE_H
9 #define PEACEMANBOREHOLE_H
10 
11 // Moose Includes
12 #include "DiracKernel.h"
13 #include "Function.h"
14 #include "RichardsSumQuantity.h"
15 
16 class PeacemanBorehole;
17 
18 template <>
19 InputParameters validParams<PeacemanBorehole>();
20 
24 class PeacemanBorehole : public DiracKernel
25 {
26 public:
35  PeacemanBorehole(const InputParameters & parameters);
36 
37 private:
39  const Real _re_constant;
40 
42  const Real _well_constant;
43 
45  const Real _borehole_length;
46 
48  const RealVectorValue _borehole_direction;
49 
55  const std::string _point_file; // private
56 
57 protected:
65  Function & _character;
66 
68  const Real _p_bot;
69 
71  const RealVectorValue _unit_weight;
72 
79 
81  std::vector<Real> _rs;
82 
84  std::vector<Real> _xs;
85 
87  std::vector<Real> _ys;
88 
90  std::vector<Real> _zs;
91 
94 
96  std::vector<Real> _half_seg_len;
97 
99  std::vector<RealTensorValue> _rot_matrix;
100 
102  virtual void addPoints();
103 
105  bool parseNextLineReals(std::ifstream & ifs, std::vector<Real> & myvec);
106 
112  Real wellConstant(const RealTensorValue & perm,
113  const RealTensorValue & rot,
114  const Real & half_len,
115  const Elem * ele,
116  const Real & rad);
117 };
118 
119 #endif // PEACEMANBOREHOLE_H
const Real _well_constant
well constant
const RealVectorValue _borehole_direction
borehole direction. Note this is only used if there is only one borehole point
InputParameters validParams< PeacemanBorehole >()
Sums into _total This is used, for instance, to record the total mass flowing into a borehole...
const Real _re_constant
borehole constant
PeacemanBorehole(const InputParameters &parameters)
Creates a new PeacemanBorehole This reads the file containing the lines of the form radius x y z that...
Real wellConstant(const RealTensorValue &perm, const RealTensorValue &rot, const Real &half_len, const Elem *ele, const Real &rad)
Calculates Peaceman&#39;s form of the borehole well constant Z Chen, Y Zhang, Well flow models for variou...
std::vector< Real > _rs
radii of the borehole
bool parseNextLineReals(std::ifstream &ifs, std::vector< Real > &myvec)
reads a space-separated line of floats from ifs and puts in myvec
Approximates a borehole by a sequence of Dirac Points.
std::vector< Real > _xs
x points of the borehole
std::vector< Real > _ys
y points of the borehole
const RealVectorValue _unit_weight
unit weight of fluid in borehole (for calculating bottomhole pressure at each Dirac Point) ...
RichardsSumQuantity & _total_outflow_mass
This is used to hold the total fluid flowing into the borehole Hence, it is positive for production w...
const Real _p_bot
bottomhole pressure of borehole
const Real _borehole_length
borehole length. Note this is only used if there is only one borehole point
virtual void addPoints()
Add Dirac Points to the borehole.
const std::string _point_file
File defining the geometry of the borehole.
Point _bottom_point
the bottom point of the borehole (where bottom_pressure is defined)
std::vector< RealTensorValue > _rot_matrix
rotation matrix used in well_constant calculation
std::vector< Real > _half_seg_len
0.5*(length of polyline segments between points)
std::vector< Real > _zs
z points of borehole
Function & _character
If positive then the borehole acts as a sink (producion well) for porepressure > borehole pressure...