Approximates a borehole by a sequence of Dirac Points. More...
#include <PorousFlowPeacemanBorehole.h>
Public Member Functions | |
PorousFlowPeacemanBorehole (const InputParameters ¶meters) | |
Creates a new PorousFlowPeacemanBorehole This reads the file containing the lines of the form radius x y z that defines the borehole geometry. More... | |
Protected Types | |
enum | PorTchoice { PorTchoice::pressure, PorTchoice::temperature } |
whether the flux is a function of pressure or temperature More... | |
Protected Member Functions | |
Real | wellConstant (const RealTensorValue &perm, const RealTensorValue &rot, const Real &half_len, const Elem *ele, const Real &rad) const |
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... | |
Real | computeQpBaseOutflow (unsigned current_dirac_ptid) const override |
Returns the flux from the line sink (before modification by mobility, etc). Derived classes should override this. More... | |
void | computeQpBaseOutflowJacobian (unsigned jvar, unsigned current_dirac_ptid, Real &outflow, Real &outflowp) const override |
Calculates the BaseOutflow as well as its derivative wrt jvar. Derived classes should override this. More... | |
virtual Real | computeQpResidual () override |
virtual Real | computeQpJacobian () override |
virtual Real | computeQpOffDiagJacobian (unsigned int jvar) override |
virtual void | addPoints () override |
Add Dirac Points to the borehole. More... | |
Real | jac (unsigned int jvar) |
Jacobian contribution for the derivative wrt the variable jvar. More... | |
Real | ptqp () const |
If _p_or_t==0, then returns the quadpoint porepressure, else returns the quadpoint temperature. More... | |
Real | dptqp (unsigned pvar) const |
If _p_or_t==0, then returns d(quadpoint porepressure)/d(PorousFlow variable), else returns d(quadpoint temperature)/d(PorousFlow variable) More... | |
bool | parseNextLineReals (std::ifstream &ifs, std::vector< Real > &myvec) |
Reads a space-separated line of floats from ifs and puts in myvec. More... | |
Protected Attributes | |
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... | |
const Real | _re_constant |
Borehole constant. More... | |
const Real | _well_constant |
Well constant. More... | |
const bool | _has_permeability |
Whether there is a quadpoint permeability material (for error checking) More... | |
const bool | _has_thermal_conductivity |
Whether there is a quadpoint thermal conductivity material (for error checking) More... | |
const MaterialProperty< RealTensorValue > & | _perm_or_cond |
Permeability or conductivity of porous material. More... | |
const MaterialProperty< std::vector< RealTensorValue > > & | _dperm_or_cond_dvar |
d(Permeability)/d(PorousFlow variable) More... | |
std::vector< RealTensorValue > | _rot_matrix |
Rotation matrix used in well_constant calculation. More... | |
const PorousFlowDictator & | _dictator |
PorousFlowDictator UserObject. More... | |
PorousFlowSumQuantity & | _total_outflow_mass |
This is used to hold the total fluid flowing into the line sink for each time step. More... | |
const bool | _has_porepressure |
Whether a quadpoint porepressure material exists (for error checking) More... | |
const bool | _has_temperature |
Whether a quadpoint temperature material exists (for error checking) More... | |
const bool | _has_mass_fraction |
Whether a mass_fraction material exists (for error checking) More... | |
const bool | _has_relative_permeability |
Whether a relative permeability material exists (for error checking) More... | |
const bool | _has_mobility |
Whether enough materials exist to form the mobility (for error checking) More... | |
const bool | _has_enthalpy |
Whether an enthalpy material exists (for error checking) More... | |
const bool | _has_internal_energy |
Whether an internal-energy material exists (for error checking) More... | |
enum PorousFlowLineSink::PorTchoice | _p_or_t |
const bool | _use_mass_fraction |
Whether the flux will be multiplied by the mass fraction. More... | |
const bool | _use_relative_permeability |
Whether the flux will be multiplied by the relative permeability. More... | |
const bool | _use_mobility |
Whether the flux will be multiplied by the mobility. More... | |
const bool | _use_enthalpy |
Whether the flux will be multiplied by the enthalpy. More... | |
const bool | _use_internal_energy |
Whether the flux will be multiplied by the internal-energy. More... | |
const unsigned int | _ph |
The phase number. More... | |
const unsigned int | _sp |
The component number (only used if _use_mass_fraction==true) More... | |
const MaterialProperty< std::vector< Real > > *const | _pp |
Quadpoint pore pressure in each phase. More... | |
const MaterialProperty< std::vector< std::vector< Real > > > *const | _dpp_dvar |
d(quadpoint pore pressure in each phase)/d(PorousFlow variable) More... | |
const MaterialProperty< Real > *const | _temperature |
Quadpoint temperature. More... | |
const MaterialProperty< std::vector< Real > > *const | _dtemperature_dvar |
d(quadpoint temperature)/d(PorousFlow variable) More... | |
const MaterialProperty< std::vector< Real > > *const | _fluid_density_node |
Fluid density for each phase (at the node) More... | |
const MaterialProperty< std::vector< std::vector< Real > > > *const | _dfluid_density_node_dvar |
d(Fluid density for each phase (at the node))/d(PorousFlow variable) More... | |
const MaterialProperty< std::vector< Real > > *const | _fluid_viscosity |
Viscosity of each component in each phase. More... | |
const MaterialProperty< std::vector< std::vector< Real > > > *const | _dfluid_viscosity_dvar |
d(Viscosity of each component in each phase)/d(PorousFlow variable) More... | |
const MaterialProperty< std::vector< Real > > *const | _relative_permeability |
Relative permeability of each phase. More... | |
const MaterialProperty< std::vector< std::vector< Real > > > *const | _drelative_permeability_dvar |
d(Relative permeability of each phase)/d(PorousFlow variable) More... | |
const MaterialProperty< std::vector< std::vector< Real > > > *const | _mass_fractions |
Mass fraction of each component in each phase. More... | |
const MaterialProperty< std::vector< std::vector< std::vector< Real > > > > *const | _dmass_fractions_dvar |
d(Mass fraction of each component in each phase)/d(PorousFlow variable) More... | |
const MaterialProperty< std::vector< Real > > *const | _enthalpy |
Enthalpy of each phase. More... | |
const MaterialProperty< std::vector< std::vector< Real > > > *const | _denthalpy_dvar |
d(enthalpy of each phase)/d(PorousFlow variable) More... | |
const MaterialProperty< std::vector< Real > > *const | _internal_energy |
Internal_Energy of each phase. More... | |
const MaterialProperty< std::vector< std::vector< Real > > > *const | _dinternal_energy_dvar |
d(internal_energy of each phase)/d(PorousFlow variable) More... | |
const Real | _line_length |
Line length. This is only used if there is only one borehole point. More... | |
const RealVectorValue | _line_direction |
Line direction. 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... | |
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... | |
Approximates a borehole by a sequence of Dirac Points.
Definition at line 22 of file PorousFlowPeacemanBorehole.h.
|
strongprotectedinherited |
whether the flux is a function of pressure or temperature
Enumerator | |
---|---|
pressure | |
temperature |
Definition at line 91 of file PorousFlowLineSink.h.
PorousFlowPeacemanBorehole::PorousFlowPeacemanBorehole | ( | const InputParameters & | parameters | ) |
Creates a new PorousFlowPeacemanBorehole This 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 69 of file PorousFlowPeacemanBorehole.C.
|
overrideprotectedvirtualinherited |
Add Dirac Points to the borehole.
Reimplemented from PorousFlowLineGeometry.
Definition at line 217 of file PorousFlowLineSink.C.
|
overrideprotectedvirtual |
Returns the flux from the line sink (before modification by mobility, etc). Derived classes should override this.
Implements PorousFlowLineSink.
Definition at line 216 of file PorousFlowPeacemanBorehole.C.
|
overrideprotectedvirtual |
Calculates the BaseOutflow as well as its derivative wrt jvar. Derived classes should override this.
Implements PorousFlowLineSink.
Definition at line 262 of file PorousFlowPeacemanBorehole.C.
|
overrideprotectedvirtualinherited |
Definition at line 258 of file PorousFlowLineSink.C.
|
overrideprotectedvirtualinherited |
Definition at line 264 of file PorousFlowLineSink.C.
|
overrideprotectedvirtualinherited |
Definition at line 227 of file PorousFlowLineSink.C.
|
protectedinherited |
If _p_or_t==0, then returns d(quadpoint porepressure)/d(PorousFlow variable), else returns d(quadpoint temperature)/d(PorousFlow variable)
pvar | The PorousFlow variable number |
Definition at line 341 of file PorousFlowLineSink.C.
Referenced by PorousFlowPolyLineSink::computeQpBaseOutflowJacobian(), and computeQpBaseOutflowJacobian().
|
protectedinherited |
Jacobian contribution for the derivative wrt the variable jvar.
Definition at line 270 of file PorousFlowLineSink.C.
Referenced by PorousFlowLineSink::computeQpJacobian(), and PorousFlowLineSink::computeQpOffDiagJacobian().
|
protectedinherited |
Reads a space-separated line of floats from ifs and puts in myvec.
Definition at line 103 of file PorousFlowLineGeometry.C.
Referenced by PorousFlowLineGeometry::PorousFlowLineGeometry().
|
protectedinherited |
If _p_or_t==0, then returns the quadpoint porepressure, else returns the quadpoint temperature.
Definition at line 335 of file PorousFlowLineSink.C.
Referenced by PorousFlowPolyLineSink::computeQpBaseOutflow(), computeQpBaseOutflow(), PorousFlowPolyLineSink::computeQpBaseOutflowJacobian(), and computeQpBaseOutflowJacobian().
|
protected |
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 112 of file PorousFlowPeacemanBorehole.C.
Referenced by computeQpBaseOutflow(), and computeQpBaseOutflowJacobian().
|
protectedinherited |
The bottom point of the borehole (where bottom_pressure is defined)
Definition at line 61 of file PorousFlowLineGeometry.h.
Referenced by computeQpBaseOutflow(), computeQpBaseOutflowJacobian(), and PorousFlowLineGeometry::PorousFlowLineGeometry().
|
protected |
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 43 of file PorousFlowPeacemanBorehole.h.
Referenced by computeQpBaseOutflow(), and computeQpBaseOutflowJacobian().
|
protectedinherited |
d(enthalpy of each phase)/d(PorousFlow variable)
Definition at line 154 of file PorousFlowLineSink.h.
|
protectedinherited |
d(Fluid density for each phase (at the node))/d(PorousFlow variable)
Definition at line 130 of file PorousFlowLineSink.h.
|
protectedinherited |
d(Viscosity of each component in each phase)/d(PorousFlow variable)
Definition at line 136 of file PorousFlowLineSink.h.
|
protectedinherited |
PorousFlowDictator UserObject.
Definition at line 60 of file PorousFlowLineSink.h.
Referenced by PorousFlowPolyLineSink::computeQpBaseOutflowJacobian(), computeQpBaseOutflowJacobian(), PorousFlowLineSink::jac(), and PorousFlowLineSink::PorousFlowLineSink().
|
protectedinherited |
d(internal_energy of each phase)/d(PorousFlow variable)
Definition at line 160 of file PorousFlowLineSink.h.
|
protectedinherited |
d(Mass fraction of each component in each phase)/d(PorousFlow variable)
Definition at line 148 of file PorousFlowLineSink.h.
|
protected |
d(Permeability)/d(PorousFlow variable)
Definition at line 67 of file PorousFlowPeacemanBorehole.h.
|
protectedinherited |
d(quadpoint pore pressure in each phase)/d(PorousFlow variable)
Definition at line 118 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::dptqp().
|
protectedinherited |
d(Relative permeability of each phase)/d(PorousFlow variable)
Definition at line 142 of file PorousFlowLineSink.h.
|
protectedinherited |
d(quadpoint temperature)/d(PorousFlow variable)
Definition at line 124 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::dptqp().
|
protectedinherited |
Enthalpy of each phase.
Definition at line 151 of file PorousFlowLineSink.h.
|
protectedinherited |
Fluid density for each phase (at the node)
Definition at line 127 of file PorousFlowLineSink.h.
|
protectedinherited |
Viscosity of each component in each phase.
Definition at line 133 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::jac().
|
protectedinherited |
0.5*(length of polyline segments between points)
Definition at line 64 of file PorousFlowLineGeometry.h.
Referenced by PorousFlowPolyLineSink::computeQpBaseOutflow(), computeQpBaseOutflow(), PorousFlowPolyLineSink::computeQpBaseOutflowJacobian(), computeQpBaseOutflowJacobian(), and PorousFlowLineGeometry::PorousFlowLineGeometry().
|
protectedinherited |
Whether an enthalpy material exists (for error checking)
Definition at line 85 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::PorousFlowLineSink().
|
protectedinherited |
Whether an internal-energy material exists (for error checking)
Definition at line 88 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::PorousFlowLineSink().
|
protectedinherited |
Whether a mass_fraction material exists (for error checking)
Definition at line 76 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::PorousFlowLineSink().
|
protectedinherited |
Whether enough materials exist to form the mobility (for error checking)
Definition at line 82 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::PorousFlowLineSink().
|
protected |
Whether there is a quadpoint permeability material (for error checking)
Definition at line 58 of file PorousFlowPeacemanBorehole.h.
Referenced by PorousFlowPeacemanBorehole().
|
protectedinherited |
Whether a quadpoint porepressure material exists (for error checking)
Definition at line 70 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::PorousFlowLineSink().
|
protectedinherited |
Whether a relative permeability material exists (for error checking)
Definition at line 79 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::PorousFlowLineSink().
|
protectedinherited |
Whether a quadpoint temperature material exists (for error checking)
Definition at line 73 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::PorousFlowLineSink().
|
protected |
Whether there is a quadpoint thermal conductivity material (for error checking)
Definition at line 61 of file PorousFlowPeacemanBorehole.h.
Referenced by PorousFlowPeacemanBorehole().
|
protectedinherited |
Internal_Energy of each phase.
Definition at line 157 of file PorousFlowLineSink.h.
|
protectedinherited |
Line direction. This is only used if there is only one borehole point.
Definition at line 39 of file PorousFlowLineGeometry.h.
Referenced by PorousFlowPeacemanBorehole().
|
protectedinherited |
Line length. This is only used if there is only one borehole point.
Definition at line 36 of file PorousFlowLineGeometry.h.
Referenced by PorousFlowLineGeometry::PorousFlowLineGeometry().
|
protectedinherited |
Mass fraction of each component in each phase.
Definition at line 145 of file PorousFlowLineSink.h.
|
protected |
Bottomhole pressure of borehole.
Definition at line 46 of file PorousFlowPeacemanBorehole.h.
Referenced by computeQpBaseOutflow(), and computeQpBaseOutflowJacobian().
|
protectedinherited |
|
protected |
Permeability or conductivity of porous material.
Definition at line 64 of file PorousFlowPeacemanBorehole.h.
Referenced by computeQpBaseOutflow(), and computeQpBaseOutflowJacobian().
|
protectedinherited |
The phase number.
Definition at line 109 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::computeQpResidual(), PorousFlowLineSink::dptqp(), PorousFlowLineSink::jac(), PorousFlowLineSink::PorousFlowLineSink(), and PorousFlowLineSink::ptqp().
|
protectedinherited |
File defining the geometry of the borehole.
Each row has format weight x y z and the list of such points defines a polyline that is the line sink
Definition at line 46 of file PorousFlowLineGeometry.h.
Referenced by PorousFlowLineGeometry::PorousFlowLineGeometry().
|
protectedinherited |
Quadpoint pore pressure in each phase.
Definition at line 115 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::ptqp().
|
protected |
Borehole constant.
Definition at line 52 of file PorousFlowPeacemanBorehole.h.
|
protectedinherited |
Relative permeability of each phase.
Definition at line 139 of file PorousFlowLineSink.h.
|
protected |
Rotation matrix used in well_constant calculation.
Definition at line 70 of file PorousFlowPeacemanBorehole.h.
Referenced by computeQpBaseOutflow(), computeQpBaseOutflowJacobian(), and PorousFlowPeacemanBorehole().
|
protectedinherited |
Radii of the borehole.
Definition at line 49 of file PorousFlowLineGeometry.h.
Referenced by PorousFlowPolyLineSink::computeQpBaseOutflow(), computeQpBaseOutflow(), PorousFlowPolyLineSink::computeQpBaseOutflowJacobian(), computeQpBaseOutflowJacobian(), and PorousFlowLineGeometry::PorousFlowLineGeometry().
|
protectedinherited |
The component number (only used if _use_mass_fraction==true)
Definition at line 112 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::computeQpResidual(), PorousFlowLineSink::jac(), and PorousFlowLineSink::PorousFlowLineSink().
|
protectedinherited |
Quadpoint temperature.
Definition at line 121 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::ptqp().
|
protectedinherited |
This is used to hold the total fluid flowing into the line sink for each time step.
Hence, it is positive for production wells where fluid is flowing from porespace into the line sink (and hence removed from the model)
Definition at line 67 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::addPoints(), PorousFlowLineSink::computeQpResidual(), and PorousFlowLineSink::PorousFlowLineSink().
|
protected |
Unit weight of fluid in borehole (for calculating bottomhole pressure at each Dirac Point)
Definition at line 49 of file PorousFlowPeacemanBorehole.h.
Referenced by computeQpBaseOutflow(), and computeQpBaseOutflowJacobian().
|
protectedinherited |
Whether the flux will be multiplied by the enthalpy.
Definition at line 103 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::computeQpResidual(), PorousFlowLineSink::jac(), and PorousFlowLineSink::PorousFlowLineSink().
|
protectedinherited |
Whether the flux will be multiplied by the internal-energy.
Definition at line 106 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::computeQpResidual(), PorousFlowLineSink::jac(), and PorousFlowLineSink::PorousFlowLineSink().
|
protectedinherited |
Whether the flux will be multiplied by the mass fraction.
Definition at line 94 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::computeQpResidual(), PorousFlowLineSink::jac(), and PorousFlowLineSink::PorousFlowLineSink().
|
protectedinherited |
Whether the flux will be multiplied by the mobility.
Definition at line 100 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::computeQpResidual(), PorousFlowLineSink::jac(), and PorousFlowLineSink::PorousFlowLineSink().
|
protectedinherited |
Whether the flux will be multiplied by the relative permeability.
Definition at line 97 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink::computeQpResidual(), PorousFlowLineSink::jac(), and PorousFlowLineSink::PorousFlowLineSink().
|
protected |
Well constant.
Definition at line 55 of file PorousFlowPeacemanBorehole.h.
|
protectedinherited |
x points of the borehole
Definition at line 52 of file PorousFlowLineGeometry.h.
Referenced by PorousFlowLineGeometry::addPoints(), PorousFlowLineGeometry::PorousFlowLineGeometry(), and PorousFlowPeacemanBorehole().
|
protectedinherited |
y points of the borehole
Definition at line 55 of file PorousFlowLineGeometry.h.
Referenced by PorousFlowLineGeometry::addPoints(), PorousFlowLineGeometry::PorousFlowLineGeometry(), and PorousFlowPeacemanBorehole().
|
protectedinherited |
z points of borehole
Definition at line 58 of file PorousFlowLineGeometry.h.
Referenced by PorousFlowLineGeometry::addPoints(), PorousFlowPolyLineSink::computeQpBaseOutflow(), computeQpBaseOutflow(), PorousFlowPolyLineSink::computeQpBaseOutflowJacobian(), computeQpBaseOutflowJacobian(), PorousFlowLineGeometry::PorousFlowLineGeometry(), and PorousFlowPeacemanBorehole().