www.mooseframework.org
RichardsMass.C
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 // This post processor returns the mass value of a region. It is used
11 // to check that mass is conserved
12 //
13 #include "RichardsMass.h"
14 
15 registerMooseObject("RichardsApp", RichardsMass);
16 
19 {
21  params.addRequiredParam<UserObjectName>(
22  "richardsVarNames_UO", "The UserObject that holds the list of Richards variable names.");
23  params.addClassDescription("Returns the mass in a region.");
24  return params;
25 }
26 
29 
30  _richards_name_UO(getUserObject<RichardsVarNames>("richardsVarNames_UO")),
31  _pvar(_richards_name_UO.richards_var_num(coupled("variable"))),
32 
33  _mass(getMaterialProperty<std::vector<Real>>("mass"))
34 {
35 }
36 
37 Real
39 {
40  return _mass[_qp][_pvar];
41 }
This holds maps between pressure_var or pressure_var, sat_var used in RichardsMaterial and kernels...
void addRequiredParam(const std::string &name, const std::string &doc_string)
This postprocessor computes the fluid mass by integrating the density over the volume.
Definition: RichardsMass.h:21
static InputParameters validParams()
const MaterialProperty< std::vector< Real > > & _mass
Mass, or vector of masses in multicomponent situation.
Definition: RichardsMass.h:38
static InputParameters validParams()
Definition: RichardsMass.C:18
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real computeQpIntegral()
Definition: RichardsMass.C:38
void addClassDescription(const std::string &doc_string)
registerMooseObject("RichardsApp", RichardsMass)
RichardsMass(const InputParameters &parameters)
Definition: RichardsMass.C:27
unsigned int _pvar
Richards variable number that we want the mass for.
Definition: RichardsMass.h:35