Approximates a borehole by a sequence of Dirac Points. More...
#include <Q2PBorehole.h>
Public Member Functions | |
Q2PBorehole (const InputParameters ¶meters) | |
Creates a new Q2PBorehole This sets all the variables, but also reads the file containing the lines of the form radius x y z that defines the borehole geometry. More... | |
virtual void | computeResidual () |
Computes the residual. More... | |
virtual Real | computeQpResidual () |
Computes the Qp residual. More... | |
virtual void | computeJacobian () |
Computes the Jacobian. More... | |
virtual Real | computeQpJacobian () |
Computes the diagonal part of the jacobian. More... | |
virtual Real | computeQpOffDiagJacobian (unsigned int jvar) |
Computes the off-diagonal part of the jacobian. More... | |
Protected Member Functions | |
void | prepareNodalValues () |
calculates the nodal values of pressure, mobility, and derivatives thereof More... | |
Real | jac (unsigned int jvar) |
Calculates Jacobian. More... | |
virtual void | addPoints () |
Add Dirac Points to the borehole. More... | |
bool | parseNextLineReals (std::ifstream &ifs, std::vector< Real > &myvec) |
reads a space-separated line of floats from ifs and puts in myvec More... | |
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 various numerical methods, Int J Num Analysis and Modeling, 3 (2008) 375-388. More... | |
Protected Attributes | |
const RichardsDensity & | _density |
fluid density More... | |
const RichardsRelPerm & | _relperm |
fluid relative permeability More... | |
const VariableValue & | _other_var_nodal |
the other variable in the 2-phase system (this is saturation if Variable=porepressure, and viceversa) More... | |
const unsigned int | _other_var_num |
the variable number of the other variable More... | |
const bool | _var_is_pp |
whether the Variable for this BC is porepressure or not More... | |
const Real | _viscosity |
viscosity More... | |
const MaterialProperty< RealTensorValue > & | _permeability |
permeability More... | |
unsigned int | _num_nodes |
number of nodes in this element. More... | |
std::vector< Real > | _pp |
nodal porepressure More... | |
std::vector< Real > | _sat |
nodal saturation More... | |
std::vector< Real > | _mobility |
nodal mobility More... | |
std::vector< Real > | _dmobility_dp |
nodal d(mobility)/d(porepressure) More... | |
std::vector< Real > | _dmobility_ds |
nodal d(mobility)/d(saturation) More... | |
const Function & | _character |
If positive then the borehole acts as a sink (producion well) for porepressure > borehole pressure, and does nothing otherwise If negative then the borehole acts as a source (injection well) for porepressure < borehole pressure, and does nothing otherwise The flow rate to/from the borehole is multiplied by |character|, so usually character = +/- 1. More... | |
const Real | _p_bot |
bottomhole pressure of borehole More... | |
const RealVectorValue | _unit_weight |
unit weight of fluid in borehole (for calculating bottomhole pressure at each Dirac Point) More... | |
RichardsSumQuantity & | _total_outflow_mass |
This is used to hold the total fluid flowing into the borehole Hence, it is positive for production wells where fluid is flowing from porespace into the borehole and removed from the model. More... | |
std::vector< Real > | _rs |
radii of the borehole More... | |
std::vector< Real > | _xs |
x points of the borehole More... | |
std::vector< Real > | _ys |
y points of the borehole More... | |
std::vector< Real > | _zs |
z points of borehole More... | |
Point | _bottom_point |
the bottom point of the borehole (where bottom_pressure is defined) More... | |
std::vector< Real > | _half_seg_len |
0.5*(length of polyline segments between points) More... | |
std::vector< RealTensorValue > | _rot_matrix |
rotation matrix used in well_constant calculation More... | |
Private Attributes | |
const Real | _re_constant |
borehole constant More... | |
const Real | _well_constant |
well constant More... | |
const Real | _borehole_length |
borehole length. Note this is only used if there is only one borehole point More... | |
const RealVectorValue | _borehole_direction |
borehole direction. Note this is only used if there is only one borehole point More... | |
const std::string | _point_file |
File defining the geometry of the borehole. More... | |
Approximates a borehole by a sequence of Dirac Points.
This is for use by a Q2P model.
Definition at line 26 of file Q2PBorehole.h.
Q2PBorehole::Q2PBorehole | ( | const InputParameters & | parameters | ) |
Creates a new Q2PBorehole This sets all the variables, but also reads the file containing the lines of the form radius x y z that defines the borehole geometry.
It also calculates segment-lengths and rotation matrices needed for computing the borehole well constant
Definition at line 44 of file Q2PBorehole.C.
|
protectedvirtualinherited |
|
virtual |
Computes the Jacobian.
This just calls prepareNodalValues then calls DiracKernel::computeJacobian
Definition at line 171 of file Q2PBorehole.C.
|
virtual |
Computes the diagonal part of the jacobian.
Definition at line 178 of file Q2PBorehole.C.
|
virtual |
|
virtual |
|
virtual |
Computes the residual.
This just calls prepareNodalValues then calls DiracKernel::computeResidual
Definition at line 107 of file Q2PBorehole.C.
|
protected |
Calculates Jacobian.
jvar | differentiate the residual wrt this variable |
Definition at line 192 of file Q2PBorehole.C.
Referenced by computeQpJacobian(), and computeQpOffDiagJacobian().
|
protectedinherited |
reads a space-separated line of floats from ifs and puts in myvec
Definition at line 158 of file PeacemanBorehole.C.
Referenced by PeacemanBorehole::PeacemanBorehole().
|
protected |
calculates the nodal values of pressure, mobility, and derivatives thereof
Definition at line 63 of file Q2PBorehole.C.
Referenced by computeJacobian(), and computeResidual().
|
protectedinherited |
Calculates Peaceman's form of the borehole well constant Z Chen, Y Zhang, Well flow models for various numerical methods, Int J Num Analysis and Modeling, 3 (2008) 375-388.
Definition at line 194 of file PeacemanBorehole.C.
Referenced by computeQpResidual(), RichardsBorehole::computeQpResidual(), jac(), and RichardsBorehole::jac().
|
privateinherited |
borehole direction. Note this is only used if there is only one borehole point
Definition at line 49 of file PeacemanBorehole.h.
Referenced by PeacemanBorehole::PeacemanBorehole().
|
privateinherited |
borehole length. Note this is only used if there is only one borehole point
Definition at line 46 of file PeacemanBorehole.h.
Referenced by PeacemanBorehole::PeacemanBorehole().
|
protectedinherited |
the bottom point of the borehole (where bottom_pressure is defined)
Definition at line 94 of file PeacemanBorehole.h.
Referenced by computeQpResidual(), RichardsBorehole::computeQpResidual(), jac(), RichardsBorehole::jac(), and PeacemanBorehole::PeacemanBorehole().
|
protectedinherited |
If positive then the borehole acts as a sink (producion well) for porepressure > borehole pressure, and does nothing otherwise If negative then the borehole acts as a source (injection well) for porepressure < borehole pressure, and does nothing otherwise The flow rate to/from the borehole is multiplied by |character|, so usually character = +/- 1.
Definition at line 66 of file PeacemanBorehole.h.
Referenced by RichardsBorehole::computeQpJacobian(), computeQpResidual(), RichardsBorehole::computeQpResidual(), jac(), and RichardsBorehole::jac().
|
protected |
|
protected |
nodal d(mobility)/d(porepressure)
Definition at line 104 of file Q2PBorehole.h.
Referenced by jac(), and prepareNodalValues().
|
protected |
nodal d(mobility)/d(saturation)
Definition at line 107 of file Q2PBorehole.h.
Referenced by jac(), and prepareNodalValues().
|
protectedinherited |
0.5*(length of polyline segments between points)
Definition at line 97 of file PeacemanBorehole.h.
Referenced by computeQpResidual(), RichardsBorehole::computeQpResidual(), jac(), RichardsBorehole::jac(), and PeacemanBorehole::PeacemanBorehole().
|
protected |
nodal mobility
Definition at line 101 of file Q2PBorehole.h.
Referenced by computeQpResidual(), jac(), and prepareNodalValues().
|
protected |
number of nodes in this element.
Definition at line 92 of file Q2PBorehole.h.
Referenced by prepareNodalValues().
|
protected |
the other variable in the 2-phase system (this is saturation if Variable=porepressure, and viceversa)
Definition at line 77 of file Q2PBorehole.h.
Referenced by prepareNodalValues().
|
protected |
the variable number of the other variable
Definition at line 80 of file Q2PBorehole.h.
Referenced by computeQpOffDiagJacobian(), and jac().
|
protectedinherited |
bottomhole pressure of borehole
Definition at line 69 of file PeacemanBorehole.h.
Referenced by computeQpResidual(), RichardsBorehole::computeQpResidual(), jac(), and RichardsBorehole::jac().
|
protected |
permeability
Definition at line 89 of file Q2PBorehole.h.
Referenced by computeQpResidual(), and jac().
|
privateinherited |
File defining the geometry of the borehole.
Each row has format radius x y z and the list of such points defines a polyline that is the borehole
Definition at line 56 of file PeacemanBorehole.h.
Referenced by PeacemanBorehole::PeacemanBorehole().
|
protected |
nodal porepressure
Definition at line 95 of file Q2PBorehole.h.
Referenced by computeQpResidual(), jac(), and prepareNodalValues().
|
privateinherited |
borehole constant
Definition at line 40 of file PeacemanBorehole.h.
Referenced by PeacemanBorehole::wellConstant().
|
protected |
fluid relative permeability
Definition at line 74 of file Q2PBorehole.h.
Referenced by prepareNodalValues().
|
protectedinherited |
rotation matrix used in well_constant calculation
Definition at line 100 of file PeacemanBorehole.h.
Referenced by computeQpResidual(), RichardsBorehole::computeQpResidual(), jac(), RichardsBorehole::jac(), and PeacemanBorehole::PeacemanBorehole().
|
protectedinherited |
radii of the borehole
Definition at line 82 of file PeacemanBorehole.h.
Referenced by computeQpResidual(), RichardsBorehole::computeQpResidual(), jac(), RichardsBorehole::jac(), and PeacemanBorehole::PeacemanBorehole().
|
protected |
|
protectedinherited |
This is used to hold the total fluid flowing into the borehole Hence, it is positive for production wells where fluid is flowing from porespace into the borehole and removed from the model.
Definition at line 79 of file PeacemanBorehole.h.
Referenced by PeacemanBorehole::addPoints(), computeQpResidual(), RichardsBorehole::computeQpResidual(), and PeacemanBorehole::PeacemanBorehole().
|
protectedinherited |
unit weight of fluid in borehole (for calculating bottomhole pressure at each Dirac Point)
Definition at line 72 of file PeacemanBorehole.h.
Referenced by computeQpResidual(), RichardsBorehole::computeQpResidual(), jac(), and RichardsBorehole::jac().
|
protected |
whether the Variable for this BC is porepressure or not
Definition at line 83 of file Q2PBorehole.h.
Referenced by jac(), and prepareNodalValues().
|
protected |
|
privateinherited |
well constant
Definition at line 43 of file PeacemanBorehole.h.
Referenced by PeacemanBorehole::wellConstant().
|
protectedinherited |
x points of the borehole
Definition at line 85 of file PeacemanBorehole.h.
Referenced by PeacemanBorehole::addPoints(), and PeacemanBorehole::PeacemanBorehole().
|
protectedinherited |
y points of the borehole
Definition at line 88 of file PeacemanBorehole.h.
Referenced by PeacemanBorehole::addPoints(), and PeacemanBorehole::PeacemanBorehole().
|
protectedinherited |
z points of borehole
Definition at line 91 of file PeacemanBorehole.h.
Referenced by PeacemanBorehole::addPoints(), computeQpResidual(), RichardsBorehole::computeQpResidual(), jac(), RichardsBorehole::jac(), and PeacemanBorehole::PeacemanBorehole().