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 "TwoVector.h" 13 : #include "PenaltyWeightedGapUserObject.h" 14 : #include "WeightedVelocitiesUserObject.h" 15 : #include "AugmentedLagrangeInterface.h" 16 : 17 : /** 18 : * User object that interface pressure resulting from a simple traction separation law. 19 : */ 20 : class PenaltySimpleCohesiveZoneModel : virtual public PenaltyWeightedGapUserObject, 21 : virtual public WeightedVelocitiesUserObject 22 : { 23 : public: 24 : static InputParameters validParams(); 25 : 26 : PenaltySimpleCohesiveZoneModel(const InputParameters & parameters); 27 : 28 : virtual const ADVariableValue & contactTangentialPressureDirOne() const override; 29 : virtual const ADVariableValue & contactTangentialPressureDirTwo() const override; 30 : 31 : virtual void initialize() override; 32 : virtual void finalize() override; 33 : virtual void reinit() override; 34 : virtual void timestepSetup() override; 35 : 36 : protected: 37 : virtual const VariableTestValue & test() const override; 38 0 : virtual bool constrainedByOwner() const override { return false; } 39 : 40 : // Compute CZM kinematics. 41 0 : virtual void prepareJumpKinematicQuantities() {} 42 0 : virtual void computeFandR(const Node * const /*node*/) {} 43 : 44 : /// Encapsulate the CZM constitutive behavior. 45 0 : virtual void computeBilinearMixedModeTraction(const Node * const /*node*/) {} 46 : 47 : /// Compute global traction for mortar application 48 0 : virtual void computeGlobalTraction(const Node * const /*node*/) {} 49 : 50 : /// The normal penalty factor 51 : const Real _penalty; 52 : 53 : /// The penalty factor for the frictional constraints 54 : const Real _penalty_friction; 55 : 56 : /// The friction coefficient 57 : const Real _friction_coefficient; 58 : 59 : /// Map from degree of freedom to current and old step slip 60 : std::unordered_map<const DofObject *, std::pair<TwoVector, TwoVector>> _dof_to_step_slip; 61 : 62 : /// Map from degree of freedom to current and old accumulated slip 63 : std::unordered_map<const DofObject *, std::pair<TwoVector, TwoVector>> _dof_to_accumulated_slip; 64 : 65 : /// Map from degree of freedom to current and old tangential traction 66 : std::unordered_map<const DofObject *, std::pair<ADTwoVector, TwoVector>> 67 : _dof_to_tangential_traction; 68 : 69 : /// Map from degree of freedom to czm normal traction 70 : std::unordered_map<const DofObject *, ADReal> _dof_to_czm_normal_traction; 71 : 72 : /// The first frictional contact pressure on the mortar segment quadrature points 73 : ADVariableValue _frictional_contact_traction_one; 74 : 75 : /// The second frictional contact pressure on the mortar segment quadrature points 76 : ADVariableValue _frictional_contact_traction_two; 77 : 78 : /// Map from degree of freedom to augmented lagrange multiplier 79 : std::unordered_map<const DofObject *, TwoVector> _dof_to_frictional_lagrange_multipliers; 80 : 81 : /// Map from degree of freedom to local friction penalty value 82 : std::unordered_map<const DofObject *, Real> _dof_to_local_penalty_friction; 83 : 84 : /// Tolerance to avoid NaN/Inf in automatic differentiation operations. 85 : const Real _epsilon_tolerance; 86 : };