https://mooseframework.inl.gov
RichardsExcav.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 
19 {
21  params.addRequiredParam<Real>(
22  "p_excav",
23  "Value of the variable at the surface of the excavation. Eg atmospheric pressure");
24  params.addRequiredParam<FunctionName>(
25  "excav_geom_function",
26  "The function describing the excavation geometry (type RichardsExcavGeom)");
27  params.addClassDescription("Allows the user to set variable values at the face of an excavation. "
28  " You must have defined the excavation start time, start position, "
29  "etc, through the excav_geom_function");
30  return params;
31 }
32 
34  : NodalBC(parameters),
35  _p_excav(getParam<Real>("p_excav")),
36  _func(getFunction("excav_geom_function"))
37 {
38 }
39 
40 bool
42 {
43  if (_func.value(_t, *_current_node) == 0.0)
44  return false;
45  else
46  return true;
47 }
48 
49 Real
51 {
52  return _u[_qp] - _p_excav;
53 }
RichardsExcav(const InputParameters &parameters)
Definition: RichardsExcav.C:33
const Function & _func
Controls which points are "active" on the boundary An "active" point is where _func != 0...
Definition: RichardsExcav.h:51
const Node *const & _current_node
Real _p_excav
The variable will be made equal to _p_excav at the "active" points on the boundary.
Definition: RichardsExcav.h:43
virtual bool shouldApply() const
if excav_geom_function is != 0 at the point on the boundary then apply the dirichlet BC ...
Definition: RichardsExcav.C:41
const unsigned int _qp
Allows specification of Dirichlet BCs on an evolving boundary RichardsExcav is applied on a sideset...
Definition: RichardsExcav.h:23
void addRequiredParam(const std::string &name, const std::string &doc_string)
virtual Real computeQpResidual()
Definition: RichardsExcav.C:50
Real & _t
registerMooseObject("RichardsApp", RichardsExcav)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
virtual Real value(Real t, const Point &p) const
static InputParameters validParams()
const VariableValue & _u
static InputParameters validParams()
Definition: RichardsExcav.C:18