https://mooseframework.inl.gov
Q2PBorehole.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 // Moose Includes
13 #include "PeacemanBorehole.h"
14 #include "RichardsDensity.h"
15 #include "RichardsRelPerm.h"
16 
22 {
23 public:
34 
36 
42  virtual void computeResidual();
43 
47  virtual Real computeQpResidual();
48 
54  virtual void computeJacobian();
55 
59  virtual Real computeQpJacobian();
60 
64  virtual Real computeQpOffDiagJacobian(unsigned int jvar);
65 
66 protected:
69 
72 
75 
77  const unsigned int _other_var_num;
78 
80  const bool _var_is_pp;
81 
84 
87 
89  unsigned int _num_nodes;
90 
92  std::vector<Real> _pp;
93 
95  std::vector<Real> _sat;
96 
98  std::vector<Real> _mobility;
99 
101  std::vector<Real> _dmobility_dp;
102 
104  std::vector<Real> _dmobility_ds;
105 
107  void prepareNodalValues();
108 
113  Real jac(unsigned int jvar);
114 };
unsigned int _num_nodes
number of nodes in this element.
Definition: Q2PBorehole.h:89
const RichardsRelPerm & _relperm
fluid relative permeability
Definition: Q2PBorehole.h:71
std::vector< Real > _dmobility_dp
nodal d(mobility)/d(porepressure)
Definition: Q2PBorehole.h:101
Base class for Richards relative permeability classes that provide relative permeability as a functio...
const unsigned int _other_var_num
the variable number of the other variable
Definition: Q2PBorehole.h:77
virtual Real computeQpResidual()
Computes the Qp residual.
Definition: Q2PBorehole.C:113
const VariableValue & _other_var_nodal
the other variable in the 2-phase system (this is saturation if Variable=porepressure, and viceversa)
Definition: Q2PBorehole.h:74
Approximates a borehole by a sequence of Dirac Points.
std::vector< Real > _mobility
nodal mobility
Definition: Q2PBorehole.h:98
Q2PBorehole(const InputParameters &parameters)
Definition: Q2PBorehole.C:43
virtual void computeResidual()
Computes the residual.
Definition: Q2PBorehole.C:106
void prepareNodalValues()
calculates the nodal values of pressure, mobility, and derivatives thereof
Definition: Q2PBorehole.C:62
virtual void computeJacobian()
Computes the Jacobian.
Definition: Q2PBorehole.C:170
static InputParameters validParams()
Creates a new Q2PBorehole This sets all the variables, but also reads the file containing the lines o...
Definition: Q2PBorehole.C:16
const Real _viscosity
viscosity
Definition: Q2PBorehole.h:83
std::vector< Real > _sat
nodal saturation
Definition: Q2PBorehole.h:95
virtual Real computeQpJacobian()
Computes the diagonal part of the jacobian.
Definition: Q2PBorehole.C:177
const RichardsDensity & _density
fluid density
Definition: Q2PBorehole.h:68
OutputTools< Real >::VariableValue VariableValue
std::vector< Real > _dmobility_ds
nodal d(mobility)/d(saturation)
Definition: Q2PBorehole.h:104
const bool _var_is_pp
whether the Variable for this BC is porepressure or not
Definition: Q2PBorehole.h:80
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Approximates a borehole by a sequence of Dirac Points.
Definition: Q2PBorehole.h:21
const MaterialProperty< RealTensorValue > & _permeability
permeability
Definition: Q2PBorehole.h:86
Real jac(unsigned int jvar)
Calculates Jacobian.
Definition: Q2PBorehole.C:191
const InputParameters & parameters() const
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:92
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Computes the off-diagonal part of the jacobian.
Definition: Q2PBorehole.C:183