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

Coupled auxiliary value. More...

#include <DomainIntegralQFunction.h>

Inheritance diagram for DomainIntegralQFunction:
[legend]

Public Member Functions

 DomainIntegralQFunction (const InputParameters &parameters)
 Factory constructor, takes parameters so that all derived classes can be built using the same constructor. More...
 
virtual ~DomainIntegralQFunction ()
 

Protected Member Functions

virtual void initialSetup ()
 
virtual Real computeValue ()
 
void projectToFrontAtPoint (Real &dist_to_front, Real &dist_along_tangent)
 

Private Attributes

const Real _j_integral_radius_inner
 
const Real _j_integral_radius_outer
 
const CrackFrontDefinition *const _crack_front_definition
 
bool _has_crack_front_point_index
 
const unsigned int _crack_front_point_index
 
bool _treat_as_2d
 
bool _is_point_on_intersecting_boundary
 

Detailed Description

Coupled auxiliary value.

Definition at line 16 of file DomainIntegralQFunction.h.

Constructor & Destructor Documentation

DomainIntegralQFunction::DomainIntegralQFunction ( const InputParameters &  parameters)

Factory constructor, takes parameters so that all derived classes can be built using the same constructor.

Definition at line 26 of file DomainIntegralQFunction.C.

27  : AuxKernel(parameters),
28  _j_integral_radius_inner(getParam<Real>("j_integral_radius_inner")),
29  _j_integral_radius_outer(getParam<Real>("j_integral_radius_outer")),
30  _crack_front_definition(&getUserObject<CrackFrontDefinition>("crack_front_definition")),
31  _has_crack_front_point_index(isParamValid("crack_front_point_index")),
33  _has_crack_front_point_index ? getParam<unsigned int>("crack_front_point_index") : 0),
34  _treat_as_2d(false),
36 {
37 }
const CrackFrontDefinition *const _crack_front_definition
const unsigned int _crack_front_point_index
virtual DomainIntegralQFunction::~DomainIntegralQFunction ( )
inlinevirtual

Definition at line 25 of file DomainIntegralQFunction.h.

25 {}

Member Function Documentation

Real DomainIntegralQFunction::computeValue ( )
protectedvirtual

Definition at line 64 of file DomainIntegralQFunction.C.

Referenced by ~DomainIntegralQFunction().

65 {
66  Real dist_to_crack_front;
67  Real dist_along_tangent;
68  projectToFrontAtPoint(dist_to_crack_front, dist_along_tangent);
69 
70  Real q = 1.0;
71  if (dist_to_crack_front > _j_integral_radius_inner &&
72  dist_to_crack_front < _j_integral_radius_outer)
73  q = (_j_integral_radius_outer - dist_to_crack_front) /
75  else if (dist_to_crack_front >= _j_integral_radius_outer)
76  q = 0.0;
77 
78  if (q > 0.0)
79  {
80  Real tangent_multiplier = 1.0;
81  if (!_treat_as_2d)
82  {
83  const Real forward_segment_length =
85  const Real backward_segment_length =
87 
88  if (dist_along_tangent >= 0.0)
89  {
90  if (forward_segment_length > 0.0)
91  tangent_multiplier = 1.0 - dist_along_tangent / forward_segment_length;
92  }
93  else
94  {
95  if (backward_segment_length > 0.0)
96  tangent_multiplier = 1.0 + dist_along_tangent / backward_segment_length;
97  }
98  }
99 
100  tangent_multiplier = std::max(tangent_multiplier, 0.0);
101  tangent_multiplier = std::min(tangent_multiplier, 1.0);
102 
103  // Set to zero if a node is on a designated free surface and its crack front node is not.
106  tangent_multiplier = 0.0;
107 
108  q *= tangent_multiplier;
109  }
110 
111  return q;
112 }
Real getCrackFrontBackwardSegmentLength(const unsigned int point_index) const
void projectToFrontAtPoint(Real &dist_to_front, Real &dist_along_tangent)
const CrackFrontDefinition *const _crack_front_definition
bool isNodeOnIntersectingBoundary(const Node *const node) const
const unsigned int _crack_front_point_index
Real getCrackFrontForwardSegmentLength(const unsigned int point_index) const
void DomainIntegralQFunction::initialSetup ( )
protectedvirtual

Definition at line 40 of file DomainIntegralQFunction.C.

Referenced by ~DomainIntegralQFunction().

41 {
43 
44  if (_treat_as_2d)
45  {
47  {
48  mooseWarning(
49  "crack_front_point_index ignored because CrackFrontDefinition is set to treat as 2D");
50  }
51  }
52  else
53  {
55  {
56  mooseError("crack_front_point_index must be specified in DomainIntegralQFunction");
57  }
58  }
61 }
bool isPointWithIndexOnIntersectingBoundary(const unsigned int point_index) const
const CrackFrontDefinition *const _crack_front_definition
const unsigned int _crack_front_point_index
void DomainIntegralQFunction::projectToFrontAtPoint ( Real &  dist_to_front,
Real &  dist_along_tangent 
)
protected

Definition at line 115 of file DomainIntegralQFunction.C.

Referenced by computeValue(), and ~DomainIntegralQFunction().

116 {
117  const Point * crack_front_point =
119 
120  Point p = *_current_node;
121  const RealVectorValue & crack_front_tangent =
123 
124  RealVectorValue crack_node_to_current_node = p - *crack_front_point;
125  dist_along_tangent = crack_node_to_current_node * crack_front_tangent;
126  RealVectorValue projection_point = *crack_front_point + dist_along_tangent * crack_front_tangent;
127  RealVectorValue axis_to_current_node = p - projection_point;
128  dist_to_front = axis_to_current_node.norm();
129 }
const RealVectorValue & getCrackFrontTangent(const unsigned int point_index) const
const Point * getCrackFrontPoint(const unsigned int point_index) const
const CrackFrontDefinition *const _crack_front_definition
const unsigned int _crack_front_point_index

Member Data Documentation

const CrackFrontDefinition* const DomainIntegralQFunction::_crack_front_definition
private

Definition at line 35 of file DomainIntegralQFunction.h.

Referenced by computeValue(), initialSetup(), and projectToFrontAtPoint().

const unsigned int DomainIntegralQFunction::_crack_front_point_index
private

Definition at line 37 of file DomainIntegralQFunction.h.

Referenced by computeValue(), initialSetup(), and projectToFrontAtPoint().

bool DomainIntegralQFunction::_has_crack_front_point_index
private

Definition at line 36 of file DomainIntegralQFunction.h.

Referenced by initialSetup().

bool DomainIntegralQFunction::_is_point_on_intersecting_boundary
private

Definition at line 39 of file DomainIntegralQFunction.h.

Referenced by computeValue(), and initialSetup().

const Real DomainIntegralQFunction::_j_integral_radius_inner
private

Definition at line 33 of file DomainIntegralQFunction.h.

Referenced by computeValue().

const Real DomainIntegralQFunction::_j_integral_radius_outer
private

Definition at line 34 of file DomainIntegralQFunction.h.

Referenced by computeValue().

bool DomainIntegralQFunction::_treat_as_2d
private

Definition at line 38 of file DomainIntegralQFunction.h.

Referenced by computeValue(), and initialSetup().


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