-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nonlocal cracktip material #29576
base: next
Are you sure you want to change the base?
Nonlocal cracktip material #29576
Conversation
…ck tip. The lower k critical causes the crack to grow one element deeper into the bulk material in the minus x direction
Job Documentation, step Docs: sync website on ad6bdcc wanted to post the following: View the site here This comment will be updated on new commits. |
Job Conda (Rocky) on 3740102 : invalidated by @lynnmunday |
Job OpenMPI on 3740102 : invalidated by @lynnmunday |
Job Test HPC on 3740102 : invalidated by @lynnmunday |
@bwspenc Will you review? |
Job Coverage, step Generate coverage on ad6bdcc wanted to post the following: Framework coverageCoverage did not change Modules coverageSolid mechanics
Xfem
Full coverage reportsReports
This comment will be updated on new commits. |
8da5e53
to
81f8043
Compare
…nt Kcrit or kcrit from vpp crack growth. Added error checking and testing for these options.
81f8043
to
22a9519
Compare
All jobs on 22a9519 : invalidated by @lynnmunday |
@@ -0,0 +1,19 @@ | |||
# CrackFrontNonlocalScalar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something like CrackFrontNonlocalScalarMaterial
would be more descriptive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
||
## Description | ||
|
||
This object computes the average scalar material property at the crack front points defined by [CrackFrontDefinition.md]. The main use case for this `VectorPostprocessor` is to compute an average fracture toughness or $k_crit$ at the crack front for use with the `MeshCut2DFractureUserObject` to grow cracks. This allows for spatially varying $k_crit$ values defined by a `Material`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This object computes the average scalar material property at the crack front points defined by [CrackFrontDefinition.md]. The main use case for this `VectorPostprocessor` is to compute an average fracture toughness or $k_crit$ at the crack front for use with the `MeshCut2DFractureUserObject` to grow cracks. This allows for spatially varying $k_crit$ values defined by a `Material`. | |
This object computes the average of a scalar material property over regions ahead of the crack tip, as defined by the front points obtained from [CrackFrontDefinition.md]. The main use cases for this `VectorPostprocessor` is to compute an average fracture toughness or $k_crit$ at the crack front for use with the `MeshCut2DFractureUserObject` to grow cracks, but this can be used for other scalar material properties as well. This allows for spatially varying $k_crit$ values defined by a `Material`. |
modules/solid_mechanics/doc/content/source/vectorpostprocessors/CrackFrontNonlocalStress.md
Outdated
Show resolved
Hide resolved
modules/solid_mechanics/include/vectorpostprocessors/CrackFrontNonlocalMaterialBase.h
Outdated
Show resolved
Hide resolved
modules/solid_mechanics/include/vectorpostprocessors/CrackFrontNonlocalStress.h
Outdated
Show resolved
Hide resolved
modules/solid_mechanics/src/vectorpostprocessors/CrackFrontNonlocalMaterialBase.C
Outdated
Show resolved
Hide resolved
modules/solid_mechanics/src/vectorpostprocessors/CrackFrontNonlocalMaterialBase.C
Outdated
Show resolved
Hide resolved
modules/solid_mechanics/src/vectorpostprocessors/CrackFrontNonlocalStress.C
Outdated
Show resolved
Hide resolved
modules/xfem/test/tests/mesh_cut_2D_fracture/edge_crack_2d_propagation.i
Outdated
Show resolved
Hide resolved
Co-authored-by: Ben Spencer <[email protected]>
ed48de3
to
91b45b9
Compare
Job Precheck, step Clang format on 91b45b9 wanted to post the following: Your code requires style changes. A patch was auto generated and copied here
Alternatively, with your repository up to date and in the top level of your repository:
|
1c83119
to
4b6d396
Compare
All jobs on 4b6d396 : invalidated by @lynnmunday |
c7bdcd9
to
4512c85
Compare
4512c85
to
ad6bdcc
Compare
Job OpenMPI on ad6bdcc : invalidated by @lynnmunday |
Job Test HPC on ad6bdcc : invalidated by @lynnmunday |
2 similar comments
Job Test HPC on ad6bdcc : invalidated by @lynnmunday |
Job Test HPC on ad6bdcc : invalidated by @lynnmunday |
@bwspenc Will you review this again and merge? |
/** | ||
* Computes the average material property in regions near points provided by the | ||
* crack_front_definition vectorpostprocessor. | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | |
* Computes the average material property in regions near points provided by the | |
* crack_front_definition vectorpostprocessor. | |
*/ | |
/** | |
* Computes the average material property in regions near points provided by the | |
* crack_front_definition vectorpostprocessor. | |
*/ |
CrackFrontNonlocalScalarMaterial(const InputParameters & parameters); | ||
|
||
protected: | ||
/// The scalar material property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// The scalar material property | |
/// Property that is averaged over the crack front points |
*/ | ||
class CrackFrontNonlocalStress : public ElementVectorPostprocessor | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: ElementVectorPostprocessor(parameters), | ||
_property_name(property_name), | ||
_box_length(getParam<Real>("box_length")), | ||
_box_width(isParamValid("box_width") ? getParam<Real>("box_width") : 1), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not default that parameter to 1.0?
CrackFrontNonlocalMaterialBase::execute() | ||
{ | ||
// icfp crack front point index | ||
for (std::size_t icfp = 0; icfp < _avg_crack_tip_scalar.size(); icfp++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (std::size_t icfp = 0; icfp < _avg_crack_tip_scalar.size(); icfp++) | |
for (const auto icfp: index_range(_avg_crack_tip_scalar)) |
gatherSum(_avg_crack_tip_scalar); | ||
gatherSum(_volume); | ||
|
||
for (std::size_t icfp = 0; icfp < _avg_crack_tip_scalar.size(); ++icfp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index_range
{ | ||
const auto & uo = static_cast<const CrackFrontNonlocalMaterialBase &>(y); | ||
|
||
for (auto i = beginIndex(_avg_crack_tip_scalar); i < _avg_crack_tip_scalar.size(); ++i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index_range etc.
Real q = 0.0; | ||
if ((crack_node_to_current_node_rot(0) > 0) && | ||
(crack_node_to_current_node_rot(0) <= _box_length) && | ||
(std::abs(crack_node_to_current_node_rot(1)) <= _box_height / 2) && | ||
(std::abs(crack_node_to_current_node_rot(2)) <= _box_width / 2)) | ||
{ | ||
q = 1.0; | ||
} | ||
|
||
return q; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Real q = 0.0; | |
if ((crack_node_to_current_node_rot(0) > 0) && | |
(crack_node_to_current_node_rot(0) <= _box_length) && | |
(std::abs(crack_node_to_current_node_rot(1)) <= _box_height / 2) && | |
(std::abs(crack_node_to_current_node_rot(2)) <= _box_width / 2)) | |
{ | |
q = 1.0; | |
} | |
return q; | |
if ((crack_node_to_current_node_rot(0) > 0) && | |
(crack_node_to_current_node_rot(0) <= _box_length) && | |
(std::abs(crack_node_to_current_node_rot(1)) <= _box_height / 2) && | |
(std::abs(crack_node_to_current_node_rot(2)) <= _box_width / 2)) | |
return 1.0; | |
return 0.0; |
closes #29575