30 "Computes the mortar frictional contact force via a penalty approach.");
31 params.
addParam<Real>(
"penalty_friction",
32 "The penalty factor for frictional interaction. If not provide, the normal "
33 "penalty factor is also used for the frictional problem.");
35 "The friction coefficient ruling Coulomb friction equations.");
39 "Acceptable slip distance at which augmented Lagrange iterations can be stopped");
40 MooseEnum adaptivity_penalty_friction(
"SIMPLE FRICTION_LIMIT",
"FRICTION_LIMIT");
41 adaptivity_penalty_friction.addDocumentation(
42 "SIMPLE",
"Keep multiplying by the frictional penalty multiplier between AL iterations");
43 adaptivity_penalty_friction.addDocumentation(
45 "This strategy will be guided by the Coulomb limit and be less reliant on the initial "
46 "penalty factor provided by the user.");
48 "adaptivity_penalty_friction",
49 adaptivity_penalty_friction,
50 "The augmented Lagrange update strategy used on the frictional penalty coefficient.");
52 "penalty_multiplier_friction",
54 "penalty_multiplier_friction > 0",
55 "The penalty growth factor between augmented Lagrange "
56 "iterations for penalizing relative slip distance if the node is under stick conditions.");
77 _penalty(getParam<Real>(
"penalty")),
78 _penalty_friction(isParamValid(
"penalty_friction") ? getParam<Real>(
"penalty_friction")
79 : getParam<Real>(
"penalty")),
80 _slip_tolerance(isParamValid(
"slip_tolerance") ? getParam<Real>(
"slip_tolerance") : 0.0),
81 _friction_coefficient(getParam<Real>(
"friction_coefficient")),
85 _dof_to_accumulated_slip(
87 "dof_to_accumulated_slip")),
88 _dof_to_tangential_traction(
90 "dof_to_tangential_traction")),
91 _dof_to_frictional_lagrange_multipliers(
92 declareRestartableData<
std::unordered_map<dof_id_type,
TwoVector>>(
93 "dof_to_frictional_lagrange_multipliers")),
94 _dof_to_local_penalty_friction(declareRestartableData<
std::unordered_map<dof_id_type, Real>>(
95 "dof_to_local_penalty_friction")),
96 _penalty_multiplier_friction(getParam<Real>(
"penalty_multiplier_friction")),
99 _t_step_old_friction(declareRestartableData<
int>(
"t_step_old_friction", 0))
104 "This parameter must be supplied if and only if an augmented Lagrange problem "
141 if (retried_timestep)
154 auto & [step_slip, old_step_slip] = map_pr.second;
155 old_step_slip = {0.0, 0.0};
156 step_slip = {0.0, 0.0};
162 auto & [accumulated_slip, old_accumulated_slip] = map_pr.second;
163 old_accumulated_slip = accumulated_slip;
172 auto & [tangential_traction, old_tangential_traction] = map_pr.second;
175 tangential_traction = {0.0, 0.0};
179 delta_tangential_lm.setZero();
201 const unsigned int component)
const
213 const unsigned int component)
const
225 const unsigned int component)
const
237 const unsigned int component)
const
249 const unsigned int direction)
const
251 mooseAssert(direction < 2,
"There are at most two tangent directions.");
274 for (
const auto i : make_range(
_test->size()))
279 const auto penalty_friction =
294 if (normal_lm < -TOLERANCE && normal_pressure > TOLERANCE)
296 const auto & real_tangential_velocity =
298 const ADTwoVector slip_distance = {real_tangential_velocity[0] *
_dt,
299 real_tangential_velocity[1] *
_dt};
302 const auto & tangential_lm =
307 old_tangential_traction + tangential_lm + penalty_friction * slip_distance;
310 ADReal tangential_trial_traction_norm = tangential_trial_traction.norm();
312 tangential_traction = tangential_trial_traction;
317 tangential_traction -=
318 phi_trial * tangential_trial_traction / tangential_trial_traction_norm;
330 accumulated_slip.setZero();
331 tangential_traction.setZero();
336 const auto & test_i = (*_test)[i];
359 auto & [step_slip, old_step_slip] = map_pr.second;
360 old_step_slip = step_slip;
363 std::pair<Real, dof_id_type> max_slip{0.0, 0};
368 const auto & tangential_traction = traction_pair.first;
380 const auto & real_tangential_velocity =
393 const auto new_slip =
394 std::make_pair<Real, dof_id_type>(slip_velocity.norm() *
_dt, dof_object->id());
395 if (new_slip > max_slip)
416 ", but slip tolerance is chosen to be ",
436 if (penalty_friction == 0.0)
443 const auto & real_tangential_velocity =
450 const TwoVector tangential_trial_traction =
451 old_tangential_traction + tangential_lm + penalty_friction * slip_velocity *
_dt;
452 const Real tangential_trial_traction_norm = tangential_trial_traction.norm();
457 tangential_lm += penalty_friction * slip_velocity *
_dt;
462 tangential_lm = tangential_trial_traction / tangential_trial_traction_norm *
464 old_tangential_traction;
481 if (step_slip.first.dot(step_slip.second) > 0.0 && abs(normal_lm) > TOLERANCE &&
489 else if (step_slip.first.dot(step_slip.second) < 0.0)
490 penalty_friction /= 2.0;
DualNumber< Real, DNDerivativeType, true > ADReal
void mooseInfoRepeated(Args &&... args)
registerMooseObject("ContactApp", PenaltyFrictionUserObject)
void ErrorVector unsigned int
virtual int & timeStep() const
void paramError(const std::string ¶m, Args... args) const
bool isParamValid(const std::string &name) const
virtual const Node * nodePtr(const dof_id_type i) const
virtual const FieldVariablePhiValue & phiLower() const override
Elem const *const & _lower_secondary_elem
const libMesh::QBase *const & _qrule_msm
User object that computes tangential pressures due to friction using a penalty approach,...
virtual Real getDeltaTangentialLagrangeMultiplier(const Node *const node, const unsigned int component) const override
virtual void reinit() override
PenaltyFrictionUserObject(const InputParameters ¶meters)
virtual void timestepSetup() override
virtual void updateAugmentedLagrangianMultipliers() override
std::unordered_map< dof_id_type, std::pair< TwoVector, TwoVector > > & _dof_to_accumulated_slip
Map from node id to current and old accumulated slip.
std::unordered_map< dof_id_type, std::pair< ADTwoVector, TwoVector > > & _dof_to_tangential_traction
Map from node id to current and old tangential traction.
std::unordered_map< dof_id_type, TwoVector > & _dof_to_frictional_lagrange_multipliers
Map from node id to augmented lagrange multiplier.
virtual ADReal nodalTangentialPressure(const Node &node, unsigned int direction) const override
virtual const ADVariableValue & contactTangentialPressureDirTwo() const override
std::unordered_map< dof_id_type, TwoVector > _dof_to_frictional_lagrange_multipliers_start
const Real _penalty_multiplier_friction
Penalty growth factor for augmented Lagrange.
ADVariableValue _frictional_contact_traction_one
The first frictional contact pressure on the mortar segment quadrature points.
virtual void finalize() override
ADVariableValue _frictional_contact_traction_two
The second frictional contact pressure on the mortar segment quadrature points.
const Real _friction_coefficient
The friction coefficient.
enum PenaltyFrictionUserObject::AdaptivityFrictionalPenalty _adaptivity_friction
std::unordered_map< dof_id_type, std::pair< TwoVector, TwoVector > > _dof_to_accumulated_slip_start
const Real _slip_tolerance
Acceptable slip distance for augmented Lagrange convergence.
virtual Real getFrictionalContactPressure(const Node *const node, const unsigned int component) const override
virtual Real getTangentialVelocity(const Node *const node, const unsigned int component) const override
std::unordered_map< dof_id_type, Real > & _dof_to_local_penalty_friction
Map from node id to local friction penalty value.
const Real _penalty_friction
The penalty factor for the frictional constraints.
int & _t_step_old_friction
The timestep index at which the accumulated slip and tangential traction history were last advanced.
virtual void initialize() override
std::unordered_map< dof_id_type, std::pair< TwoVector, TwoVector > > & _dof_to_step_slip
Map from node id to current and old step slip.
std::unordered_map< dof_id_type, Real > _dof_to_local_penalty_friction_start
virtual const VariableTestValue & test() const override
virtual Real getAccumulatedSlip(const Node *const node, const unsigned int component) const override
std::unordered_map< dof_id_type, std::pair< ADTwoVector, TwoVector > > _dof_to_tangential_traction_start
static InputParameters validParams()
AdaptivityFrictionalPenalty
The adaptivity method for the penalty factor at augmentations.
virtual bool isAugmentedLagrangianConverged() override
std::unordered_map< dof_id_type, std::pair< TwoVector, TwoVector > > _dof_to_step_slip_start
Frictional state at the start of the current timestep, restored when it is retried.
virtual const ADVariableValue & contactTangentialPressureDirOne() const override
User object for computing weighted gaps and contact pressure for penalty based mortar constraints.
virtual bool isAugmentedLagrangianConverged() override
virtual void reinit() override
AugmentedLagrangianContactProblemInterface *const _augmented_lagrange_problem
augmented Lagrange problem and iteration number
std::unordered_map< dof_id_type, Real > & _dof_to_lagrange_multiplier
Map from node id to augmented lagrange multiplier.
const MooseVariable *const _aux_lm_var
The auxiliary Lagrange multiplier variable (used together whith the Petrov-Galerkin approach)
const Real & _dt
Current delta t... or timestep size.
std::unordered_map< const DofObject *, ADReal > _dof_to_normal_pressure
Map from degree of freedom to normal pressure for reporting.
virtual void updateAugmentedLagrangianMultipliers() override
const Real _max_penalty_multiplier
Maximum multiplier applied to the initial penalty factor in AL.
static InputParameters validParams()
virtual void timestepSetup()
virtual MooseMesh & mesh()=0
void max(const T &r, T &o, Request &req) const
processor_id_type rank() const
Creates dof object to weighted gap map.
V findValue(const std::unordered_map< K, V > &map, const K &key, const V &default_value=0) const
Find a value in a map or return a default if the key doesn't exist.
const MooseVariable *const _disp_x_var
The x displacement variable.
FEProblemBase & _fe_problem
The base finite element problem.
virtual void initialize() override
const VariableTestValue * _test
A pointer to the test function associated with the weighted gap.
Creates dof object to weighted tangential velocities map.
static InputParameters validParams()
virtual void finalize() override
std::unordered_map< const DofObject *, std::array< ADReal, 2 > > _dof_to_real_tangential_velocity
A map from node to two interpolated, physical tangential velocities.
const Parallel::Communicator & _communicator
unsigned int n_points() const
VariableShapeValue< true > VariableTestValue
VariableValueTempl< true > ADVariableValue