Approximates a line sink a sequence of Dirac Points. More...
#include <PorousFlowLineSink.h>
Public Member Functions | |
PorousFlowLineSink (const InputParameters ¶meters) | |
Protected Types | |
enum | PorTchoice { PorTchoice::pressure, PorTchoice::temperature } |
whether the flux is a function of pressure or temperature More... | |
Protected Member Functions | |
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... | |
virtual Real | computeQpBaseOutflow (unsigned current_dirac_ptid) const =0 |
Returns the flux from the line sink (before modification by mobility, etc). Derived classes should override this. More... | |
virtual void | computeQpBaseOutflowJacobian (unsigned jvar, unsigned current_dirac_ptid, Real &outflow, Real &outflowp) const =0 |
Calculates the BaseOutflow as well as its derivative wrt jvar. Derived classes should override this. 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 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 line sink a sequence of Dirac Points.
Definition at line 25 of file PorousFlowLineSink.h.
|
strongprotected |
whether the flux is a function of pressure or temperature
Enumerator | |
---|---|
pressure | |
temperature |
Definition at line 92 of file PorousFlowLineSink.h.
PorousFlowLineSink::PorousFlowLineSink | ( | const InputParameters & | parameters | ) |
Definition at line 53 of file PorousFlowLineSink.C.
|
overrideprotectedvirtual |
Add Dirac Points to the borehole.
Reimplemented from PorousFlowLineGeometry.
Definition at line 217 of file PorousFlowLineSink.C.
|
protectedpure virtual |
Returns the flux from the line sink (before modification by mobility, etc). Derived classes should override this.
Implemented in PorousFlowPeacemanBorehole, and PorousFlowPolyLineSink.
Referenced by computeQpResidual().
|
protectedpure virtual |
Calculates the BaseOutflow as well as its derivative wrt jvar. Derived classes should override this.
Implemented in PorousFlowPeacemanBorehole, and PorousFlowPolyLineSink.
Referenced by jac().
|
overrideprotectedvirtual |
Definition at line 258 of file PorousFlowLineSink.C.
|
overrideprotectedvirtual |
Definition at line 264 of file PorousFlowLineSink.C.
|
overrideprotectedvirtual |
Definition at line 227 of file PorousFlowLineSink.C.
|
protected |
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 PorousFlowPeacemanBorehole::computeQpBaseOutflowJacobian().
|
protected |
Jacobian contribution for the derivative wrt the variable jvar.
Definition at line 270 of file PorousFlowLineSink.C.
Referenced by computeQpJacobian(), and 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().
|
protected |
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(), PorousFlowPeacemanBorehole::computeQpBaseOutflow(), PorousFlowPolyLineSink::computeQpBaseOutflowJacobian(), and PorousFlowPeacemanBorehole::computeQpBaseOutflowJacobian().
|
protectedinherited |
The bottom point of the borehole (where bottom_pressure is defined)
Definition at line 62 of file PorousFlowLineGeometry.h.
Referenced by PorousFlowPeacemanBorehole::computeQpBaseOutflow(), PorousFlowPeacemanBorehole::computeQpBaseOutflowJacobian(), and PorousFlowLineGeometry::PorousFlowLineGeometry().
|
protected |
d(enthalpy of each phase)/d(PorousFlow variable)
Definition at line 155 of file PorousFlowLineSink.h.
|
protected |
d(Fluid density for each phase (at the node))/d(PorousFlow variable)
Definition at line 131 of file PorousFlowLineSink.h.
|
protected |
d(Viscosity of each component in each phase)/d(PorousFlow variable)
Definition at line 137 of file PorousFlowLineSink.h.
|
protected |
PorousFlowDictator UserObject.
Definition at line 61 of file PorousFlowLineSink.h.
Referenced by PorousFlowPolyLineSink::computeQpBaseOutflowJacobian(), PorousFlowPeacemanBorehole::computeQpBaseOutflowJacobian(), jac(), and PorousFlowLineSink().
|
protected |
d(internal_energy of each phase)/d(PorousFlow variable)
Definition at line 161 of file PorousFlowLineSink.h.
|
protected |
d(Mass fraction of each component in each phase)/d(PorousFlow variable)
Definition at line 149 of file PorousFlowLineSink.h.
|
protected |
d(quadpoint pore pressure in each phase)/d(PorousFlow variable)
Definition at line 119 of file PorousFlowLineSink.h.
Referenced by dptqp().
|
protected |
d(Relative permeability of each phase)/d(PorousFlow variable)
Definition at line 143 of file PorousFlowLineSink.h.
|
protected |
d(quadpoint temperature)/d(PorousFlow variable)
Definition at line 125 of file PorousFlowLineSink.h.
Referenced by dptqp().
|
protected |
Enthalpy of each phase.
Definition at line 152 of file PorousFlowLineSink.h.
|
protected |
Fluid density for each phase (at the node)
Definition at line 128 of file PorousFlowLineSink.h.
|
protected |
Viscosity of each component in each phase.
Definition at line 134 of file PorousFlowLineSink.h.
|
protectedinherited |
0.5*(length of polyline segments between points)
Definition at line 65 of file PorousFlowLineGeometry.h.
Referenced by PorousFlowPolyLineSink::computeQpBaseOutflow(), PorousFlowPeacemanBorehole::computeQpBaseOutflow(), PorousFlowPolyLineSink::computeQpBaseOutflowJacobian(), PorousFlowPeacemanBorehole::computeQpBaseOutflowJacobian(), and PorousFlowLineGeometry::PorousFlowLineGeometry().
|
protected |
Whether an enthalpy material exists (for error checking)
Definition at line 86 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink().
|
protected |
Whether an internal-energy material exists (for error checking)
Definition at line 89 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink().
|
protected |
Whether a mass_fraction material exists (for error checking)
Definition at line 77 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink().
|
protected |
Whether enough materials exist to form the mobility (for error checking)
Definition at line 83 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink().
|
protected |
Whether a quadpoint porepressure material exists (for error checking)
Definition at line 71 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink().
|
protected |
Whether a relative permeability material exists (for error checking)
Definition at line 80 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink().
|
protected |
Whether a quadpoint temperature material exists (for error checking)
Definition at line 74 of file PorousFlowLineSink.h.
Referenced by PorousFlowLineSink().
|
protected |
Internal_Energy of each phase.
Definition at line 158 of file PorousFlowLineSink.h.
|
protectedinherited |
Line direction. This is only used if there is only one borehole point.
Definition at line 40 of file PorousFlowLineGeometry.h.
Referenced by PorousFlowPeacemanBorehole::PorousFlowPeacemanBorehole().
|
protectedinherited |
Line length. This is only used if there is only one borehole point.
Definition at line 37 of file PorousFlowLineGeometry.h.
Referenced by PorousFlowLineGeometry::PorousFlowLineGeometry().
|
protected |
Mass fraction of each component in each phase.
Definition at line 146 of file PorousFlowLineSink.h.
|
protected |
Referenced by dptqp(), PorousFlowLineSink(), PorousFlowPeacemanBorehole::PorousFlowPeacemanBorehole(), and ptqp().
|
protected |
The phase number.
Definition at line 110 of file PorousFlowLineSink.h.
Referenced by computeQpResidual(), dptqp(), jac(), PorousFlowLineSink(), and 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 47 of file PorousFlowLineGeometry.h.
Referenced by PorousFlowLineGeometry::PorousFlowLineGeometry().
|
protected |
Quadpoint pore pressure in each phase.
Definition at line 116 of file PorousFlowLineSink.h.
Referenced by ptqp().
|
protected |
Relative permeability of each phase.
Definition at line 140 of file PorousFlowLineSink.h.
|
protectedinherited |
Radii of the borehole.
Definition at line 50 of file PorousFlowLineGeometry.h.
Referenced by PorousFlowPolyLineSink::computeQpBaseOutflow(), PorousFlowPeacemanBorehole::computeQpBaseOutflow(), PorousFlowPolyLineSink::computeQpBaseOutflowJacobian(), PorousFlowPeacemanBorehole::computeQpBaseOutflowJacobian(), and PorousFlowLineGeometry::PorousFlowLineGeometry().
|
protected |
The component number (only used if _use_mass_fraction==true)
Definition at line 113 of file PorousFlowLineSink.h.
Referenced by computeQpResidual(), jac(), and PorousFlowLineSink().
|
protected |
|
protected |
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 68 of file PorousFlowLineSink.h.
Referenced by addPoints(), computeQpResidual(), and PorousFlowLineSink().
|
protected |
Whether the flux will be multiplied by the enthalpy.
Definition at line 104 of file PorousFlowLineSink.h.
Referenced by computeQpResidual(), jac(), and PorousFlowLineSink().
|
protected |
Whether the flux will be multiplied by the internal-energy.
Definition at line 107 of file PorousFlowLineSink.h.
Referenced by computeQpResidual(), jac(), and PorousFlowLineSink().
|
protected |
Whether the flux will be multiplied by the mass fraction.
Definition at line 95 of file PorousFlowLineSink.h.
Referenced by computeQpResidual(), jac(), and PorousFlowLineSink().
|
protected |
Whether the flux will be multiplied by the mobility.
Definition at line 101 of file PorousFlowLineSink.h.
Referenced by computeQpResidual(), jac(), and PorousFlowLineSink().
|
protected |
Whether the flux will be multiplied by the relative permeability.
Definition at line 98 of file PorousFlowLineSink.h.
Referenced by computeQpResidual(), jac(), and PorousFlowLineSink().
|
protectedinherited |
x points of the borehole
Definition at line 53 of file PorousFlowLineGeometry.h.
Referenced by PorousFlowLineGeometry::addPoints(), PorousFlowLineGeometry::PorousFlowLineGeometry(), and PorousFlowPeacemanBorehole::PorousFlowPeacemanBorehole().
|
protectedinherited |
y points of the borehole
Definition at line 56 of file PorousFlowLineGeometry.h.
Referenced by PorousFlowLineGeometry::addPoints(), PorousFlowLineGeometry::PorousFlowLineGeometry(), and PorousFlowPeacemanBorehole::PorousFlowPeacemanBorehole().
|
protectedinherited |
z points of borehole
Definition at line 59 of file PorousFlowLineGeometry.h.
Referenced by PorousFlowLineGeometry::addPoints(), PorousFlowPolyLineSink::computeQpBaseOutflow(), PorousFlowPeacemanBorehole::computeQpBaseOutflow(), PorousFlowPolyLineSink::computeQpBaseOutflowJacobian(), PorousFlowPeacemanBorehole::computeQpBaseOutflowJacobian(), PorousFlowLineGeometry::PorousFlowLineGeometry(), and PorousFlowPeacemanBorehole::PorousFlowPeacemanBorehole().