https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
23public:
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 ADReal nodalTangentialPressure(const Node & node, unsigned int direction) const override;
35 virtual bool usesNodalNormalDerivatives() const override { return false; }
36 virtual void timestepSetup() override;
37 virtual const ADVariableValue & czmGlobalTraction(unsigned int i) const;
38
39protected:
40 virtual void computeQpProperties() override;
41 virtual void computeQpIProperties() override;
42
43 virtual const VariableTestValue & test() const override;
44 virtual bool constrainedByOwner() const override { return false; }
45
46 // Compute CZM kinematics.
47 virtual void prepareJumpKinematicQuantities();
48 virtual void computeFandR(const Node * const node);
49
51 virtual void computeCZMTraction(const Node * const /*node*/) = 0;
52
53 virtual void computeDamage(const Node * const /*node*/) = 0;
54
56 virtual void computeGlobalTraction(const Node * const node);
57
59 template <class T>
60 T normalizeQuantity(const std::unordered_map<const DofObject *, T> & map, const Node * const node)
61 {
62 return libmesh_map_find(map, node) / _dof_to_weighted_gap[node].second;
63 }
64
66 const unsigned int _ndisp;
67
69 std::vector<const GenericVariableGradient<true> *> _grad_disp;
70
72 std::vector<const GenericVariableGradient<true> *> _grad_disp_neighbor;
73
76 std::unordered_map<const DofObject *, ADRankTwoTensor> _dof_to_rotation_matrix;
77
79 std::unordered_map<const DofObject *, ADRealVectorValue> _dof_to_interface_displacement_jump;
80
83
86
88 std::unordered_map<const DofObject *, ADRankTwoTensor> _dof_to_F;
89
91 std::unordered_map<const DofObject *, ADRankTwoTensor> _dof_to_F_neighbor;
92
94 std::unordered_map<const DofObject *, ADRankTwoTensor> _dof_to_interface_F;
95
97 std::unordered_map<const DofObject *, ADRankTwoTensor> _dof_to_interface_R;
98
100 std::vector<ADVariableValue> _czm_interpolated_traction;
101
104
107
109 std::unordered_map<const DofObject *, std::pair<ADTwoVector, TwoVector>> _dof_to_step_slip;
110
112 std::unordered_map<dof_id_type, std::pair<ADTwoVector, TwoVector>> & _dof_to_accumulated_slip;
113
114 // Map from degree of freedom to current and old tangential traction
115 std::unordered_map<dof_id_type, std::pair<ADTwoVector, TwoVector>> & _dof_to_tangential_traction;
116
119
122
124 std::unordered_map<const DofObject *, TwoVector> _dof_to_frictional_lagrange_multipliers;
125
127 std::unordered_map<const DofObject *, Real> _dof_to_local_penalty_friction;
128
131
133 std::unordered_map<const DofObject *, ADRealVectorValue> _dof_to_czm_traction;
134
136 std::unordered_map<const DofObject *, ADRealVectorValue> _dof_to_displacement_jump;
137
139 std::unordered_map<dof_id_type, std::pair<ADReal, Real>> & _dof_to_damage;
140};
DualNumber< Real, DNDerivativeType, true > ADReal
const double T
Base class for mortar-based cohesive zone model.
std::unordered_map< dof_id_type, std::pair< ADTwoVector, TwoVector > > & _dof_to_tangential_traction
virtual const ADVariableValue & czmGlobalTraction(unsigned int i) const
std::unordered_map< const DofObject *, ADRealVectorValue > _dof_to_interface_displacement_jump
Map from degree of freedom to local displacement jump.
virtual void computeQpProperties() override
Computes properties that are functions only of the current quadrature point (_qp),...
std::unordered_map< const DofObject *, ADRankTwoTensor > _dof_to_F_neighbor
Map from degree of freedom to neighbor, interpolated deformation gradient tensor.
virtual const ADVariableValue & contactTangentialPressureDirTwo() const override
virtual bool usesNodalNormalDerivatives() const override
Whether this formulation includes displacement derivatives of the secondary nodal normals.
virtual void computeQpIProperties() override
Computes properties that are functions both of _qp and _i, for example the weighted gap.
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.
ADRankTwoTensor _F_interpolation
Deformation gradient for interpolation.
std::unordered_map< const DofObject *, ADRankTwoTensor > _dof_to_F
Map from degree of freedom to secondary, interpolated deformation gradient tensor.
const unsigned int _ndisp
Number of displacement components.
const Real _epsilon_tolerance
Tolerance to avoid NaN/Inf in automatic differentiation operations.
ADVariableValue _frictional_contact_traction_two
The second frictional contact pressure on the mortar segment quadrature points.
virtual void timestepSetup() override
std::unordered_map< const DofObject *, ADRankTwoTensor > _dof_to_rotation_matrix
*** Kinematics/displacement jump quantities *** Map from degree of freedom to rotation matrix
virtual const VariableTestValue & test() const override
virtual bool constrainedByOwner() const override
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.
virtual ADReal nodalTangentialPressure(const Node &node, unsigned int direction) const override
static InputParameters validParams()
std::unordered_map< const DofObject *, ADRealVectorValue > _dof_to_czm_traction
Total Lagrangian stress to be applied on CZM interface.
virtual void finalize() override
std::vector< const GenericVariableGradient< true > * > _grad_disp_neighbor
Coupled displacement and neighbor displacement gradient.
std::unordered_map< const DofObject *, ADRankTwoTensor > _dof_to_interface_R
Map from degree of freedom to interface rotation tensor.
const Real _penalty_friction
The penalty factor for the frictional constraints.
std::vector< ADVariableValue > _czm_interpolated_traction
The global traction.
std::unordered_map< dof_id_type, std::pair< ADReal, Real > > & _dof_to_damage
Damage values (pair of current and old) on CZM interface.
virtual void computeGlobalTraction(const Node *const node)
Compute global traction for mortar application.
std::unordered_map< const DofObject *, Real > _dof_to_local_penalty_friction
Map from degree of freedom to local friction penalty value.
const Real _friction_coefficient
The friction coefficient.
virtual const ADVariableValue & contactTangentialPressureDirOne() const override
T normalizeQuantity(const std::unordered_map< const DofObject *, T > &map, const Node *const node)
Normalize mortar quantities (remove mortar integral scaling)
ADVariableValue _frictional_contact_traction_one
The first frictional contact pressure on the mortar segment quadrature points.
virtual void computeDamage(const Node *const)=0
std::unordered_map< const DofObject *, TwoVector > _dof_to_frictional_lagrange_multipliers
Map from degree of freedom to augmented lagrange multiplier.
virtual void computeCZMTraction(const Node *const)=0
Encapsulate the CZM constitutive behavior.
std::unordered_map< const DofObject *, ADRankTwoTensor > _dof_to_interface_F
Map from degree of freedom to interface deformation gradient tensor.
virtual void prepareJumpKinematicQuantities()
ADRankTwoTensor _F_neighbor_interpolation
Deformation gradient for interpolation of the neighbor projection.
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.
virtual void computeFandR(const Node *const node)
virtual void initialize() override
const InputParameters & parameters() const
User object for computing weighted gaps and contact pressure for penalty based mortar constraints.
std::unordered_map< const DofObject *, std::pair< ADReal, Real > > _dof_to_weighted_gap
A map from node to weighted gap and normalization (if requested)
Creates dof object to weighted tangential velocities map.
VariableShapeValue< true > VariableTestValue
VariableValueTempl< true > ADVariableValue