www.mooseframework.org
Q2PBorehole.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 Q2PBOREHOLE_H
9 #define Q2PBOREHOLE_H
10 
11 // Moose Includes
12 #include "PeacemanBorehole.h"
13 #include "RichardsDensity.h"
14 #include "RichardsRelPerm.h"
15 
16 class Q2PBorehole;
17 
18 template <>
19 InputParameters validParams<Q2PBorehole>();
20 
26 {
27 public:
37  Q2PBorehole(const InputParameters & parameters);
38 
44  virtual void computeResidual();
45 
49  virtual Real computeQpResidual();
50 
56  virtual void computeJacobian();
57 
61  virtual Real computeQpJacobian();
62 
66  virtual Real computeQpOffDiagJacobian(unsigned int jvar);
67 
68 protected:
71 
74 
76  const VariableValue & _other_var_nodal;
77 
79  const unsigned int _other_var_num;
80 
82  const bool _var_is_pp;
83 
85  const Real _viscosity;
86 
88  const MaterialProperty<RealTensorValue> & _permeability;
89 
91  unsigned int _num_nodes;
92 
94  std::vector<Real> _pp;
95 
97  std::vector<Real> _sat;
98 
100  std::vector<Real> _mobility;
101 
103  std::vector<Real> _dmobility_dp;
104 
106  std::vector<Real> _dmobility_ds;
107 
109  void prepareNodalValues();
110 
115  Real jac(unsigned int jvar);
116 };
117 
118 #endif // Q2PBOREHOLE_H
unsigned int _num_nodes
number of nodes in this element.
Definition: Q2PBorehole.h:91
const RichardsRelPerm & _relperm
fluid relative permeability
Definition: Q2PBorehole.h:73
std::vector< Real > _dmobility_dp
nodal d(mobility)/d(porepressure)
Definition: Q2PBorehole.h:103
Base class for Richards relative permeability classes that provide relative permeability as a functio...
InputParameters validParams< Q2PBorehole >()
Definition: Q2PBorehole.C:13
const unsigned int _other_var_num
the variable number of the other variable
Definition: Q2PBorehole.h:79
virtual Real computeQpResidual()
Computes the Qp residual.
Definition: Q2PBorehole.C:110
const VariableValue & _other_var_nodal
the other variable in the 2-phase system (this is saturation if Variable=porepressure, and viceversa)
Definition: Q2PBorehole.h:76
Approximates a borehole by a sequence of Dirac Points.
std::vector< Real > _mobility
nodal mobility
Definition: Q2PBorehole.h:100
Q2PBorehole(const InputParameters &parameters)
Creates a new Q2PBorehole This sets all the variables, but also reads the file containing the lines o...
Definition: Q2PBorehole.C:40
virtual void computeResidual()
Computes the residual.
Definition: Q2PBorehole.C:103
void prepareNodalValues()
calculates the nodal values of pressure, mobility, and derivatives thereof
Definition: Q2PBorehole.C:59
virtual void computeJacobian()
Computes the Jacobian.
Definition: Q2PBorehole.C:167
const Real _viscosity
viscosity
Definition: Q2PBorehole.h:85
std::vector< Real > _sat
nodal saturation
Definition: Q2PBorehole.h:97
virtual Real computeQpJacobian()
Computes the diagonal part of the jacobian.
Definition: Q2PBorehole.C:174
const RichardsDensity & _density
fluid density
Definition: Q2PBorehole.h:70
std::vector< Real > _dmobility_ds
nodal d(mobility)/d(saturation)
Definition: Q2PBorehole.h:106
const bool _var_is_pp
whether the Variable for this BC is porepressure or not
Definition: Q2PBorehole.h:82
Approximates a borehole by a sequence of Dirac Points.
Definition: Q2PBorehole.h:25
const MaterialProperty< RealTensorValue > & _permeability
permeability
Definition: Q2PBorehole.h:88
Real jac(unsigned int jvar)
Calculates Jacobian.
Definition: Q2PBorehole.C:188
Base class for fluid density as a function of porepressure The functions density, ddensity and d2dens...
std::vector< Real > _pp
nodal porepressure
Definition: Q2PBorehole.h:94
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Computes the off-diagonal part of the jacobian.
Definition: Q2PBorehole.C:180