21 "pressures",
"Tuple of pressure values. Must be monotonically increasing.");
24 "Tuple of flux values (measured in kg.m^-3.s^-1). A piecewise-linear fit is " 25 "performed to the (pressure,flux) pairs to obtain the flux at any arbitrary " 26 "pressure. If a quad-point pressure is less than the first pressure value, the " 27 "first flux value is used. If quad-point pressure exceeds the final pressure " 28 "value, the final flux value is used. This flux is OUT of the medium: hence " 29 "positive values of flux means this will be a SINK, while negative values indicate " 30 "this flux will be a SOURCE.");
33 "The file containing the coordinates of the point sinks that will approximate " 34 "the polyline. Each line in the file must contain a space-separated " 35 "coordinate. Note that you will get segementation faults if your points do " 36 "not lie within your mesh!");
39 "User Object of type=RichardsSumQuantity in which to place the total " 40 "outflow from the polylinesink for each time step.");
42 "richardsVarNames_UO",
"The UserObject that holds the list of Richards variable names.");
43 params.
addClassDescription(
"Approximates a polyline sink in the mesh by using a number of point " 44 "sinks whose positions are read from a file");
52 _sink_func(getParam<
std::vector<
Real>>(
"pressures"), getParam<
std::vector<
Real>>(
"fluxes")),
53 _point_file(getParam<FileName>(
"point_file")),
55 _pvar(_richards_name_UO.richards_var_num(_var.number())),
56 _pp(getMaterialProperty<
std::vector<
Real>>(
"porepressure")),
57 _dpp_dv(getMaterialProperty<
std::vector<
std::vector<
Real>>>(
"dporepressure_dv"))
64 std::vector<Real> scratch;
67 if (scratch.size() >= 1)
69 _xs.push_back(scratch[0]);
70 if (scratch.size() >= 2)
71 _ys.push_back(scratch[1]);
75 if (scratch.size() >= 3)
76 _zs.push_back(scratch[2]);
87 for (
unsigned int i = 0; i < coupled_vars.size(); i++)
98 if (getline(ifs, line))
103 std::istringstream iss(line);
121 for (
unsigned int i = 0; i <
_zs.size(); i++)
Sums into _total This is used, for instance, to record the total mass flowing into a borehole...
Approximates a polyline by a sequence of Dirac Points the mass flux from each Dirac Point is _sink_fu...
virtual Real computeQpResidual()
std::string _point_file
contains rows of the form x y z (space separated)
static InputParameters validParams()
void addPoint(const Elem *elem, Point p, unsigned id=libMesh::invalid_uint)
const OutputTools< T >::VariableTestValue & _test
const OutputTools< T >::VariablePhiValue & _phi
registerMooseObject("RichardsApp", RichardsPolyLineSink)
std::vector< Real > _ys
vector of Dirac Points' y positions
bool not_richards_var(unsigned int moose_var_num) const
returns true if moose_var_num is not a richards var
T sample(const T &x) const
This holds maps between pressure_var or pressure_var, sat_var used in RichardsMaterial and kernels...
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Computes the off-diagonal part of the jacobian Note: at March2014 this is never called since moose do...
RichardsPolyLineSink(const InputParameters ¶meters)
LinearInterpolation _sink_func
mass flux = _sink_func as a function of porepressure
T sampleDerivative(const T &x) const
virtual Real computeQpJacobian()
Real f(Real x)
Test function for Brents method.
void zero()
sets _total = 0
unsigned int _pvar
The moose internal variable number of the richards variable of this Dirac Kernel. ...
bool parseNextLineReals(std::ifstream &ifs, std::vector< Real > &myvec)
reads a space-separated line of floats from ifs and puts in myvec
RichardsSumQuantity & _total_outflow_mass
This is used to hold the total fluid flowing into the sink Hence, it is positive for sinks where flui...
void add(Real contrib)
adds contrib to _total
const std::vector< MooseVariableFieldBase *> & getCoupledMooseVars() const
const MaterialProperty< std::vector< Real > > & _pp
fluid porepressure (or porepressures in case of multiphase)
void addMooseVariableDependency(MooseVariableFieldBase *var)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned int richards_var_num(unsigned int moose_var_num) const
the richards variable number
const MaterialProperty< std::vector< std::vector< Real > > > & _dpp_dv
d(porepressure_i)/d(variable_j)
std::vector< Real > _xs
vector of Dirac Points' x positions
std::vector< Real > _zs
vector of Dirac Points' z positions
void mooseError(Args &&... args) const
const RichardsVarNames & _richards_name_UO
Defines the richards variables in the simulation.
static InputParameters validParams()