www.mooseframework.org
Q2PPorepressureFlux.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 #include "Kernel.h"
13 #include "RichardsDensity.h"
14 #include "RichardsRelPerm.h"
15 #include "Material.h"
16 
17 // Forward Declarations
18 
43 {
44 public:
46 
48 
49 protected:
55  virtual Real computeQpResidual() override;
56 
58  virtual void computeResidual() override;
59 
61  virtual void computeOffDiagJacobian(unsigned int jvar) override;
62 
64  virtual void computeJacobian() override;
65 
67  Real computeQpJac(unsigned int dvar);
68 
76  void upwind(bool compute_res, bool compute_jac, unsigned int jvar);
77 
79  void prepareNodalValues();
80 
83 
86 
88  unsigned int _sat_var;
89 
92 
95 
98 
101 
103  unsigned int _num_nodes;
104 
109  std::vector<Real> _mobility;
110 
115  std::vector<Real> _dmobility_dp;
116 
121  std::vector<Real> _dmobility_ds;
122 };
void upwind(bool compute_res, bool compute_jac, unsigned int jvar)
Do the upwinding for both the residual and jacobian I&#39;ve put both calculations in the same code to tr...
const RichardsDensity & _density
fluid density
Real _viscosity
fluid viscosity
Base class for Richards relative permeability classes that provide relative permeability as a functio...
Real computeQpJac(unsigned int dvar)
the derivative of the flux without the upstream mobility terms
const VariableValue & _sat
saturation at the nodes
unsigned int _sat_var
variable number of the saturation variable
This is a fully upwinded flux Kernel The Variable of this Kernel should be the porepressure.
Q2PPorepressureFlux(const InputParameters &parameters)
const MaterialProperty< RealTensorValue > & _permeability
permeability
virtual void computeOffDiagJacobian(unsigned int jvar) override
this simply calls upwind
const RichardsRelPerm & _relperm
fluid relative permeability
std::vector< Real > _dmobility_ds
d(_mobility)/d(saturation) These are used in the jacobian calculations
static InputParameters validParams()
virtual void computeResidual() override
This simply calls upwind.
unsigned int _num_nodes
number of nodes in the element
OutputTools< Real >::VariableValue VariableValue
virtual void computeJacobian() override
this simply calls upwind
virtual Real computeQpResidual() override
Note that this is not the complete residual for the quadpoint In computeResidual we sum over the quad...
void prepareNodalValues()
calculates the nodal values of mobility, and derivatives thereof
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< Real > _dmobility_dp
d(_mobility)/d(porepressure) These are used in the jacobian calculations
const InputParameters & parameters() const
Base class for fluid density as a function of porepressure The functions density, ddensity and d2dens...
std::vector< Real > _mobility
nodal values of mobility = density*relperm/viscosity These are multiplied by _flux_no_mob to give the...
const MaterialProperty< RealVectorValue > & _gravity
gravity