www.mooseframework.org
RichardsPolyLineSink.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #ifndef RICHARDSPOLYLINESINK_H
9 #define RICHARDSPOLYLINESINK_H
10 
11 #include "DiracKernel.h"
12 #include "LinearInterpolation.h"
13 #include "RichardsSumQuantity.h"
14 #include "RichardsVarNames.h"
15 
16 // Forward Declarations
18 
19 template <>
20 InputParameters validParams<RichardsPolyLineSink>();
21 
27 class RichardsPolyLineSink : public DiracKernel
28 {
29 public:
30  RichardsPolyLineSink(const InputParameters & parameters);
31 
32  virtual void addPoints();
33  virtual Real computeQpResidual();
34  virtual Real computeQpJacobian();
35 
42  virtual Real computeQpOffDiagJacobian(unsigned int jvar);
43 
44 protected:
51 
53  LinearInterpolation _sink_func;
54 
56  std::string _point_file;
57 
60 
62  unsigned int _pvar;
63 
65  const MaterialProperty<std::vector<Real>> & _pp;
66 
68  const MaterialProperty<std::vector<std::vector<Real>>> & _dpp_dv;
69 
71  std::vector<Real> _xs;
72 
74  std::vector<Real> _ys;
75 
77  std::vector<Real> _zs;
78 
84  bool parseNextLineReals(std::ifstream & ifs, std::vector<Real> & myvec);
85 };
86 
87 #endif // RICHARDSPOLYLINESINK_H
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)
std::vector< Real > _ys
vector of Dirac Points&#39; y positions
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 &parameters)
LinearInterpolation _sink_func
mass flux = _sink_func as a function of porepressure
virtual Real computeQpJacobian()
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...
const MaterialProperty< std::vector< Real > > & _pp
fluid porepressure (or porepressures in case of multiphase)
const MaterialProperty< std::vector< std::vector< Real > > > & _dpp_dv
d(porepressure_i)/d(variable_j)
std::vector< Real > _xs
vector of Dirac Points&#39; x positions
InputParameters validParams< RichardsPolyLineSink >()
std::vector< Real > _zs
vector of Dirac Points&#39; z positions
const RichardsVarNames & _richards_name_UO
Defines the richards variables in the simulation.