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();
264 for (
const auto i : make_range(
_test->size()))
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];
371 for (
const auto i : make_range(
_test->size()))
381 const auto & test_i = (*_test)[i];
393 for (
const auto i : make_range(
_test->size()))
451 const auto local_traction_vector = it->second;
461 "Internal error in czmGlobalTraction. Index exceeds the traction vector size.");
DualNumber< Real, DNDerivativeType, true > ADReal
void mooseError(Args &&... args)
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.
CohesiveZoneModelBase(const InputParameters ¶meters)
virtual const ADVariableValue & contactTangentialPressureDirTwo() const override
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 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.
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.
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
virtual void computeFandR(const Node *const node)
virtual void initialize() override
FactorizedRankTwoTensorTempl< T > transpose() const
virtual unsigned int dimension() const
virtual const FieldVariablePhiValue & phiLower() const override
Elem const *const & _lower_secondary_elem
const libMesh::QBase *const & _qrule_msm
std::vector< Point > _normals
const std::vector< Real > & _JxW_msm
User object for computing weighted gaps and contact pressure for penalty based mortar constraints.
virtual void reinit() override
std::unordered_map< const DofObject *, Real > _dof_to_lagrange_multiplier
Map from degree of freedom to augmented lagrange multiplier.
AugmentedLagrangianContactProblemInterface *const _augmented_lagrange_problem
augmented Lagrange problem and iteration number
const MooseVariable *const _aux_lm_var
The auxiliary Lagrange multiplier variable (used together whith the Petrov-Galerkin approach)
const Real & _dt
Current delta t... or timestep size.
std::unordered_map< const DofObject *, ADReal > _dof_to_normal_pressure
Map from degree of freedom to normal pressure for reporting.
static InputParameters validParams()
static RankTwoTensorTempl initializeFromRows(const libMesh::TypeVector< T > &row0, const libMesh::TypeVector< T > &row1, const libMesh::TypeVector< T > &row2)
static RankTwoTensorTempl Identity()
virtual void timestepSetup()
virtual MooseMesh & mesh()=0
Creates dof object to weighted gap map.
unsigned int _i
Test function index.
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.
const MooseVariable *const _disp_x_var
The x displacement variable.
unsigned int _qp
Quadrature point index for the mortar segments.
const MooseArray< Real > & _coord
Member for handling change of coordinate systems (xyz, rz, spherical)
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 void initialize() override
std::unordered_map< const DofObject *, ADRealVectorValue > _dof_to_weighted_displacements
A map from node to weighted displacements.
const VariableTestValue * _test
A pointer to the test function associated with the weighted gap.
const bool _nodal
Whether the dof objects are nodal; if they're not, then they're elemental.
Creates dof object to weighted tangential velocities map.
static InputParameters validParams()
virtual void finalize() override
virtual void computeQpProperties() override
Computes properties that are functions only of the current quadrature point (_qp),...
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::array< ADReal, 2 > > _dof_to_real_tangential_velocity
A map from node to two interpolated, physical tangential velocities.
const Parallel::Communicator & _communicator
unsigned int n_points() const
VariableShapeValue< true > VariableTestValue
VariableValueTempl< true > ADVariableValue
static constexpr std::size_t dim
IntRange< T > make_range(T beg, T end)