www.mooseframework.org
Q2PBorehole.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
17 class Q2PBorehole;
18 
19 template <>
20 InputParameters validParams<Q2PBorehole>();
21 
27 {
28 public:
38  Q2PBorehole(const InputParameters & parameters);
39 
45  virtual void computeResidual();
46 
50  virtual Real computeQpResidual();
51 
57  virtual void computeJacobian();
58 
62  virtual Real computeQpJacobian();
63 
67  virtual Real computeQpOffDiagJacobian(unsigned int jvar);
68 
69 protected:
72 
75 
77  const VariableValue & _other_var_nodal;
78 
80  const unsigned int _other_var_num;
81 
83  const bool _var_is_pp;
84 
86  const Real _viscosity;
87 
89  const MaterialProperty<RealTensorValue> & _permeability;
90 
92  unsigned int _num_nodes;
93 
95  std::vector<Real> _pp;
96 
98  std::vector<Real> _sat;
99 
101  std::vector<Real> _mobility;
102 
104  std::vector<Real> _dmobility_dp;
105 
107  std::vector<Real> _dmobility_ds;
108 
110  void prepareNodalValues();
111 
116  Real jac(unsigned int jvar);
117 };
118 
Q2PBorehole
Approximates a borehole by a sequence of Dirac Points.
Definition: Q2PBorehole.h:26
Q2PBorehole::computeQpResidual
virtual Real computeQpResidual()
Computes the Qp residual.
Definition: Q2PBorehole.C:114
RichardsRelPerm
Base class for Richards relative permeability classes that provide relative permeability as a functio...
Definition: RichardsRelPerm.h:23
Q2PBorehole::_mobility
std::vector< Real > _mobility
nodal mobility
Definition: Q2PBorehole.h:101
Q2PBorehole::Q2PBorehole
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:44
Q2PBorehole::_other_var_nodal
const VariableValue & _other_var_nodal
the other variable in the 2-phase system (this is saturation if Variable=porepressure,...
Definition: Q2PBorehole.h:77
Q2PBorehole::_other_var_num
const unsigned int _other_var_num
the variable number of the other variable
Definition: Q2PBorehole.h:80
Q2PBorehole::computeResidual
virtual void computeResidual()
Computes the residual.
Definition: Q2PBorehole.C:107
Q2PBorehole::_dmobility_dp
std::vector< Real > _dmobility_dp
nodal d(mobility)/d(porepressure)
Definition: Q2PBorehole.h:104
Q2PBorehole::computeJacobian
virtual void computeJacobian()
Computes the Jacobian.
Definition: Q2PBorehole.C:171
PeacemanBorehole
Approximates a borehole by a sequence of Dirac Points.
Definition: PeacemanBorehole.h:25
Q2PBorehole::prepareNodalValues
void prepareNodalValues()
calculates the nodal values of pressure, mobility, and derivatives thereof
Definition: Q2PBorehole.C:63
Q2PBorehole::_dmobility_ds
std::vector< Real > _dmobility_ds
nodal d(mobility)/d(saturation)
Definition: Q2PBorehole.h:107
PeacemanBorehole.h
Q2PBorehole::_density
const RichardsDensity & _density
fluid density
Definition: Q2PBorehole.h:71
Q2PBorehole::computeQpJacobian
virtual Real computeQpJacobian()
Computes the diagonal part of the jacobian.
Definition: Q2PBorehole.C:178
RichardsDensity
Base class for fluid density as a function of porepressure The functions density, ddensity and d2dens...
Definition: RichardsDensity.h:24
Q2PBorehole::_viscosity
const Real _viscosity
viscosity
Definition: Q2PBorehole.h:86
Q2PBorehole::_sat
std::vector< Real > _sat
nodal saturation
Definition: Q2PBorehole.h:98
RichardsRelPerm.h
RichardsDensity.h
validParams< Q2PBorehole >
InputParameters validParams< Q2PBorehole >()
Definition: Q2PBorehole.C:17
Q2PBorehole::_var_is_pp
const bool _var_is_pp
whether the Variable for this BC is porepressure or not
Definition: Q2PBorehole.h:83
Q2PBorehole::_permeability
const MaterialProperty< RealTensorValue > & _permeability
permeability
Definition: Q2PBorehole.h:89
Q2PBorehole::jac
Real jac(unsigned int jvar)
Calculates Jacobian.
Definition: Q2PBorehole.C:192
Q2PBorehole::computeQpOffDiagJacobian
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Computes the off-diagonal part of the jacobian.
Definition: Q2PBorehole.C:184
Q2PBorehole::_relperm
const RichardsRelPerm & _relperm
fluid relative permeability
Definition: Q2PBorehole.h:74
Q2PBorehole::_pp
std::vector< Real > _pp
nodal porepressure
Definition: Q2PBorehole.h:95
Q2PBorehole::_num_nodes
unsigned int _num_nodes
number of nodes in this element.
Definition: Q2PBorehole.h:92