www.mooseframework.org
RichardsExcavGeom.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 "RichardsExcavGeom.h"
11 
13 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<Function>();
19  params.addRequiredParam<RealVectorValue>(
20  "start_posn",
21  "Start point of the excavation. This is an (x,y,z) point in the middle of the "
22  "coal face at the very beginning of the panel.");
23  params.addRequiredParam<Real>("start_time", "Commencement time of the excavation");
24  params.addRequiredParam<RealVectorValue>("end_posn",
25  "End position of the excavation. This is "
26  "an (x,y,z) point in the middle of the coal "
27  "face at the very end of the panel.");
28  params.addRequiredParam<Real>("end_time", "Time at the completion of the excavation");
29  params.addRequiredParam<Real>("active_length",
30  "This function is only active at a point if the "
31  "distance between the point and the coal face <= "
32  "active_length.");
33  params.addParam<Real>("true_value",
34  1.0,
35  "Return this value if a point is in the active zone. "
36  "This is usually used for controlling "
37  "permeability-changes");
38  params.addParam<Real>(
39  "deactivation_time", 1.0E30, "Time at which this function is totally turned off");
40  params.addClassDescription("This function defines excavation geometry. It can be used to "
41  "enforce pressures at the boundary of excavations, and to record "
42  "fluid fluxes into excavations.");
43  return params;
44 }
45 
46 RichardsExcavGeom::RichardsExcavGeom(const InputParameters & parameters)
47  : Function(parameters),
48  _start_posn(getParam<RealVectorValue>("start_posn")),
49  _start_time(getParam<Real>("start_time")),
50  _end_posn(getParam<RealVectorValue>("end_posn")),
51  _end_time(getParam<Real>("end_time")),
52  _active_length(getParam<Real>("active_length")),
53  _true_value(getParam<Real>("true_value")),
54  _deactivation_time(getParam<Real>("deactivation_time")),
55  _retreat_vel(_end_posn - _start_posn)
56 {
57  if (_start_time >= _end_time)
58  mooseError("Start time for excavation set to ",
60  " but this must be less than the end time, which is ",
61  _end_time);
62  _retreat_vel /= (_end_time - _start_time); // this is now a velocity
64 }
65 
66 Real
67 RichardsExcavGeom::value(Real t, const Point & p) const
68 {
69  if (t < _start_time || (p - _start_posn) * _retreat_vel < 0)
70  // point is behind start posn - it'll never be active
71  return 0.0;
72 
73  if (t >= _deactivation_time)
74  return 0.0;
75 
76  RealVectorValue current_posn;
77  if (t >= _end_time)
78  current_posn = _end_posn;
79  else
80  current_posn = _start_posn + (t - _start_time) * _retreat_vel;
81 
82  Real distance_into_goaf = (current_posn - p) * _retreat_vel / _norm_retreat_vel;
83 
84  if (distance_into_goaf < 0)
85  // point is ahead of current_posn
86  return 0.0;
87 
88  if (distance_into_goaf > _active_length)
89  // point is too far into goaf
90  return 0.0;
91 
92  return _true_value;
93 }
validParams< RichardsExcavGeom >
InputParameters validParams< RichardsExcavGeom >()
Definition: RichardsExcavGeom.C:16
RichardsExcavGeom
Defines excavation geometry.
Definition: RichardsExcavGeom.h:45
RichardsExcavGeom.h
RichardsExcavGeom::value
virtual Real value(Real t, const Point &p) const
Definition: RichardsExcavGeom.C:67
RichardsExcavGeom::_active_length
Real _active_length
active length
Definition: RichardsExcavGeom.h:66
RichardsExcavGeom::RichardsExcavGeom
RichardsExcavGeom(const InputParameters &parameters)
Definition: RichardsExcavGeom.C:46
RichardsExcavGeom::_norm_retreat_vel
Real _norm_retreat_vel
norm of retreat velocity
Definition: RichardsExcavGeom.h:78
RichardsExcavGeom::_end_time
Real _end_time
end time
Definition: RichardsExcavGeom.h:63
RichardsExcavGeom::_true_value
Real _true_value
true value to return
Definition: RichardsExcavGeom.h:69
registerMooseObject
registerMooseObject("RichardsApp", RichardsExcavGeom)
RichardsExcavGeom::_retreat_vel
RealVectorValue _retreat_vel
retreat velocity
Definition: RichardsExcavGeom.h:75
RichardsExcavGeom::_start_time
Real _start_time
start time
Definition: RichardsExcavGeom.h:57
RichardsExcavGeom::_deactivation_time
Real _deactivation_time
deactivation time
Definition: RichardsExcavGeom.h:72
RichardsExcavGeom::_start_posn
RealVectorValue _start_posn
start position
Definition: RichardsExcavGeom.h:54
RichardsExcavGeom::_end_posn
RealVectorValue _end_posn
end position
Definition: RichardsExcavGeom.h:60