Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Spencer <[email protected]>
  • Loading branch information
lynnmunday and bwspenc authored Dec 23, 2024
1 parent 22a9519 commit dfffda7
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ where $\boldsymbol{n}$ is the normal direction vector and $\boldsymbol{\sigma}$

Data produced by this VectorPostprocessor is used in conjunction with the [InteractionIntegral.md] in the XFEM module by the `MeshCut2DFractureUserObject` to grow cracks. The `CrackFrontNonlocalStress` is useful for extending cracks that are approaching free surfaces because the interaction integrals computing `KI` and `KII` are affected when the integration domain intersects the free surface. `CrackFrontNonlocalStress` computes an average of the stress over a box-shaped domain at each crack tip point that is centered on the crack tip and extends [!param](/VectorPostprocessors/CrackFrontNonlocalStress/box_length) in front of the crack tip. The [!param](/VectorPostprocessors/CrackFrontNonlocalStress/box_height) is the dimension normal to the crack face, and [!param](/VectorPostprocessors/CrackFrontNonlocalStress/box_width) is the dimension tangential to the crack face. [!param](/VectorPostprocessors/CrackFrontNonlocalStress/box_width) is not used in 2D problems. Unlike the other stress integrals, like the [InteractionIntegral.md], that use the [CrackFrontDefinition.md], `CrackFrontNonlocalStress` is not set-up by the [/DomainIntegralAction.md].

In the following input file example, the mesh consists of a 3D plate with a hole in the middle. The CrackFrontDefinition defines crack points around the center line of the hole, `boundary=1001`. The `CrackFrontNonlocalStress` integrates a generic stress field set-up in the input file over the box dimensions at each crack front point.
In the following input file example, the mesh consists of a 3D plate with a hole in the middle. The CrackFrontDefinition defines crack points around the center line of the hole, `boundary=1001`. The `CrackFrontNonlocalStress` averages a generic stress field over the box-shaped region at each crack front point, with dimensions defined in the input file.

!listing crack_front_nonlocal_materials.i block=UserObjects VectorPostprocessors/CrackFrontNonlocalStress

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// Forward Declarations
class CrackFrontDefinition;
/**
* Computes the average material property at points provided by the
* Computes the average material property in regions near points provided by the
* crack_front_definition vectorpostprocessor.
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "RankTwoTensor.h"

/**
* Computes the average stress magnitude normal to the crack face at points provided by the
* Computes the average stress magnitude in the direction normal to the crack font at points provided by the
* crack_front_definition vectorpostprocessor.
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ CrackFrontNonlocalMaterialBase::validParams()
"multiple mechanics material systems on the same "
"block, i.e. for multiple phases");
params.set<bool>("use_displaced_mesh") = false;
// EXEC_NONLINEAR to work with xfem_udpates
params.set<ExecFlagEnum>("execute_on") = {EXEC_TIMESTEP_BEGIN};
params.addClassDescription("Computes the average material property at a crack front.");
return params;
Expand Down Expand Up @@ -80,14 +79,14 @@ CrackFrontNonlocalMaterialBase::execute()
// icfp crack front point index
for (std::size_t icfp = 0; icfp < _avg_crack_tip_scalar.size(); icfp++)
{
Point crack_face_normal = _crack_front_definition->getCrackFrontNormal(icfp);
Point crack_front_normal = _crack_front_definition->getCrackFrontNormal(icfp);
for (unsigned int qp = 0; qp < _qrule->n_points(); qp++)
{
Real q = BoxWeightingFunction(icfp, _q_point[qp]);
if (q == 0)
continue;

Real scalar = getQPCrackFrontScalar(qp, crack_face_normal);
Real scalar = getQPCrackFrontScalar(qp, crack_front_normal);
_avg_crack_tip_scalar[icfp] += _JxW[qp] * _coord[qp] * scalar * q;
_volume[icfp] += _JxW[qp] * _coord[qp] * q;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/xfem/src/userobjects/MeshCut2DFractureUserObject.C
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ MeshCut2DFractureUserObject::findActiveBoundaryGrowth()

if (_k_critical_vpp && ((_k_critical_vpp->size() != _original_and_current_front_node_ids.size())))
mooseError(
"k_critical_vectorpostprocessor should have the same number of crack front points as "
"k_critical_vectorpostprocessor must have the same number of crack front points as "
"CrackFrontDefinition.",
"\n k_critical_vectorpostprocessor size = ",
_k_critical_vpp->size(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
used_by_xfem_to_grow_crack = true
[]

# MeshCut2DFractureUserObject are included in seperate input files
# MeshCut2DFractureUserObject are included in separate input files
# [UserObjects]
# [cut_mesh2]
# type = MeshCut2DFractureUserObject
Expand Down

0 comments on commit dfffda7

Please sign in to comment.