18 params.
addRequiredParam<RealVectorValue>(
"start_posn",
"Initial position of the front");
19 params.
addRequiredParam<RealVectorValue>(
"end_posn",
"Final position of the front");
22 "The front is an infinite plane with normal pointing from start_posn to "
23 "end_posn. The front's distance from start_posn is defined by distance. You "
24 "should ensure that distance is positive");
27 std::numeric_limits<Real>::max(),
28 "Points greater than active_length behind the front will return false_value");
29 params.
addParam<Real>(
"true_value", 1.0,
"Return this value if a point is in the active zone.");
31 "false_value", 0.0,
"Return this value if a point is not in the active zone.");
32 params.
addParam<Real>(
"activation_time",
33 std::numeric_limits<Real>::lowest(),
34 "This function will return false_value when t < activation_time");
35 params.
addParam<Real>(
"deactivation_time",
36 std::numeric_limits<Real>::max(),
37 "This function will return false_value when t >= deactivation_time");
39 "This function defines the position of a moving front. The front is "
40 "an infinite plane with normal pointing from start_posn to end_posn. The front's distance "
41 "from start_posn is defined by 'distance', so if the 'distance' function is time dependent, "
42 "the front's position will change with time. Roughly speaking, the function returns "
43 "true_value for points lying in between start_posn and start_posn + distance. Precisely "
44 "speaking, two planes are constructed, both with normal pointing from start_posn to "
45 "end_posn. The first plane passes through start_posn; the second plane passes through "
46 "end_posn. Given a point p and time t, this function returns false_value if ANY of the "
47 "following are true: (a) t<activation_time; (b) t>=deactivation_time; (c) p is 'behind' "
48 "start_posn (ie, p lies on one side of the start_posn plane and end_posn lies on the other "
49 "side); (d) p is 'ahead' of the front (ie, p lies one one side of the front and start_posn "
50 "lies on the other side); (e) the distance between p and the front is greater than "
51 "active_length. Otherwise, the point is 'in the active zone' and the function returns "
59 _start_posn(getParam<RealVectorValue>(
"start_posn")),
60 _end_posn(getParam<RealVectorValue>(
"end_posn")),
61 _distance(getFunction(
"distance")),
62 _active_length(getParam<Real>(
"active_length")),
63 _true_value(getParam<Real>(
"true_value")),
64 _false_value(getParam<Real>(
"false_value")),
65 _activation_time(getParam<Real>(
"activation_time")),
66 _deactivation_time(getParam<Real>(
"deactivation_time")),
67 _front_normal(_end_posn - _start_posn)
70 mooseError(
"MovingPlanarFront: start_posn and end_posn must be different points");
89 const Real distance_ahead_of_front = (
p - current_posn) *
_front_normal;
91 if (distance_ahead_of_front > 0)
registerMooseObject("PorousFlowApp", MovingPlanarFront)
static InputParameters validParams()
virtual Real value(Real t, const Point &p) const
void mooseError(Args &&... args) const
Defines the position of a moving front.
const Real _activation_time
Activation time.
virtual Real value(Real t, const Point &p) const override
const Function & _distance
The front's distance from start_posn (along the normal direction)
const Real _active_length
Active length.
const RealVectorValue _start_posn
Initial position of front.
static InputParameters validParams()
const Real _false_value
False value to return.
const Real _deactivation_time
Deactivation time.
RealVectorValue _front_normal
Front unit normal.
const Real _true_value
True value to return.
MovingPlanarFront(const InputParameters ¶meters)