https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeDynamicWeightedGapLMMechanicalContact.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 "ADMortarConstraint.h"
13
14#include <unordered_map>
15
20{
21public:
23
25
26protected:
31 virtual void computeQpProperties();
32
33 virtual void computeQpIProperties();
34
36
38 void computeResidual(Moose::MortarType mortar_type) override;
40 void computeJacobian(Moose::MortarType mortar_type) override;
41 void residualSetup() override;
42 void jacobianSetup() override final;
43
44 void timestepSetup() override;
45
46 virtual void post() override;
47
48 virtual void
49 incorrectEdgeDroppingPost(const std::unordered_set<const Node *> & inactive_lm_nodes) override;
50
51 void communicateWear();
52
59 virtual void enforceConstraintOnDof(const DofObject * const dof);
60
69
71 const bool _has_disp_z;
76
80 const Real _c;
81
84
87
90
92 const bool _nodal;
93
100
103
105 std::unordered_map<const DofObject *, std::pair<ADReal, Real>> _dof_to_weighted_gap;
106
108 const ADReal * _weighted_gap_ptr = nullptr;
109 const Real * _normalization_ptr = nullptr;
110
113
118
121
123 const bool _has_wear;
124
127
129 std::unordered_map<const DofObject *, ADReal> _dof_to_old_weighted_gap;
130
133
136
138 std::unordered_map<const DofObject *, ADReal> _dof_to_weighted_gap_dynamics;
139
141 std::unordered_map<const DofObject *, ADReal> _dof_to_velocity;
143 std::unordered_map<const DofObject *, ADReal> _dof_to_old_velocity;
144
145 // Newmark-beta beta parameter
146 const Real _newmark_beta;
147
148 // Newmark-beta gamma parameter
149 const Real _newmark_gamma;
150
152 std::unordered_map<const DofObject *, ADReal> _dof_to_nodal_wear_depth;
153
155 std::unordered_map<const DofObject *, ADReal> _dof_to_nodal_old_wear_depth;
156
159};
DualNumber< Real, DNDerivativeType, true > ADReal
virtual void computeJacobian() override
virtual void computeResidual() override
Computes the normal contact mortar constraints for dynamic simulations.
const bool _has_disp_z
For 2D mortar contact no displacement will be specified, so const pointers used.
std::unordered_map< const DofObject *, std::pair< ADReal, Real > > _dof_to_weighted_gap
A map from node to weighted gap and normalization (if requested)
const ADVariableValue *const _secondary_disp_z
z-displacement on the secondary face
const MooseVariable *const _disp_y_var
The y displacement variable.
const bool _has_wear
Flag to determine whether wear needs to be included in the contact constraints.
const ADVariableValue & _secondary_disp_x
x-displacement on the secondary face
const ADVariableValue & _secondary_disp_y
y-displacement on the secondary face
std::unordered_map< const DofObject *, ADReal > _dof_to_nodal_wear_depth
A map from node to wear in this step.
const Real _capture_tolerance
A small threshold gap value to consider that a node needs a "persistency" constraint.
const ADVariableValue *const _primary_disp_z
z-displacement on the primary face
const ADVariableValue & _primary_disp_x
x-displacement on the primary face
std::unordered_map< const DofObject *, ADReal > _dof_to_weighted_gap_dynamics
A map from node to weighted gap velocity times _dt.
ADRealVectorValue _qp_gap_nodal
Vector for computation of weighted gap with nodal normals.
std::unordered_map< const DofObject *, ADReal > _dof_to_nodal_old_wear_depth
A map from node to wear in old step.
const MooseVariable *const _disp_x_var
The x displacement variable.
virtual void incorrectEdgeDroppingPost(const std::unordered_set< const Node * > &inactive_lm_nodes) override
virtual void computeQpProperties()
Computes properties that are functions only of the current quadrature point (_qp),...
ADRealVectorValue _qp_velocity
Vector for computation of weighted gap velocity to fulfill "persistency" condition.
const bool _nodal
Whether the dof objects are nodal; if they're not, then they're elemental.
virtual void enforceConstraintOnDof(const DofObject *const dof)
Method called from post().
const ADReal * _weighted_gap_ptr
A pointer members that can be used to help avoid copying ADReals.
bool _normalize_c
Whether to normalize weighted gap by weighting function norm.
const VariableValue & _wear_depth
Wear depth to include contact.
std::unordered_map< const DofObject *, ADReal > _dof_to_velocity
A map from node to weighted gap velocity times _dt.
ADRealVectorValue _qp_gap_nodal_dynamics
Vector for computation of weighted gap velocity to fulfill "persistency" condition.
std::unordered_map< const DofObject *, ADReal > _dof_to_old_weighted_gap
A map from dof-object to the old weighted gap.
ADReal _qp_gap
The value of the gap at the current quadrature point.
Real _qp_factor
The value of the LM at the current quadrature point.
std::unordered_map< const DofObject *, ADReal > _dof_to_old_velocity
A map from node to weighted gap velocity times _dt.
const ADVariableValue & _primary_disp_y
y-displacement on the primary face
const MooseVariable *const _disp_z_var
The z displacement variable.
const InputParameters & parameters() const
VariableValueTempl< true > ADVariableValue
VariableValueTempl< false > VariableValue