18 "The CrackFrontDefinition user object name");
20 "box_length",
"Dimension of property-averaging box in direction of crack extension.");
22 "box_height",
"Dimension of property-averaging box in direction normal to crack.");
23 params.
addParam<
Real>(
"box_width", 1.0,
"Distance tangent to front of crack front.");
24 params.
addParam<std::string>(
"base_name",
25 "Optional parameter that allows the user to define " 26 "multiple mechanics material systems on the same " 27 "block, i.e. for multiple phases");
28 params.
set<
bool>(
"use_displaced_mesh") =
false;
35 const std::string & property_name)
37 _property_name(property_name),
38 _box_length(getParam<
Real>(
"box_length")),
39 _box_width(getParam<
Real>(
"box_width")),
40 _box_height(getParam<
Real>(
"box_height")),
41 _base_name(isParamValid(
"base_name") ? getParam<
std::string>(
"base_name") +
"_" :
""),
42 _x(declareVector(
"x")),
43 _y(declareVector(
"y")),
44 _z(declareVector(
"z")),
45 _position(declareVector(
"id")),
47 _avg_crack_tip_scalar(declareVector(
"crack_tip_" + _base_name + _property_name))
50 paramError(
"box_width",
"Must define box_width in 3D problems.");
52 _depend_uo.insert(getParam<UserObjectName>(
"crack_front_definition"));
58 const auto uo_name = getParam<UserObjectName>(
"crack_front_definition");
60 &(getUserObjectByName<CrackFrontDefinition>(uo_name,
false));
69 _x.assign(num_pts, 0.0);
70 _y.assign(num_pts, 0.0);
71 _z.assign(num_pts, 0.0);
83 for (
unsigned int qp = 0; qp <
_qrule->n_points(); qp++)
109 _x[icfp] = (*cfp)(0);
110 _y[icfp] = (*cfp)(1);
111 _z[icfp] = (*cfp)(2);
129 const Point & qp_coord)
const 140 crack_front_point_index);
141 if ((crack_node_to_current_node_rot(0) > 0) &&
142 (crack_node_to_current_node_rot(0) <=
_box_length) &&
143 (std::abs(crack_node_to_current_node_rot(1)) <=
_box_height / 2) &&
144 (std::abs(crack_node_to_current_node_rot(2)) <=
_box_width / 2))
Real _box_length
dimensions of the box in front of the crack tip that the stress is averaged over The box is centered ...
CrackFrontNonlocalMaterialBase(const InputParameters ¶meters, const std::string &property_name)
VectorPostprocessorValue & _x
Vectors computed by this VectorPostprocessor: x,y,z coordinates, and position of nodes along crack fr...
const MooseArray< Point > & _q_point
virtual void finalize() override
const MooseArray< Real > & _coord
VectorPostprocessorValue & _position
VectorPostprocessorValue & _z
VectorPostprocessorValue & _avg_crack_tip_scalar
RealVectorValue rotateToCrackFrontCoords(const RealVectorValue vector, const std::size_t point_index) const
Rotate a vector in the global coordinate coordinate system to the crack front local coordinate system...
const std::vector< double > y
virtual void initialize() override
std::size_t getNumCrackFrontPoints() const
Get the number of points defining the crack front as a set of line segments.
const RealVectorValue & getCrackFrontNormal(const std::size_t point_index) const
Get the vector normal to the crack front at a specified position.
const Point * getCrackFrontPoint(const std::size_t point_index) const
Get a Point object for a specified point on the crack front.
Computes the average material property in regions near points provided by the crack_front_definition ...
virtual unsigned int dimension() const
const ExecFlagType EXEC_TIMESTEP_BEGIN
Real getDistanceAlongFront(const std::size_t point_index) const
Get the distance along the crack front from the beginning of the crack to the specified position...
void paramError(const std::string ¶m, Args... args) const
std::vector< Real > _volume
std::set< std::string > _depend_uo
bool isParamSetByUser(const std::string &nm) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const QBase *const & _qrule
const MooseArray< Real > & _JxW
const CrackFrontDefinition * _crack_front_definition
used to transform local coordinates to crack front coordinates
virtual void initialSetup() override
virtual void threadJoin(const UserObject &y) override
static InputParameters validParams()
Real BoxWeightingFunction(std::size_t crack_front_point_index, const Point &qp_coord) const
Determine whether a point is located within a specified crack front oriented box. ...
virtual Real getQPCrackFrontScalar(const unsigned int qp, const Point crack_face_normal) const =0
Determine whether a point is located within a specified crack front oriented box. ...
auto index_range(const T &sizable)
VectorPostprocessorValue & _y
static InputParameters validParams()
virtual void execute() override