https://mooseframework.inl.gov
RichardsFullyUpwindFlux.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 #include "Kernel.h"
13 #include "RichardsVarNames.h"
14 #include "RichardsDensity.h"
15 #include "RichardsRelPerm.h"
16 #include "RichardsSeff.h"
17 #include "Material.h"
18 
19 // Forward Declarations
20 
44 {
45 public:
47 
49 
50 protected:
56  virtual Real computeQpResidual() override;
57 
59  virtual void computeResidual() override;
60 
62  virtual void computeOffDiagJacobian(unsigned int jvar) override;
63 
65  Real computeQpJac(unsigned int dvar);
66 
74  void upwind(bool compute_res, bool compute_jac, unsigned int jvar);
75 
77  void prepareNodalValues();
78 
84 
86  unsigned int _num_p;
87 
95  unsigned int _pvar;
96 
99 
102 
105 
108 
111 
114 
117 
119  unsigned int _num_nodes;
120 
125  std::vector<Real> _mobility;
126 
131  std::vector<std::vector<Real>> _dmobility_dv;
132 
139  std::vector<const VariableValue *> _ps_at_nodes;
140 };
unsigned int _num_p
number of richards variables
const MaterialProperty< std::vector< std::vector< RealVectorValue > > > & _dflux_no_mob_dv
d(_flux_no_mob)/d(variable)
Base class for effective saturation as a function of porepressure(s) The functions seff...
Definition: RichardsSeff.h:18
static InputParameters validParams()
Base class for Richards relative permeability classes that provide relative permeability as a functio...
std::vector< const VariableValue * > _ps_at_nodes
Holds the values of pressures at all the nodes of the element Eg: _ps_at_nodes[_pvar] is a pointer to...
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...
virtual Real computeQpResidual() override
Note that this is not the complete residual for the quadpoint In computeResidual we sum over the quad...
This holds maps between pressure_var or pressure_var, sat_var used in RichardsMaterial and kernels...
const RichardsRelPerm & _relperm_UO
user object defining the relative permeability
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 MaterialProperty< std::vector< RealVectorValue > > & _flux_no_mob
permeability*(grad(pressure) - density*gravity) (a vector of these in the multiphase case) ...
const RichardsSeff & _seff_UO
user object defining the effective saturation
RichardsFullyUpwindFlux(const InputParameters &parameters)
unsigned int _pvar
the index of this variable in the list of Richards variables held by _richards_name_UO.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void prepareNodalValues()
calculates the nodal values of mobility, and derivatives thereof
const MaterialProperty< std::vector< std::vector< RealTensorValue > > > & _dflux_no_mob_dgradv
d(_flux_no_mob)/d(grad(variable))
Real computeQpJac(unsigned int dvar)
the derivative of the flux without the upstream mobility terms
unsigned int _num_nodes
number of nodes in this element
const InputParameters & parameters() const
const RichardsVarNames & _richards_name_UO
holds info regarding the names of the Richards variables and methods for extracting values of these v...
const MaterialProperty< std::vector< Real > > & _viscosity
viscosities
Base class for fluid density as a function of porepressure The functions density, ddensity and d2dens...
This is a fully upwinded version of RichardsFlux.
virtual void computeResidual() override
This simply calls upwind.
const RichardsDensity & _density_UO
user object defining the density
std::vector< Real > _mobility
nodal values of mobility = density*relperm/viscosity These are multiplied by _flux_no_mob to give the...
virtual void computeOffDiagJacobian(unsigned int jvar) override
this simply calls upwind