17 #include "libmesh/string_to_enum.h" 24 MooseEnum orders(
"FIRST SECOND THIRD FOURTH",
"FIRST");
27 params.
addClassDescription(
"Auxiliary Kernel for computing several geometry related quantities " 28 "between two contacting bodies.");
30 params.
addRequiredParam<BoundaryName>(
"paired_boundary",
"The boundary to be penetrated");
32 "Tangential distance to extend edges of contact surfaces");
34 "normal_smoothing_distance",
35 "Distance from edge in parametric coordinates over which to smooth contact normal");
36 params.
addParam<std::string>(
"normal_smoothing_method",
37 "Method to use to smooth normals (edge_based|nodal_normal_based)");
39 params.
addCoupledVar(
"secondary_gap_offset",
"offset to the gap distance from secondary side");
41 "offset to the gap distance mapped from primary side");
43 params.
set<
bool>(
"use_displaced_mesh") =
true;
49 "distance tangential_distance normal_x normal_y normal_z closest_point_x closest_point_y " 50 "closest_point_z element_id side incremental_slip_magnitude incremental_slip_x " 51 "incremental_slip_y incremental_slip_z accumulated_slip force_x force_y force_z " 52 "normal_force_magnitude normal_force_x normal_force_y normal_force_z " 53 "tangential_force_magnitude " 54 "tangential_force_x tangential_force_y tangential_force_z frictional_energy " 55 "lagrange_multiplier " 60 "quantity", quantity,
"The quantity to recover from the available penetration information");
70 _nodal ? getPenetrationLocator(
71 parameters.
get<BoundaryName>(
"paired_boundary"),
74 : getQuadraturePenetrationLocator(
75 parameters.
get<BoundaryName>(
"paired_boundary"),
78 _has_secondary_gap_offset(isCoupled(
"secondary_gap_offset")),
79 _secondary_gap_offset_var(_has_secondary_gap_offset ? getVar(
"secondary_gap_offset", 0)
81 _has_mapped_primary_gap_offset(isCoupled(
"mapped_primary_gap_offset")),
82 _mapped_primary_gap_offset_var(
83 _has_mapped_primary_gap_offset ? getVar(
"mapped_primary_gap_offset", 0) : nullptr)
99 const Node * current_node =
nullptr;
146 retVal =
static_cast<Real>(pinfo->
_elem->id() + 1);
192 retVal = contact_force_tangential.
norm();
217 mooseError(
"Unknown penetration info quantity in auxiliary kernel.");
MooseVariable * _secondary_gap_offset_var
auto norm() const -> decltype(std::norm(Real()))
bool _nodal
Flag indicating if the AuxKernel is nodal.
const unsigned int & _current_side
current side of the current element
const bool _has_secondary_gap_offset
MooseMesh & _mesh
Mesh this kernel is active on.
void setNormalSmoothingDistance(Real normal_smoothing_distance)
MooseVariable * _mapped_primary_gap_offset_var
Data structure used to hold penetration information.
const Node *const & _current_node
Current node (valid only for nodal kernels)
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
PenetrationAux(const InputParameters ¶meters)
std::map< dof_id_type, PenetrationInfo * > & _penetration_info
Data structure of nodes and their associated penetration information.
void setTangentialTolerance(Real tangential_tolerance)
registerMooseObject("MooseApp", PenetrationAux)
PenetrationLocator & _penetration_locator
T string_to_enum(const std::string &s)
static InputParameters validParams()
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
RealVectorValue _contact_force
Node * getQuadratureNode(const Elem *elem, const unsigned short int side, const unsigned int qp)
Get a specified quadrature node.
MECH_STATUS_ENUM _mech_status
OutputData getNodalValue(const Node &node) const
Get the value of this variable at given node.
Real _tangential_distance
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real _lagrange_multiplier
virtual Real computeValue() override
Compute and return the value of the aux variable.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const Elem *const & _current_elem
Current element (valid only for elemental kernels)
unsigned int _qp
Quadrature point index.
const InputParameters & parameters() const
Get the parameters of the object.
static InputParameters validParams()
Base class for creating new auxiliary kernels and auxiliary boundary conditions.
void setNormalSmoothingMethod(std::string nsmString)
const bool _has_mapped_primary_gap_offset