www.mooseframework.org
RichardsExcavFlow.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 #include "RichardsExcavFlow.h"
11 #include "Function.h"
12 #include "Material.h"
13 
15 
16 template <>
17 InputParameters
19 {
20  InputParameters params = validParams<SideIntegralVariablePostprocessor>();
21  params.addRequiredParam<FunctionName>(
22  "excav_geom_function",
23  "The function describing the excavation geometry (type RichardsExcavGeom)");
24  params.addRequiredParam<UserObjectName>(
25  "richardsVarNames_UO", "The UserObject that holds the list of Richards variable names.");
26  params.addClassDescription("Records total flow INTO an excavation (if quantity is positive then "
27  "flow has occured from rock into excavation void)");
28  return params;
29 }
30 
31 RichardsExcavFlow::RichardsExcavFlow(const InputParameters & parameters)
32  : SideIntegralVariablePostprocessor(parameters),
33 
34  _richards_name_UO(getUserObject<RichardsVarNames>("richardsVarNames_UO")),
35  _pvar(_richards_name_UO.richards_var_num(coupled("variable"))),
36 
37  _flux(getMaterialProperty<std::vector<RealVectorValue>>("flux")),
38 
39  _func(getFunction("excav_geom_function"))
40 {
41 }
42 
43 Real
45 {
46  return -_func.value(_t, _q_point[_qp]) * _normals[_qp] * _flux[_qp][_pvar] * _dt;
47 }
registerMooseObject
registerMooseObject("RichardsApp", RichardsExcavFlow)
validParams< RichardsExcavFlow >
InputParameters validParams< RichardsExcavFlow >()
Definition: RichardsExcavFlow.C:18
RichardsVarNames
This holds maps between pressure_var or pressure_var, sat_var used in RichardsMaterial and kernels,...
Definition: RichardsVarNames.h:25
RichardsExcavFlow::computeQpIntegral
virtual Real computeQpIntegral()
Definition: RichardsExcavFlow.C:44
RichardsExcavFlow::_func
const Function & _func
the RichardsExcavGeom that defines where on the boundary we'll compute the mass flux
Definition: RichardsExcavFlow.h:44
RichardsExcavFlow
Records total mass flow into an excavation defined by a RichardsExcavGeom function.
Definition: RichardsExcavFlow.h:26
RichardsExcavFlow::_pvar
unsigned int _pvar
the richards variable number for which we want the mass flow
Definition: RichardsExcavFlow.h:38
RichardsExcavFlow::RichardsExcavFlow
RichardsExcavFlow(const InputParameters &parameters)
Definition: RichardsExcavFlow.C:31
RichardsExcavFlow.h
RichardsExcavFlow::_flux
const MaterialProperty< std::vector< RealVectorValue > > & _flux
mass-flux of fluid (a vector in the multicomponent case)
Definition: RichardsExcavFlow.h:41