www.mooseframework.org
RichardsMass.C
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 // This post processor returns the mass value of a region. It is used
9 // to check that mass is conserved
10 //
11 #include "RichardsMass.h"
12 
13 template <>
14 InputParameters
16 {
17  InputParameters params = validParams<ElementIntegralVariablePostprocessor>();
18  params.addRequiredParam<UserObjectName>(
19  "richardsVarNames_UO", "The UserObject that holds the list of Richards variable names.");
20  params.addClassDescription("Returns the mass in a region.");
21  return params;
22 }
23 
24 RichardsMass::RichardsMass(const InputParameters & parameters)
25  : ElementIntegralVariablePostprocessor(parameters),
26 
27  _richards_name_UO(getUserObject<RichardsVarNames>("richardsVarNames_UO")),
28  _pvar(_richards_name_UO.richards_var_num(coupled("variable"))),
29 
30  _mass(getMaterialProperty<std::vector<Real>>("mass"))
31 {
32 }
33 
34 Real
36 {
37  return _mass[_qp][_pvar];
38 }
This holds maps between pressure_var or pressure_var, sat_var used in RichardsMaterial and kernels...
InputParameters validParams< RichardsMass >()
Definition: RichardsMass.C:15
const MaterialProperty< std::vector< Real > > & _mass
Mass, or vector of masses in multicomponent situation.
Definition: RichardsMass.h:39
virtual Real computeQpIntegral()
Definition: RichardsMass.C:35
RichardsMass(const InputParameters &parameters)
Definition: RichardsMass.C:24
unsigned int _pvar
Richards variable number that we want the mass for.
Definition: RichardsMass.h:36