https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PenaltyFrictionUserObject.h
Go to the documentation of this file.
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
15#include "TwoVector.h"
16
23 virtual public WeightedVelocitiesUserObject
24{
25public:
27
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 ADReal nodalTangentialPressure(const Node & node, unsigned int direction) const override;
37 virtual void timestepSetup() override;
38
39 virtual Real getFrictionalContactPressure(const Node * const node,
40 const unsigned int component) const override;
41 virtual Real getAccumulatedSlip(const Node * const node,
42 const unsigned int component) const override;
43 virtual Real getTangentialVelocity(const Node * const node,
44 const unsigned int component) const override;
45 virtual Real getDeltaTangentialLagrangeMultiplier(const Node * const node,
46 const unsigned int component) const override;
47
48 virtual bool isAugmentedLagrangianConverged() override;
49 virtual void updateAugmentedLagrangianMultipliers() override;
50
51protected:
52 virtual const VariableTestValue & test() const override;
53 virtual bool constrainedByOwner() const override { return false; }
54
56 const Real _penalty;
57
60
62 const Real _slip_tolerance;
63
66
67 // The maps below are keyed by node id so that they can be stored as restartable data. Recovery
68 // must restore their keys as well as their values: the augmented Lagrange updates loop over every
69 // node a map holds, including nodes that were in contact only in earlier timesteps.
70
72 std::unordered_map<dof_id_type, std::pair<TwoVector, TwoVector>> & _dof_to_step_slip;
73
75 std::unordered_map<dof_id_type, std::pair<TwoVector, TwoVector>> & _dof_to_accumulated_slip;
76
78 std::unordered_map<dof_id_type, std::pair<ADTwoVector, TwoVector>> & _dof_to_tangential_traction;
79
82
85
87 std::unordered_map<dof_id_type, TwoVector> & _dof_to_frictional_lagrange_multipliers;
88
90 std::unordered_map<dof_id_type, Real> & _dof_to_local_penalty_friction;
91
94
97
100
105
107 std::unordered_map<dof_id_type, std::pair<TwoVector, TwoVector>> _dof_to_step_slip_start;
108 std::unordered_map<dof_id_type, std::pair<TwoVector, TwoVector>> _dof_to_accumulated_slip_start;
109 std::unordered_map<dof_id_type, std::pair<ADTwoVector, TwoVector>>
111 std::unordered_map<dof_id_type, TwoVector> _dof_to_frictional_lagrange_multipliers_start;
112 std::unordered_map<dof_id_type, Real> _dof_to_local_penalty_friction_start;
114};
DualNumber< Real, DNDerivativeType, true > ADReal
const InputParameters & parameters() const
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 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.
virtual bool constrainedByOwner() const override
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 _epsilon_tolerance
Tolerance to avoid NaN/Inf in automatic differentiation operations.
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.
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
The normal penalty factor.
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.
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.
Creates dof object to weighted tangential velocities map.
VariableShapeValue< true > VariableTestValue
VariableValueTempl< true > ADVariableValue