www.mooseframework.org
CrackTipEnrichementCutOffBC.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
9 
10 template <>
11 InputParameters
13 {
14  InputParameters p = validParams<PresetBC>();
15  p.addRequiredParam<Real>("cut_off_radius",
16  "The cut off radius of crack tip enrichment functions");
17  p.set<bool>("use_displaced_mesh") = false;
18  p.addRequiredParam<UserObjectName>("crack_front_definition",
19  "The CrackFrontDefinition user object name");
20  return p;
21 }
22 
23 CrackTipEnrichmentCutOffBC::CrackTipEnrichmentCutOffBC(const InputParameters & parameters)
24  : PresetBC(parameters),
25  _cut_off_radius(getParam<Real>("cut_off_radius")),
26  _crack_front_definition(&getUserObject<CrackFrontDefinition>("crack_front_definition"))
27 {
28 }
29 
30 bool
32 {
33  Real r, theta;
34  _crack_front_definition->calculateRThetaToCrackFront((*_current_node), r, theta);
35 
36  if (r > _cut_off_radius)
37  return true;
38  else
39  return false;
40 }
void calculateRThetaToCrackFront(const Point qp, const unsigned int point_index, Real &r, Real &theta) const
calculate r and theta in the crack front polar cooridnate
CrackTipEnrichmentCutOffBC(const InputParameters &parameters)
InputParameters validParams< CrackTipEnrichmentCutOffBC >()
Works on top of NodalNormalsPreprocessor.
const CrackFrontDefinition * _crack_front_definition