www.mooseframework.org
Public Member Functions | Protected Attributes | List of all members
MovingPlanarFront Class Reference

Defines the position of a moving front. More...

#include <MovingPlanarFront.h>

Inheritance diagram for MovingPlanarFront:
[legend]

Public Member Functions

 MovingPlanarFront (const InputParameters &parameters)
 
virtual Real value (Real t, const Point &p) override
 

Protected Attributes

const RealVectorValue _start_posn
 Initial position of front. More...
 
const RealVectorValue _end_posn
 Final position of the front: together with start_posn this defines the front's normal. More...
 
Function & _distance
 The front's distance from start_posn (along the normal direction) More...
 
const Real _active_length
 Active length. More...
 
const Real _true_value
 True value to return. More...
 
const Real _false_value
 False value to return. More...
 
const Real _activation_time
 Activation time. More...
 
const Real _deactivation_time
 Deactivation time. More...
 
RealVectorValue _front_normal
 Front unit normal. More...
 

Detailed Description

Defines the position of a moving front.

The front is an infinite plane with normal pointing from start_posn to end_posn. The front's distance from start_posn is defined by the 'distance' function

This Function may be used to define the geometry of an underground excavation, probably in conjunction with a predefined sideset.

Definition at line 29 of file MovingPlanarFront.h.

Constructor & Destructor Documentation

◆ MovingPlanarFront()

MovingPlanarFront::MovingPlanarFront ( const InputParameters &  parameters)

Definition at line 57 of file MovingPlanarFront.C.

58  : Function(parameters),
59  FunctionInterface(this),
60  _start_posn(getParam<RealVectorValue>("start_posn")),
61  _end_posn(getParam<RealVectorValue>("end_posn")),
62  _distance(getFunction("distance")),
63  _active_length(getParam<Real>("active_length")),
64  _true_value(getParam<Real>("true_value")),
65  _false_value(getParam<Real>("false_value")),
66  _activation_time(getParam<Real>("activation_time")),
67  _deactivation_time(getParam<Real>("deactivation_time")),
69 {
70  if (_front_normal.size() == 0)
71  mooseError("MovingPlanarFront: start_posn and end_posn must be different points");
72  _front_normal /= _front_normal.size();
73 }
const Real _activation_time
Activation time.
const Real _deactivation_time
Deactivation time.
const RealVectorValue _start_posn
Initial position of front.
const Real _false_value
False value to return.
Function & _distance
The front&#39;s distance from start_posn (along the normal direction)
const Real _true_value
True value to return.
const RealVectorValue _end_posn
Final position of the front: together with start_posn this defines the front&#39;s normal.
const Real _active_length
Active length.
RealVectorValue _front_normal
Front unit normal.

Member Function Documentation

◆ value()

Real MovingPlanarFront::value ( Real  t,
const Point &  p 
)
overridevirtual

Definition at line 76 of file MovingPlanarFront.C.

77 {
78  if (t < _activation_time)
79  return _false_value;
80 
81  if (t >= _deactivation_time)
82  return _false_value;
83 
84  if ((p - _start_posn) * _front_normal < 0)
85  // point is behind start posn - it'll never be active
86  return _false_value;
87 
88  const RealVectorValue current_posn = _start_posn + _distance.value(t, p) * _front_normal;
89 
90  const Real distance_ahead_of_front = (p - current_posn) * _front_normal;
91 
92  if (distance_ahead_of_front > 0)
93  return _false_value;
94 
95  if (distance_ahead_of_front < -_active_length)
96  // point is too far behind front
97  return _false_value;
98 
99  return _true_value;
100 }
const Real _activation_time
Activation time.
const Real _deactivation_time
Deactivation time.
const RealVectorValue _start_posn
Initial position of front.
const Real _false_value
False value to return.
Function & _distance
The front&#39;s distance from start_posn (along the normal direction)
const Real _true_value
True value to return.
const Real _active_length
Active length.
RealVectorValue _front_normal
Front unit normal.

Member Data Documentation

◆ _activation_time

const Real MovingPlanarFront::_activation_time
protected

Activation time.

Definition at line 56 of file MovingPlanarFront.h.

Referenced by value().

◆ _active_length

const Real MovingPlanarFront::_active_length
protected

Active length.

Definition at line 47 of file MovingPlanarFront.h.

Referenced by value().

◆ _deactivation_time

const Real MovingPlanarFront::_deactivation_time
protected

Deactivation time.

Definition at line 59 of file MovingPlanarFront.h.

Referenced by value().

◆ _distance

Function& MovingPlanarFront::_distance
protected

The front's distance from start_posn (along the normal direction)

Definition at line 44 of file MovingPlanarFront.h.

Referenced by value().

◆ _end_posn

const RealVectorValue MovingPlanarFront::_end_posn
protected

Final position of the front: together with start_posn this defines the front's normal.

Definition at line 41 of file MovingPlanarFront.h.

◆ _false_value

const Real MovingPlanarFront::_false_value
protected

False value to return.

Definition at line 53 of file MovingPlanarFront.h.

Referenced by value().

◆ _front_normal

RealVectorValue MovingPlanarFront::_front_normal
protected

Front unit normal.

Definition at line 62 of file MovingPlanarFront.h.

Referenced by MovingPlanarFront(), and value().

◆ _start_posn

const RealVectorValue MovingPlanarFront::_start_posn
protected

Initial position of front.

Definition at line 38 of file MovingPlanarFront.h.

Referenced by value().

◆ _true_value

const Real MovingPlanarFront::_true_value
protected

True value to return.

Definition at line 50 of file MovingPlanarFront.h.

Referenced by value().


The documentation for this class was generated from the following files: