Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #pragma once 11 : 12 : #include "PenaltyWeightedGapUserObject.h" 13 : #include "WeightedVelocitiesUserObject.h" 14 : #include "AugmentedLagrangeInterface.h" 15 : #include "TwoVector.h" 16 : 17 : /** 18 : * User object that computes tangential pressures due to friction using a penalty approach, 19 : * following J.C. Simo, T.A. Laursen, An augmented lagrangian treatment of contact problems 20 : * involving friction, https://doi.org/10.1016/0045-7949(92)90540-G. 21 : */ 22 : class PenaltyFrictionUserObject : virtual public PenaltyWeightedGapUserObject, 23 : virtual public WeightedVelocitiesUserObject 24 : { 25 : public: 26 : static InputParameters validParams(); 27 : 28 : PenaltyFrictionUserObject(const InputParameters & parameters); 29 : 30 : virtual const ADVariableValue & contactTangentialPressureDirOne() const override; 31 : virtual const ADVariableValue & contactTangentialPressureDirTwo() const override; 32 : 33 : virtual void initialize() override; 34 : virtual void finalize() override; 35 : virtual void reinit() override; 36 : virtual void timestepSetup() override; 37 : 38 : virtual Real getFrictionalContactPressure(const Node * const node, 39 : const unsigned int component) const override; 40 : virtual Real getAccumulatedSlip(const Node * const node, 41 : const unsigned int component) const override; 42 : virtual Real getTangentialVelocity(const Node * const node, 43 : const unsigned int component) const override; 44 : virtual Real getDeltaTangentialLagrangeMultiplier(const Node * const node, 45 : const unsigned int component) const override; 46 : 47 : virtual bool isAugmentedLagrangianConverged() override; 48 : virtual void updateAugmentedLagrangianMultipliers() override; 49 : 50 : protected: 51 : virtual const VariableTestValue & test() const override; 52 18644 : virtual bool constrainedByOwner() const override { return false; } 53 : 54 : /// The normal penalty factor 55 : const Real _penalty; 56 : 57 : /// The penalty factor for the frictional constraints 58 : const Real _penalty_friction; 59 : 60 : /// Acceptable slip distance for augmented Lagrange convergence 61 : const Real _slip_tolerance; 62 : 63 : /// The friction coefficient 64 : const Real _friction_coefficient; 65 : 66 : /// Map from degree of freedom to current and old step slip 67 : std::unordered_map<const DofObject *, std::pair<TwoVector, TwoVector>> _dof_to_step_slip; 68 : 69 : /// Map from degree of freedom to current and old accumulated slip 70 : std::unordered_map<const DofObject *, std::pair<TwoVector, TwoVector>> _dof_to_accumulated_slip; 71 : 72 : /// Map from degree of freedom to current and old tangential traction 73 : std::unordered_map<const DofObject *, std::pair<ADTwoVector, TwoVector>> 74 : _dof_to_tangential_traction; 75 : 76 : /// The first frictional contact pressure on the mortar segment quadrature points 77 : ADVariableValue _frictional_contact_traction_one; 78 : 79 : /// The second frictional contact pressure on the mortar segment quadrature points 80 : ADVariableValue _frictional_contact_traction_two; 81 : 82 : /// Map from degree of freedom to augmented lagrange multiplier 83 : std::unordered_map<const DofObject *, TwoVector> _dof_to_frictional_lagrange_multipliers; 84 : 85 : /// Map from degree of freedom to local friction penalty value 86 : std::unordered_map<const DofObject *, Real> _dof_to_local_penalty_friction; 87 : 88 : /// Penalty growth factor for augmented Lagrange 89 : const Real _penalty_multiplier_friction; 90 : 91 : /// The adaptivity method for the penalty factor at augmentations 92 : const enum class AdaptivityFrictionalPenalty { SIMPLE, FRICTION_LIMIT } _adaptivity_friction; 93 : 94 : /// Tolerance to avoid NaN/Inf in automatic differentiation operations. 95 : const Real _epsilon_tolerance; 96 : };