https://mooseframework.inl.gov
CohesiveZoneModelBase.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 
12 #include "TwoVector.h"
16 
21  virtual public WeightedVelocitiesUserObject
22 {
23 public:
25 
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  virtual const ADVariableValue & czmGlobalTraction(unsigned int i) const;
36 
37 protected:
38  virtual void computeQpProperties() override;
39  virtual void computeQpIProperties() override;
40 
41  virtual const VariableTestValue & test() const override;
42  virtual bool constrainedByOwner() const override { return false; }
43 
44  // Compute CZM kinematics.
45  virtual void prepareJumpKinematicQuantities();
46  virtual void computeFandR(const Node * const node);
47 
49  virtual void computeCZMTraction(const Node * const /*node*/) = 0;
50 
51  virtual void computeDamage(const Node * const /*node*/) = 0;
52 
54  virtual void computeGlobalTraction(const Node * const node);
55 
57  template <class T>
58  T normalizeQuantity(const std::unordered_map<const DofObject *, T> & map, const Node * const node)
59  {
60  return libmesh_map_find(map, node) / _dof_to_weighted_gap[node].second;
61  }
62 
64  const unsigned int _ndisp;
65 
67  std::vector<const GenericVariableGradient<true> *> _grad_disp;
68 
70  std::vector<const GenericVariableGradient<true> *> _grad_disp_neighbor;
71 
74  std::unordered_map<const DofObject *, ADRankTwoTensor> _dof_to_rotation_matrix;
75 
77  std::unordered_map<const DofObject *, ADRealVectorValue> _dof_to_interface_displacement_jump;
78 
81 
84 
86  std::unordered_map<const DofObject *, ADRankTwoTensor> _dof_to_F;
87 
89  std::unordered_map<const DofObject *, ADRankTwoTensor> _dof_to_F_neighbor;
90 
92  std::unordered_map<const DofObject *, ADRankTwoTensor> _dof_to_interface_F;
93 
95  std::unordered_map<const DofObject *, ADRankTwoTensor> _dof_to_interface_R;
96 
98  std::vector<ADVariableValue> _czm_interpolated_traction;
99 
102 
105 
107  std::unordered_map<const DofObject *, std::pair<ADTwoVector, TwoVector>> _dof_to_step_slip;
108 
110  std::unordered_map<dof_id_type, std::pair<ADTwoVector, TwoVector>> & _dof_to_accumulated_slip;
111 
112  // Map from degree of freedom to current and old tangential traction
113  std::unordered_map<dof_id_type, std::pair<ADTwoVector, TwoVector>> & _dof_to_tangential_traction;
114 
117 
120 
122  std::unordered_map<const DofObject *, TwoVector> _dof_to_frictional_lagrange_multipliers;
123 
125  std::unordered_map<const DofObject *, Real> _dof_to_local_penalty_friction;
126 
129 
131  std::unordered_map<const DofObject *, ADRealVectorValue> _dof_to_czm_traction;
132 
134  std::unordered_map<const DofObject *, ADRealVectorValue> _dof_to_displacement_jump;
135 
137  std::unordered_map<dof_id_type, std::pair<ADReal, Real>> & _dof_to_damage;
138 };
std::unordered_map< const DofObject *, std::pair< ADTwoVector, TwoVector > > _dof_to_step_slip
Map from degree of freedom to current and old AD iteration step slip.
std::unordered_map< const DofObject *, ADRankTwoTensor > _dof_to_interface_R
Map from degree of freedom to interface rotation tensor.
std::unordered_map< dof_id_type, std::pair< ADTwoVector, TwoVector > > & _dof_to_accumulated_slip
Map from degree of freedom to current and old accumulated slip.
virtual void computeDamage(const Node *const)=0
std::unordered_map< const DofObject *, ADRankTwoTensor > _dof_to_F_neighbor
Map from degree of freedom to neighbor, interpolated deformation gradient tensor. ...
const double T
std::unordered_map< const DofObject *, ADRankTwoTensor > _dof_to_rotation_matrix
*** Kinematics/displacement jump quantities *** Map from degree of freedom to rotation matrix ...
std::unordered_map< const DofObject *, ADRealVectorValue > _dof_to_czm_traction
Total Lagrangian stress to be applied on CZM interface.
static InputParameters validParams()
const InputParameters & parameters() const
ADRankTwoTensor _F_interpolation
Deformation gradient for interpolation.
T normalizeQuantity(const std::unordered_map< const DofObject *, T > &map, const Node *const node)
Normalize mortar quantities (remove mortar integral scaling)
std::unordered_map< const DofObject *, TwoVector > _dof_to_frictional_lagrange_multipliers
Map from degree of freedom to augmented lagrange multiplier.
virtual const ADVariableValue & contactTangentialPressureDirOne() const override
std::vector< ADVariableValue > _czm_interpolated_traction
The global traction.
virtual void computeQpProperties() override
Computes properties that are functions only of the current quadrature point (_qp), e.g.
const Real _friction_coefficient
The friction coefficient.
std::unordered_map< const DofObject *, ADRealVectorValue > _dof_to_interface_displacement_jump
Map from degree of freedom to local displacement jump.
User object for computing weighted gaps and contact pressure for penalty based mortar constraints...
std::unordered_map< const DofObject *, ADRankTwoTensor > _dof_to_interface_F
Map from degree of freedom to interface deformation gradient tensor.
Creates dof object to weighted tangential velocities map.
const Real _epsilon_tolerance
Tolerance to avoid NaN/Inf in automatic differentiation operations.
ADVariableValue _frictional_contact_traction_one
The first frictional contact pressure on the mortar segment quadrature points.
std::vector< const GenericVariableGradient< true > * > _grad_disp
Coupled displacement gradients.
virtual void reinit() override
std::unordered_map< const DofObject *, ADRealVectorValue > _dof_to_displacement_jump
Displacement jump on CZM interface.
ADVariableValue _frictional_contact_traction_two
The second frictional contact pressure on the mortar segment quadrature points.
OutputTools< Real >::VariableTestValue VariableTestValue
const unsigned int _ndisp
Number of displacement components.
ADRankTwoTensor _F_neighbor_interpolation
Deformation gradient for interpolation of the neighbor projection.
virtual void timestepSetup() override
VariableValueTempl< true > ADVariableValue
const Real _penalty_friction
The penalty factor for the frictional constraints.
virtual const ADVariableValue & contactTangentialPressureDirTwo() const override
std::unordered_map< dof_id_type, std::pair< ADTwoVector, TwoVector > > & _dof_to_tangential_traction
virtual void prepareJumpKinematicQuantities()
virtual bool constrainedByOwner() const override
virtual void computeQpIProperties() override
Computes properties that are functions both of _qp and _i, for example the weighted gap...
virtual void computeFandR(const Node *const node)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual const VariableTestValue & test() const override
std::unordered_map< const DofObject *, Real > _dof_to_local_penalty_friction
Map from degree of freedom to local friction penalty value.
virtual void computeCZMTraction(const Node *const)=0
Encapsulate the CZM constitutive behavior.
std::vector< const GenericVariableGradient< true > * > _grad_disp_neighbor
Coupled displacement and neighbor displacement gradient.
virtual void initialize() override
CohesiveZoneModelBase(const InputParameters &parameters)
std::unordered_map< const DofObject *, std::pair< ADReal, Real > > _dof_to_weighted_gap
A map from node to weighted gap and normalization (if requested)
Base class for mortar-based cohesive zone model.
virtual const ADVariableValue & czmGlobalTraction(unsigned int i) const
std::unordered_map< dof_id_type, std::pair< ADReal, Real > > & _dof_to_damage
Damage values (pair of current and old) on CZM interface.
std::unordered_map< const DofObject *, ADRankTwoTensor > _dof_to_F
Map from degree of freedom to secondary, interpolated deformation gradient tensor.
virtual void finalize() override
virtual void computeGlobalTraction(const Node *const node)
Compute global traction for mortar application.