https://mooseframework.inl.gov
ComputeFrictionalForceLMMechanicalContact.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 
13 #include "Function.h"
14 
16 
21 {
22 public:
24 
26  void residualSetup() override;
27  void post() override;
28 
32  void
33  incorrectEdgeDroppingPost(const std::unordered_set<const Node *> & inactive_lm_nodes) override;
34 
35 protected:
40  virtual void computeQpProperties() override;
41 
45  virtual void computeQpIProperties() override;
46 
53  virtual void enforceConstraintOnDof(const DofObject * const dof) override;
54 
61  virtual void enforceConstraintOnDof3d(const DofObject * const dof);
62 
67  ADReal computeFrictionValue(const ADReal & contact_pressure,
68  const ADReal & tangential_vel,
69  const ADReal & tangential_vel_dir);
70 
72  std::unordered_map<const DofObject *, std::array<ADReal, 2>> _dof_to_weighted_tangential_velocity;
73 
75  std::unordered_map<const DofObject *, std::array<ADReal, 2>> _dof_to_real_tangential_velocity;
76 
78  std::array<const ADReal *, 2> _tangential_vel_ptr = {{nullptr, nullptr}};
79 
81  std::array<ADReal, 2> _qp_tangential_velocity;
82 
84  std::array<ADReal, 2> _qp_real_tangential_velocity;
85 
88 
91 
94 
96  const Real _c_t;
97 
99  std::vector<MooseVariable *> _friction_vars;
100 
103 
106 
109 
112 
115 
118 
120  const Real _epsilon;
121 
123  const Real _mu;
124 
127 
130 
132  bool _3d;
133 };
ComputeFrictionalForceLMMechanicalContact(const InputParameters &parameters)
virtual void enforceConstraintOnDof(const DofObject *const dof) override
Method called from post().
const ADVariableValue & _primary_y_dot
y-velocity on the primary face
const ADVariableValue *const _primary_z_dot
z-velocity on the primary face
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 WeightedVelocitiesUserObject & _weighted_velocities_uo
The weighted gap user object.
const ADVariableValue & _primary_x_dot
x-velocity on the primary face
const bool _has_friction_function
Boolean to determine whether the friction coefficient is taken from a function.
const Real _c_t
Numerical factor used in the tangential constraints for convergence purposes.
virtual void computeQpIProperties() override
Computes properties that are functions both of _qp and _i, for example the weighted gap...
const ADVariableValue *const _secondary_z_dot
z-velocity on the secondary face
Creates dof object to weighted tangential velocities map.
Computes frictional constraints (and normal contact constraints by calling its parent object) ...
bool _3d
Automatic flag to determine whether we are doing three-dimensional work.
ADRealVectorValue _qp_real_tangential_velocity_nodal
The value of the real tangential velocity vectors at the current node.
DualNumber< Real, DNDerivativeType, true > ADReal
std::unordered_map< const DofObject *, std::array< ADReal, 2 > > _dof_to_weighted_tangential_velocity
A map from node to two weighted tangential velocities.
ADRealVectorValue _qp_tangential_velocity_nodal
The value of the tangential velocity vectors at the current node.
std::vector< MooseVariable * > _friction_vars
Frictional Lagrange&#39;s multiplier variable pointers.
const ADVariableValue & _secondary_y_dot
y-velocity on the secondary face
const Real _epsilon
Small contact pressure value to trigger computation of frictional forces.
std::array< ADReal, 2 > _qp_tangential_velocity
The value of the tangential velocity values at the current quadrature point.
ADReal computeFrictionValue(const ADReal &contact_pressure, const ADReal &tangential_vel, const ADReal &tangential_vel_dir)
Compute coefficient of friction.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::array< ADReal, 2 > _qp_real_tangential_velocity
The value of the "real" tangential velocity values at the current quadrature point.
const InputParameters & parameters() const
virtual void computeQpProperties() override
Computes properties that are functions only of the current quadrature point (_qp), e.g.
const ADVariableValue & _secondary_x_dot
x-velocity on the secondary face
void incorrectEdgeDroppingPost(const std::unordered_set< const Node *> &inactive_lm_nodes) override
Copy of the post routine but that skips assembling inactive nodes.
Computes the weighted gap that will later be used to enforce the zero-penetration mechanical contact ...
std::array< const ADReal *, 2 > _tangential_vel_ptr
An array of two pointers to avoid copies.
virtual void enforceConstraintOnDof3d(const DofObject *const dof)
Method called from post().