18 params.
addClassDescription(
"Computes the q-function for a segment along the crack front, used in "
19 "the calculation of the J-integral");
20 params.
addRequiredParam<Real>(
"j_integral_radius_inner",
"Radius for J-Integral calculation");
21 params.
addRequiredParam<Real>(
"j_integral_radius_outer",
"Radius for J-Integral calculation");
23 "The CrackFrontDefinition user object name");
25 "crack_front_point_index",
26 "The index of the point on the crack front corresponding to this q function");
27 params.
set<
bool>(
"use_displaced_mesh") =
false;
33 _j_integral_radius_inner(getParam<Real>(
"j_integral_radius_inner")),
34 _j_integral_radius_outer(getParam<Real>(
"j_integral_radius_outer")),
36 _has_crack_front_point_index(isParamValid(
"crack_front_point_index")),
37 _crack_front_point_index(
38 _has_crack_front_point_index ? getParam<unsigned
int>(
"crack_front_point_index") : 0),
40 _is_point_on_intersecting_boundary(false)
54 "crack_front_point_index ignored because CrackFrontDefinition is set to treat as 2D");
61 mooseError(
"crack_front_point_index must be specified in DomainIntegralQFunction");
71 Real dist_to_crack_front;
72 Real dist_along_tangent;
85 Real tangent_multiplier = 1.0;
88 const Real forward_segment_length =
90 const Real backward_segment_length =
93 if (dist_along_tangent >= 0.0)
95 if (forward_segment_length > 0.0)
96 tangent_multiplier = 1.0 - dist_along_tangent / forward_segment_length;
100 if (backward_segment_length > 0.0)
101 tangent_multiplier = 1.0 + dist_along_tangent / backward_segment_length;
105 tangent_multiplier = std::max(tangent_multiplier, 0.0);
106 tangent_multiplier = std::min(tangent_multiplier, 1.0);
111 tangent_multiplier = 0.0;
113 q *= tangent_multiplier;
122 const Point * crack_front_point =
126 const RealVectorValue & crack_front_tangent =
129 RealVectorValue crack_node_to_current_node =
p - *crack_front_point;
130 dist_along_tangent = crack_node_to_current_node * crack_front_tangent;
131 RealVectorValue projection_point = *crack_front_point + dist_along_tangent * crack_front_tangent;
132 RealVectorValue axis_to_current_node =
p - projection_point;
133 dist_to_front = axis_to_current_node.
norm();
registerMooseObject("SolidMechanicsApp", DomainIntegralQFunction)
void ErrorVector unsigned int
const Node *const & _current_node
static InputParameters validParams()
Class used in fracture integrals to define geometric characteristics of the crack front.
const Point * getCrackFrontPoint(const std::size_t point_index) const
Get a Point object for a specified point on the crack front.
Real getCrackFrontBackwardSegmentLength(const std::size_t point_index) const
Get the length of the line segment on the crack front behind the specified position.
bool treatAs2D() const
Whether the fracture computations are treated as 2D for the model.
Real getCrackFrontForwardSegmentLength(const std::size_t point_index) const
Get the length of the line segment on the crack front ahead of the specified position.
bool usingMeshCutter() const
Is the crack defined by a mesh cutter object.
bool isNodeOnIntersectingBoundary(const Node *const node) const
Determine whether a given node is on one of the boundaries that intersects an end of the crack front.
const RealVectorValue & getCrackFrontTangent(const std::size_t point_index) const
Get the vector tangent to the crack front at a specified position.
bool isPointWithIndexOnIntersectingBoundary(const std::size_t point_index) const
Determine whether a given crack front point is on one of the boundaries that intersects an end of the...
const Real _j_integral_radius_inner
virtual void initialSetup()
static InputParameters validParams()
const unsigned int _crack_front_point_index
void projectToFrontAtPoint(Real &dist_to_front, Real &dist_along_tangent)
virtual Real computeValue()
DomainIntegralQFunction(const InputParameters ¶meters)
Factory constructor, takes parameters so that all derived classes can be built using the same constru...
bool _has_crack_front_point_index
const CrackFrontDefinition *const _crack_front_definition
bool _is_point_on_intersecting_boundary
const Real _j_integral_radius_outer
void mooseError(Args &&... args) const
void mooseWarning(Args &&... args) const