18 params.
addClassDescription(
"Computes the q-function for a segment along the crack front, used in " 19 "the calculation of the J-integral");
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 =
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;
133 dist_to_front = axis_to_current_node.
norm();
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.
const Real _j_integral_radius_outer
auto norm() const -> decltype(std::norm(Real()))
virtual Real computeValue()
Real getCrackFrontBackwardSegmentLength(const std::size_t point_index) const
Get the length of the line segment on the crack front behind the specified position.
const Real _j_integral_radius_inner
const Node *const & _current_node
bool _is_point_on_intersecting_boundary
registerMooseObject("SolidMechanicsApp", DomainIntegralQFunction)
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...
void mooseWarning(Args &&... args) const
bool _has_crack_front_point_index
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.
void projectToFrontAtPoint(Real &dist_to_front, Real &dist_along_tangent)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const CrackFrontDefinition *const _crack_front_definition
DomainIntegralQFunction(const InputParameters ¶meters)
Factory constructor, takes parameters so that all derived classes can be built using the same constru...
const unsigned int _crack_front_point_index
void mooseError(Args &&... args) const
static InputParameters validParams()
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.
static InputParameters validParams()
bool usingMeshCutter() const
Is the crack defined by a mesh cutter object.
bool treatAs2D() const
Whether the fracture computations are treated as 2D for the model.
void ErrorVector unsigned int
virtual void initialSetup()