www.mooseframework.org
MechanicalContactConstraint.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #ifndef MECHANICALCONTACTCONSTRAINT_H
9 #define MECHANICALCONTACTCONSTRAINT_H
10 
11 // MOOSE includes
12 #include "NodeFaceConstraint.h"
13 #include "ContactMaster.h"
14 
15 // Forward Declarations
17 
18 template <>
20 
25 class MechanicalContactConstraint : public NodeFaceConstraint
26 {
27 public:
28  MechanicalContactConstraint(const InputParameters & parameters);
30 
31  virtual void timestepSetup() override;
32  virtual void jacobianSetup() override;
33 
35 
36  virtual void updateAugmentedLagrangianMultiplier(bool beginning_of_step = false);
37 
38  virtual void updateContactSet(bool beginning_of_step = false);
39 
40  virtual Real computeQpSlaveValue() override;
41 
42  virtual Real computeQpResidual(Moose::ConstraintType type) override;
43 
47  virtual void computeJacobian() override;
48 
53  virtual void computeOffDiagJacobian(unsigned int jvar) override;
54 
55  virtual Real computeQpJacobian(Moose::ConstraintJacobianType type) override;
56 
62  virtual Real computeQpOffDiagJacobian(Moose::ConstraintJacobianType type,
63  unsigned int jvar) override;
64 
70  virtual void getConnectedDofIndices(unsigned int var_num) override;
71 
79  bool getCoupledVarComponent(unsigned int var_num, unsigned int & component);
80 
81  virtual bool addCouplingEntriesToJacobian() override { return _master_slave_jacobian; }
82 
83  bool shouldApply() override;
84  void computeContactForce(PenetrationInfo * pinfo);
85 
86 protected:
87  MooseSharedPointer<DisplacedProblem> _displaced_problem;
88  Real nodalArea(PenetrationInfo & pinfo);
89  Real getPenalty(PenetrationInfo & pinfo);
90  Real getTangentialPenalty(PenetrationInfo & pinfo);
91 
92  const unsigned int _component;
95  const bool _normalize_penalty;
96 
97  const Real _penalty;
100  const Real _tension_release;
101  const Real _capture_tolerance;
102  const unsigned int _stick_lock_iterations;
105 
106  NumericVector<Number> & _residual_copy;
107  // std::map<Point, PenetrationInfo *> _point_to_info;
108 
109  const unsigned int _mesh_dimension;
110 
111  std::vector<unsigned int> _vars;
112 
113  MooseVariable * _nodal_area_var;
114  SystemBase & _aux_system;
115  const NumericVector<Number> * _aux_solution;
116 
123 
130 };
131 
132 #endif
NumericVector< Number > & _residual_copy
ContactModel
Definition: ContactMaster.h:14
Real nodalArea(PenetrationInfo &pinfo)
ContactFormulation
Definition: ContactMaster.h:22
A MechanicalContactConstraint forces the value of a variable to be the same on both sides of an inter...
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 ContactFormulation _formulation
virtual void getConnectedDofIndices(unsigned int var_num) override
Get the dof indices of the nodes connected to the slave node for a specific variable.
virtual Real computeQpOffDiagJacobian(Moose::ConstraintJacobianType type, unsigned int jvar) override
Compute off-diagonal Jacobian entries.
virtual void updateAugmentedLagrangianMultiplier(bool beginning_of_step=false)
Real component(const SymmTensor &symm_tensor, unsigned int index)
Real _al_penetration_tolerance
The tolerance of the penetration for augmented Lagrangian method.
virtual Real computeQpResidual(Moose::ConstraintType type) override
void computeContactForce(PenetrationInfo *pinfo)
Real getPenalty(PenetrationInfo &pinfo)
virtual void updateContactSet(bool beginning_of_step=false)
virtual bool addCouplingEntriesToJacobian() override
virtual Real computeQpSlaveValue() override
virtual Real computeQpJacobian(Moose::ConstraintJacobianType type) override
virtual void computeOffDiagJacobian(unsigned int jvar) override
Compute off-diagonal Jacobian entries.
const bool _non_displacement_vars_jacobian
Whether to include coupling terms with non-displacement variables in the Jacobian.
MooseSharedPointer< DisplacedProblem > _displaced_problem
const bool _connected_slave_nodes_jacobian
Whether to include coupling terms with the nodes connected to the slave nodes in the Jacobian...
Real getTangentialPenalty(PenetrationInfo &pinfo)
std::vector< unsigned int > _vars
virtual void computeJacobian() override
Computes the jacobian for the current element.
Real _al_incremental_slip_tolerance
The tolerance of the incremental slip for augmented Lagrangian method.
MechanicalContactConstraint(const InputParameters &parameters)
Real _al_frictional_force_tolerance
The tolerance of the frictional force for augmented Lagrangian method.
const NumericVector< Number > * _aux_solution
const bool _master_slave_jacobian
Whether to include coupling between the master and slave nodes in the Jacobian.
InputParameters validParams< MechanicalContactConstraint >()