www.mooseframework.org
PeacemanBorehole.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 // Moose Includes
13 #include "DiracKernel.h"
14 #include "Function.h"
15 #include "RichardsSumQuantity.h"
16 
17 class PeacemanBorehole;
18 
19 template <>
20 InputParameters validParams<PeacemanBorehole>();
21 
25 class PeacemanBorehole : public DiracKernel
26 {
27 public:
36  PeacemanBorehole(const InputParameters & parameters);
37 
38 private:
40  const Real _re_constant;
41 
43  const Real _well_constant;
44 
46  const Real _borehole_length;
47 
49  const RealVectorValue _borehole_direction;
50 
56  const std::string _point_file; // private
57 
58 protected:
66  const Function & _character;
67 
69  const Real _p_bot;
70 
72  const RealVectorValue _unit_weight;
73 
80 
82  std::vector<Real> _rs;
83 
85  std::vector<Real> _xs;
86 
88  std::vector<Real> _ys;
89 
91  std::vector<Real> _zs;
92 
95 
97  std::vector<Real> _half_seg_len;
98 
100  std::vector<RealTensorValue> _rot_matrix;
101 
103  virtual void addPoints();
104 
106  bool parseNextLineReals(std::ifstream & ifs, std::vector<Real> & myvec);
107 
113  Real wellConstant(const RealTensorValue & perm,
114  const RealTensorValue & rot,
115  const Real & half_len,
116  const Elem * ele,
117  const Real & rad);
118 };
PeacemanBorehole::_zs
std::vector< Real > _zs
z points of borehole
Definition: PeacemanBorehole.h:91
PeacemanBorehole::parseNextLineReals
bool parseNextLineReals(std::ifstream &ifs, std::vector< Real > &myvec)
reads a space-separated line of floats from ifs and puts in myvec
Definition: PeacemanBorehole.C:158
PeacemanBorehole::_xs
std::vector< Real > _xs
x points of the borehole
Definition: PeacemanBorehole.h:85
PeacemanBorehole::_re_constant
const Real _re_constant
borehole constant
Definition: PeacemanBorehole.h:40
PeacemanBorehole::_rs
std::vector< Real > _rs
radii of the borehole
Definition: PeacemanBorehole.h:82
PeacemanBorehole::_p_bot
const Real _p_bot
bottomhole pressure of borehole
Definition: PeacemanBorehole.h:69
RichardsSumQuantity.h
PeacemanBorehole::wellConstant
Real wellConstant(const RealTensorValue &perm, const RealTensorValue &rot, const Real &half_len, const Elem *ele, const Real &rad)
Calculates Peaceman's form of the borehole well constant Z Chen, Y Zhang, Well flow models for variou...
Definition: PeacemanBorehole.C:194
PeacemanBorehole::_rot_matrix
std::vector< RealTensorValue > _rot_matrix
rotation matrix used in well_constant calculation
Definition: PeacemanBorehole.h:100
PeacemanBorehole::_bottom_point
Point _bottom_point
the bottom point of the borehole (where bottom_pressure is defined)
Definition: PeacemanBorehole.h:94
validParams< PeacemanBorehole >
InputParameters validParams< PeacemanBorehole >()
Definition: PeacemanBorehole.C:17
PeacemanBorehole
Approximates a borehole by a sequence of Dirac Points.
Definition: PeacemanBorehole.h:25
PeacemanBorehole::_half_seg_len
std::vector< Real > _half_seg_len
0.5*(length of polyline segments between points)
Definition: PeacemanBorehole.h:97
PeacemanBorehole::_ys
std::vector< Real > _ys
y points of the borehole
Definition: PeacemanBorehole.h:88
PeacemanBorehole::addPoints
virtual void addPoints()
Add Dirac Points to the borehole.
Definition: PeacemanBorehole.C:180
PeacemanBorehole::_well_constant
const Real _well_constant
well constant
Definition: PeacemanBorehole.h:43
PeacemanBorehole::_borehole_direction
const RealVectorValue _borehole_direction
borehole direction. Note this is only used if there is only one borehole point
Definition: PeacemanBorehole.h:49
PeacemanBorehole::_total_outflow_mass
RichardsSumQuantity & _total_outflow_mass
This is used to hold the total fluid flowing into the borehole Hence, it is positive for production w...
Definition: PeacemanBorehole.h:79
PeacemanBorehole::_character
const Function & _character
If positive then the borehole acts as a sink (producion well) for porepressure > borehole pressure,...
Definition: PeacemanBorehole.h:66
PeacemanBorehole::_unit_weight
const RealVectorValue _unit_weight
unit weight of fluid in borehole (for calculating bottomhole pressure at each Dirac Point)
Definition: PeacemanBorehole.h:72
PeacemanBorehole::PeacemanBorehole
PeacemanBorehole(const InputParameters &parameters)
Creates a new PeacemanBorehole This reads the file containing the lines of the form radius x y z that...
Definition: PeacemanBorehole.C:80
RichardsSumQuantity
Sums into _total This is used, for instance, to record the total mass flowing into a borehole.
Definition: RichardsSumQuantity.h:26
PeacemanBorehole::_point_file
const std::string _point_file
File defining the geometry of the borehole.
Definition: PeacemanBorehole.h:56
PeacemanBorehole::_borehole_length
const Real _borehole_length
borehole length. Note this is only used if there is only one borehole point
Definition: PeacemanBorehole.h:46