32 "The string of displacements suitable for the problem statement");
34 "Base class for mortar-based cohesive zone model. To handle frictional cohesive interfaces, " 35 "it computes the mortar frictional contact forces using a penalty approach.");
38 "The penalty factor for frictional interaction. If not provided, the normal " 39 "penalty factor is also used for the frictional problem.");
41 "friction_coefficient", 0.0,
"The friction coefficient ruling Coulomb friction equations.");
67 _ndisp(coupledComponents(
"displacements")),
68 _penalty_friction(isParamValid(
"penalty_friction") ? getParam<
Real>(
"penalty_friction")
69 : getParam<
Real>(
"penalty")),
70 _friction_coefficient(getParam<
Real>(
"friction_coefficient")),
71 _dof_to_accumulated_slip(
73 "dof_to_accumulated_slip",
75 _dof_to_tangential_traction(
76 declareRestartableData<std::unordered_map<
dof_id_type, std::pair<ADTwoVector, TwoVector>>>(
77 "dof_to_tangential_traction",
78 std::unordered_map<
dof_id_type, std::pair<ADTwoVector, TwoVector>>{})),
79 _epsilon_tolerance(1.0e-40),
80 _dof_to_damage(declareRestartableData<std::unordered_map<
dof_id_type, std::pair<ADReal, Real>>>(
81 "dof_do_damage", std::unordered_map<
dof_id_type, std::pair<ADReal, Real>>{}))
83 _czm_interpolated_traction.resize(_ndisp);
85 for (
unsigned int i = 0; i < _ndisp; ++i)
87 _grad_disp.push_back(&adCoupledGradient(
"displacements", i));
88 _grad_disp_neighbor.push_back(&adCoupledGradient(
"displacements", i));
92 for ([[maybe_unused]]
const auto i :
make_range(_ndisp))
94 _grad_disp.push_back(&_ad_grad_zero);
95 _grad_disp_neighbor.push_back(&_ad_grad_zero);
98 if (_augmented_lagrange_problem)
99 mooseError(
"CohesiveZoneModelBase constraints cannot be enforced with an augmented " 100 "Lagrange approach.");
157 throw MooseException(
"The deformation gradient on the secondary surface is not finite in " 158 "CohesiveZoneModelBase. MOOSE needs to cut the time step size.");
163 const auto Uinv = MathUtils::sqrt(
C).inverse().get();
170 global_interface_displacement;
186 auto & [step_slip, old_step_slip] = map_pr.second;
187 old_step_slip = {0.0, 0.0};
188 step_slip = {0.0, 0.0};
194 auto & [accumulated_slip, old_accumulated_slip] = map_pr.second;
204 auto & [tangential_traction, old_tangential_traction] = map_pr.second;
207 tangential_traction = {0.0, 0.0};
211 delta_tangential_lm.setZero();
216 auto & [damage, old_damage] = map_pr.second;
238 map_pr.second.setToIdentity();
291 normal_lm = it->second;
294 if (normal_lm < -TOLERANCE && normal_pressure > TOLERANCE)
300 const auto & real_tangential_velocity =
302 const ADTwoVector slip_distance = {real_tangential_velocity[0] *
_dt,
303 real_tangential_velocity[1] *
_dt};
306 const auto & tangential_lm =
312 ADTwoVector inner_iteration_penalty_friction = penalty_friction * slip_distance;
320 if (slip_metric >
_epsilon_tolerance && penalty_friction * slip_norm > friction_limit)
322 inner_iteration_penalty_friction =
324 penalty_friction * slip_distance;
328 old_tangential_traction + tangential_lm + inner_iteration_penalty_friction;
331 ADReal tangential_trial_traction_norm =
334 tangential_traction = tangential_trial_traction;
339 tangential_traction -=
340 phi_trial * tangential_trial_traction / tangential_trial_traction_norm;
343 accumulated_slip = old_accumulated_slip + slip_distance.cwiseAbs();
348 accumulated_slip.setZero();
349 tangential_traction.setZero();
354 const auto test_i = (*_test)[i];
381 const auto & test_i = (*_test)[i];
451 const auto local_traction_vector = it->second;
461 "Internal error in czmGlobalTraction. Index exceeds the traction vector size.");
virtual MooseMesh & mesh()=0
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.
MetaPhysicL::DualNumber< V, D, asd > abs(const MetaPhysicL::DualNumber< V, D, asd > &a)
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.
unsigned int _qp
Quadrature point index for the mortar segments.
std::unordered_map< const DofObject *, ADReal > _dof_to_normal_pressure
Map from degree of freedom to normal pressure for reporting.
std::unordered_map< const DofObject *, ADRankTwoTensor > _dof_to_F_neighbor
Map from degree of freedom to neighbor, interpolated deformation gradient tensor. ...
V findValue(const std::unordered_map< K, V > &map, const K &key, const V &default_value=0) const
Find a value in a map or return a default if the key doesn't exist.
void mooseError(Args &&... args)
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.
AugmentedLagrangianContactProblemInterface *const _augmented_lagrange_problem
augmented Lagrange problem and iteration number
static InputParameters validParams()
std::unordered_map< const DofObject *, std::array< ADReal, 2 > > _dof_to_real_tangential_velocity
A map from node to two interpolated, physical tangential velocities.
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.
const Real & _dt
Current delta t... or timestep size.
virtual const ADVariableValue & contactTangentialPressureDirOne() const override
virtual void initialize() 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.
static constexpr std::size_t dim
std::unordered_map< const DofObject *, ADRealVectorValue > _dof_to_weighted_displacements
A map from node to weighted displacements.
User object for computing weighted gaps and contact pressure for penalty based mortar constraints...
const bool _nodal
Whether the dof objects are nodal; if they're not, then they're elemental.
const std::vector< Real > & _JxW_msm
std::unordered_map< const DofObject *, ADRankTwoTensor > _dof_to_interface_F
Map from degree of freedom to interface deformation gradient tensor.
const Parallel::Communicator & _communicator
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.
static RankTwoTensorTempl Identity()
DualNumber< Real, DNDerivativeType, false > ADReal
const libMesh::QBase *const & _qrule_msm
static const std::string F
std::vector< const GenericVariableGradient< true > * > _grad_disp
Coupled displacement gradients.
virtual void reinit() override
static RankTwoTensorTempl initializeFromRows(const libMesh::TypeVector< ADReal > &row0, const libMesh::TypeVector< ADReal > &row1, const libMesh::TypeVector< ADReal > &row2)
Elem const *const & _lower_secondary_elem
ADVariableValue _frictional_contact_traction_two
The second frictional contact pressure on the mortar segment quadrature points.
virtual void timestepSetup()
virtual unsigned int dimension() const
OutputTools< Real >::VariableTestValue VariableTestValue
std::vector< Point > _normals
const VariableTestValue * _test
A pointer to the test function associated with the weighted gap.
ADRankTwoTensor _F_neighbor_interpolation
Deformation gradient for interpolation of the neighbor projection.
virtual void timestepSetup() override
VariableValueTempl< true > ADVariableValue
unsigned int n_points() const
virtual void computeQpProperties() override
Computes properties that are functions only of the current quadrature point (_qp), e.g.
const Real _penalty_friction
The penalty factor for the frictional constraints.
virtual void reinit() override
virtual const ADVariableValue & contactTangentialPressureDirTwo() const override
static InputParameters validParams()
std::unordered_map< dof_id_type, std::pair< ADTwoVector, TwoVector > > & _dof_to_tangential_traction
virtual void prepareJumpKinematicQuantities()
const MooseArray< Real > & _coord
Member for handling change of coordinate systems (xyz, rz, spherical)
virtual bool constrainedByOwner() const override
virtual void computeQpIProperties() override
Computes properties that are functions both of _qp and _i, for example the weighted gap...
Creates dof object to weighted gap map.
const MooseVariable *const _aux_lm_var
The auxiliary Lagrange multiplier variable (used together whith the Petrov-Galerkin approach) ...
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.
virtual const FieldVariablePhiValue & phiLower() const override
std::unordered_map< const DofObject *, Real > _dof_to_lagrange_multiplier
Map from degree of freedom to augmented lagrange multiplier.
IntRange< T > make_range(T beg, T end)
virtual void finalize() override
unsigned int _i
Test function index.
std::vector< const GenericVariableGradient< true > * > _grad_disp_neighbor
Coupled displacement and neighbor displacement gradient.
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
virtual void initialize() override
CohesiveZoneModelBase(const InputParameters ¶meters)
static InputParameters validParams()
const MooseVariable *const _disp_x_var
The x displacement variable.
virtual void computeQpIProperties() override
Computes properties that are functions both of _qp and _i, for example the weighted gap...
std::unordered_map< const DofObject *, std::pair< ADReal, Real > > _dof_to_weighted_gap
A map from node to weighted gap and normalization (if requested)
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.
auto index_range(const T &sizable)
std::unordered_map< const DofObject *, ADRankTwoTensor > _dof_to_F
Map from degree of freedom to secondary, interpolated deformation gradient tensor.
static const std::string C
virtual void finalize() override
virtual void computeGlobalTraction(const Node *const node)
Compute global traction for mortar application.