www.mooseframework.org
RichardsBorehole.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 RICHARDSBOREHOLE_H
9 #define RICHARDSBOREHOLE_H
10 
11 // Moose Includes
12 #include "PeacemanBorehole.h"
13 #include "RichardsVarNames.h"
14 #include "RichardsDensity.h"
15 #include "RichardsRelPerm.h"
16 #include "RichardsSeff.h"
17 
18 class RichardsBorehole;
19 
20 template <>
21 InputParameters validParams<RichardsBorehole>();
22 
27 {
28 public:
38  RichardsBorehole(const InputParameters & parameters);
39 
45  virtual void computeResidual();
46 
50  virtual Real computeQpResidual();
51 
57  virtual void computeJacobian();
58 
62  virtual Real computeQpJacobian();
63 
70  virtual Real computeQpOffDiagJacobian(unsigned int jvar);
71 
72 protected:
74  const bool _fully_upwind;
75 
78 
80  const unsigned int _num_p;
81 
83  const unsigned int _pvar;
84 
87 
90 
93 
95  unsigned int _num_nodes;
96 
101  std::vector<Real> _mobility;
102 
107  std::vector<std::vector<Real>> _dmobility_dv;
108 
110  const MaterialProperty<std::vector<Real>> & _pp;
111 
113  const MaterialProperty<std::vector<std::vector<Real>>> & _dpp_dv;
114 
116  const MaterialProperty<std::vector<Real>> & _viscosity;
117 
119  const MaterialProperty<RealTensorValue> & _permeability;
120 
122  const MaterialProperty<std::vector<std::vector<Real>>> & _dseff_dv;
123 
125  const MaterialProperty<std::vector<Real>> & _rel_perm;
126 
128  const MaterialProperty<std::vector<std::vector<Real>>> & _drel_perm_dv;
129 
131  const MaterialProperty<std::vector<Real>> & _density;
132 
134  const MaterialProperty<std::vector<std::vector<Real>>> & _ddensity_dv;
135 
144  std::vector<const VariableValue *> _ps_at_nodes;
145 
147  void prepareNodalValues();
148 
153  Real jac(unsigned int wrt_num);
154 };
155 
156 #endif // RICHARDSBOREHOLE_H
const MaterialProperty< RealTensorValue > & _permeability
material permeability
const bool _fully_upwind
Whether to use full upwinding.
const RichardsDensity * _density_UO
user object defining the density. Only used if _fully_upwind = true
const MaterialProperty< std::vector< Real > > & _density
fluid density
Real jac(unsigned int wrt_num)
Calculates Jacobian.
const MaterialProperty< std::vector< Real > > & _viscosity
fluid viscosity
Base class for effective saturation as a function of porepressure(s) The functions seff...
Definition: RichardsSeff.h:22
Base class for Richards relative permeability classes that provide relative permeability as a functio...
const RichardsSeff * _seff_UO
user object defining the effective saturation. Only used if _fully_upwind = true
const MaterialProperty< std::vector< std::vector< Real > > > & _dseff_dv
deriviatves of Seff wrt variables
virtual Real computeQpJacobian()
Computes the diagonal part of the jacobian.
unsigned int _num_nodes
number of nodes in this element. Only used if _fully_upwind = true
Approximates a borehole by a sequence of Dirac Points.
This holds maps between pressure_var or pressure_var, sat_var used in RichardsMaterial and kernels...
std::vector< const VariableValue * > _ps_at_nodes
Holds the values of pressures at all the nodes of the element Only used if _fully_upwind = true Eg: _...
std::vector< Real > _mobility
nodal values of mobility = density*relperm/viscosity These are used if _fully_upwind = true ...
const MaterialProperty< std::vector< Real > > & _pp
fluid porepressure (or porepressures in case of multiphase)
virtual void computeResidual()
Computes the residual.
const MaterialProperty< std::vector< Real > > & _rel_perm
relative permeability
const RichardsRelPerm * _relperm_UO
user object defining the relative permeability. Only used if _fully_upwind = true ...
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Computes the off-diagonal part of the jacobian Note: at March2014 this is never called since moose do...
const MaterialProperty< std::vector< std::vector< Real > > > & _drel_perm_dv
d(relperm_i)/d(variable_j)
virtual void computeJacobian()
Computes the Jacobian.
RichardsBorehole(const InputParameters &parameters)
Creates a new RichardsBorehole This sets all the variables, but also reads the file containing the li...
const unsigned int _pvar
The moose internal variable number of the richards variable of this Dirac Kernel. ...
std::vector< std::vector< Real > > _dmobility_dv
d(_mobility)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jacobian...
const MaterialProperty< std::vector< std::vector< Real > > > & _dpp_dv
d(porepressure_i)/d(variable_j)
Base class for fluid density as a function of porepressure The functions density, ddensity and d2dens...
const RichardsVarNames & _richards_name_UO
Defines the richards variables in the simulation.
virtual Real computeQpResidual()
Computes the Qp residual.
void prepareNodalValues()
calculates the nodal values of pressure, mobility, and derivatives thereof
const unsigned int _num_p
number of richards variables
const MaterialProperty< std::vector< std::vector< Real > > > & _ddensity_dv
d(density_i)/d(variable_j)
Approximates a borehole by a sequence of Dirac Points.
InputParameters validParams< RichardsBorehole >()