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");
31 params.
addParam<Real>(
"tangential_tolerance",
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);
149 retVal =
static_cast<Real
>(pinfo->
_side_num);
191 RealVectorValue contact_force_tangential(pinfo->
_contact_force - contact_force_normal);
192 retVal = contact_force_tangential.norm();
217 mooseError(
"Unknown penetration info quantity in auxiliary kernel.");
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
registerMooseObject("MooseApp", PenetrationAux)
MooseMesh & _mesh
Mesh this kernel is active on.
const Elem *const & _current_elem
Current element (valid only for elemental kernels)
const Node *const & _current_node
Current node (valid only for nodal kernels)
const bool _nodal
Flag indicating if the AuxKernel is nodal.
const unsigned int & _current_side
current side of the current element
unsigned int _qp
Quadrature point index.
static InputParameters validParams()
const InputParameters & parameters() const
Get the parameters of the object.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Node * getQuadratureNode(const Elem *elem, const unsigned short int side, const unsigned int qp)
Get a specified quadrature node.
DofValue getNodalValue(const Node &node) const
Get the value of this variable at given node.
MooseVariable * _mapped_primary_gap_offset_var
static InputParameters validParams()
MooseVariable * _secondary_gap_offset_var
@ PA_TANGENTIAL_FORCE_MAG
@ PA_INCREMENTAL_SLIP_MAG
PenetrationAux(const InputParameters ¶meters)
const bool _has_secondary_gap_offset
PenetrationLocator & _penetration_locator
const bool _has_mapped_primary_gap_offset
virtual Real computeValue() override
Compute and return the value of the aux variable.
Data structure used to hold penetration information.
MECH_STATUS_ENUM _mech_status
RealVectorValue _contact_force
Real _lagrange_multiplier
Real _tangential_distance
void setNormalSmoothingMethod(std::string nsmString)
void setTangentialTolerance(Real tangential_tolerance)
void setNormalSmoothingDistance(Real normal_smoothing_distance)
std::map< dof_id_type, PenetrationInfo * > & _penetration_info
Data structure of nodes and their associated penetration information.