www.mooseframework.org
RichardsExcav.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 #include "RichardsExcav.h"
9 #include "Function.h"
10 
11 #include <iostream>
12 
13 template <>
14 InputParameters
16 {
17  InputParameters params = validParams<NodalBC>();
18  params.addRequiredParam<Real>(
19  "p_excav",
20  "Value of the variable at the surface of the excavation. Eg atmospheric pressure");
21  params.addRequiredParam<FunctionName>(
22  "excav_geom_function",
23  "The function describing the excavation geometry (type RichardsExcavGeom)");
24  params.addClassDescription("Allows the user to set variable values at the face of an excavation. "
25  " You must have defined the excavation start time, start position, "
26  "etc, through the excav_geom_function");
27  return params;
28 }
29 
30 RichardsExcav::RichardsExcav(const InputParameters & parameters)
31  : NodalBC(parameters),
32  _p_excav(getParam<Real>("p_excav")),
33  _func(getFunction("excav_geom_function"))
34 {
35 }
36 
37 bool
39 {
40  if (_func.value(_t, *_current_node) == 0.0)
41  return false;
42  else
43  return true;
44 }
45 
46 Real
48 {
49  return _u[_qp] - _p_excav;
50 }
RichardsExcav(const InputParameters &parameters)
Definition: RichardsExcav.C:30
InputParameters validParams< RichardsExcav >()
Definition: RichardsExcav.C:15
Real _p_excav
The variable will be made equal to _p_excav at the "active" points on the boundary.
Definition: RichardsExcav.h:44
virtual Real computeQpResidual()
Definition: RichardsExcav.C:47
Function & _func
Controls which points are "active" on the boundary An "active" point is where _func != 0...
Definition: RichardsExcav.h:52
virtual bool shouldApply()
if excav_geom_function is != 0 at the point on the boundary then apply the dirichlet BC ...
Definition: RichardsExcav.C:38