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