https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MechanicalContactConstraint.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// MOOSE includes
13#include "NodeFaceConstraint.h"
14#include "PenetrationLocator.h"
15
16// Forward Declarations
19enum class ContactModel;
20enum class ContactFormulation;
22
28{
29public:
31
33
34 virtual void timestepSetup() override;
35 virtual void jacobianSetup() override;
36 virtual void residualEnd() override;
37
39
40 virtual void updateAugmentedLagrangianMultiplier(bool beginning_of_step);
41 virtual void updateContactStatefulData(bool beginning_of_step);
42
43 virtual Real computeQpSecondaryValue() override;
44
45 virtual Real computeQpResidual(Moose::ConstraintType type) override;
46
50 virtual void computeJacobian() override;
51
56 virtual void computeOffDiagJacobian(unsigned int jvar) override;
57
59
66 unsigned int jvar) override;
67
73 virtual void getConnectedDofIndices(unsigned int var_num) override;
74
82 bool getCoupledVarComponent(unsigned int var_num, unsigned int & component);
83
85
86 bool shouldApply() override;
87 void computeContactForce(const Node & node, PenetrationInfo * pinfo, bool update_contact_set);
88
89protected:
90 MooseSharedPointer<DisplacedProblem> _displaced_problem;
91 Real gapOffset(const Node & node);
92 Real nodalArea(const Node & node);
93 Real getPenalty(const Node & node);
94 Real getTangentialPenalty(const Node & node);
95
96 const unsigned int _component;
97 const ContactModel _model;
98 const ContactFormulation _formulation;
100
101 const Real _penalty;
107 const unsigned int _stick_lock_iterations;
110
111 NumericVector<Number> & _residual_copy;
112 // std::map<Point, PenetrationInfo *> _point_to_info;
113
114 const unsigned int _mesh_dimension;
115
116 std::vector<unsigned int> _vars;
117 std::vector<MooseVariable *> _var_objects;
118
124
127 const NumericVector<Number> * const _aux_solution;
128
135
142
144 std::set<dof_id_type> _current_contact_state;
145 std::set<dof_id_type> _old_contact_state;
146
148 static Threads::spin_mutex _contact_set_mutex;
149
151 const static unsigned int _no_iterations;
152 const unsigned int & _lagrangian_iteration_number;
153
154 DenseMatrix<Number> _Knn;
155 DenseMatrix<Number> _Ken;
156};
Class to provide an interface for parameters and routines required to check convergence for the augme...
This class implements a custom line search for use with mechanical contact.
A MechanicalContactConstraint forces the value of a variable to be the same on both sides of an inter...
const bool _connected_secondary_nodes_jacobian
Whether to include coupling terms with the nodes connected to the secondary nodes in the Jacobian.
virtual Real computeQpResidual(Moose::ConstraintType type) override
Real _al_frictional_force_tolerance
The tolerance of the frictional force for augmented Lagrangian method.
virtual bool addCouplingEntriesToJacobian() override
virtual void updateContactStatefulData(bool beginning_of_step)
static Threads::spin_mutex _contact_set_mutex
AugmentedLagrangianContactProblemInterface *const _augmented_lagrange_problem
static const unsigned int _no_iterations
bool getCoupledVarComponent(unsigned int var_num, unsigned int &component)
Determine whether the coupled variable is one of the displacement variables, and find its component.
const MooseVariable *const _mapped_primary_gap_offset_var
ContactLineSearchBase * _contact_linesearch
virtual void updateAugmentedLagrangianMultiplier(bool beginning_of_step)
const bool _non_displacement_vars_jacobian
Whether to include coupling terms with non-displacement variables in the Jacobian.
std::vector< MooseVariable * > _var_objects
const bool _primary_secondary_jacobian
Whether to include coupling between the primary and secondary nodes in the Jacobian.
Real _al_incremental_slip_tolerance
The tolerance of the incremental slip for augmented Lagrangian method.
MooseSharedPointer< DisplacedProblem > _displaced_problem
virtual Real computeQpSecondaryValue() override
void computeContactForce(const Node &node, PenetrationInfo *pinfo, bool update_contact_set)
virtual void computeJacobian() override
Computes the jacobian for the current element.
virtual void getConnectedDofIndices(unsigned int var_num) override
Get the dof indices of the nodes connected to the secondary node for a specific variable.
const MooseVariable *const _secondary_gap_offset_var
const NumericVector< Number > *const _aux_solution
virtual Real computeQpJacobian(Moose::ConstraintJacobianType type) override
const unsigned int & _lagrangian_iteration_number
NumericVector< Number > & _residual_copy
const bool _has_secondary_gap_offset
gap offset from either secondary, primary or both
virtual void computeOffDiagJacobian(unsigned int jvar) override
Compute off-diagonal Jacobian entries.
virtual Real computeQpOffDiagJacobian(Moose::ConstraintJacobianType type, unsigned int jvar) override
Compute off-diagonal Jacobian entries.
Real _al_penetration_tolerance
The tolerance of the penetration for augmented Lagrangian method.
std::set< dof_id_type > _current_contact_state
const InputParameters & parameters() const
const std::string & type() const
ConstraintType
ConstraintJacobianType