https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeDynamicFrictionalForceLMMechanicalContact.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
14namespace Moose
15{
16namespace Mortar
17{
18namespace Contact
19{
21}
22}
23}
24
30{
31public:
33
35 void residualSetup() override;
36 void post() override;
37
41 void
42 incorrectEdgeDroppingPost(const std::unordered_set<const Node *> & inactive_lm_nodes) override;
43
44protected:
49 virtual void computeQpProperties() override;
50
54 virtual void computeQpIProperties() override;
55
62 virtual void enforceConstraintOnDof(const DofObject * const dof) override;
63
70 virtual void enforceConstraintOnDof3d(const DofObject * const dof);
71
72 void timestepSetup() override;
73
77 ADReal computeFrictionValue(const ADReal & contact_pressure,
78 const Real & tangential_vel,
79 const Real & tangential_vel_dir);
80
82 std::unordered_map<const DofObject *, std::array<ADReal, 2>> _dof_to_weighted_tangential_velocity;
83
85 std::unordered_map<const DofObject *, std::array<Real, 2>> _dof_to_real_tangential_velocity;
86
88 std::unordered_map<const DofObject *, std::array<Real, 2>> _dof_to_old_real_tangential_velocity;
89
91 std::array<const ADReal *, 2> _tangential_vel_ptr = {{nullptr, nullptr}};
92
95
98
100 const Real _c_t;
101
106
108 std::vector<MooseVariable *> _friction_vars;
109
112
115
118
121
124
127
130 const Real _epsilon;
131
133 const Real _mu;
134
137
140
142 bool _3d;
143};
DualNumber< Real, DNDerivativeType, true > ADReal
Computes the mortar tangential frictional forces for dynamic simulations.
const bool _has_friction_function
Boolean to determine whether the friction coefficient is taken from a function.
std::unordered_map< const DofObject *, std::array< Real, 2 > > _dof_to_real_tangential_velocity
A map from node to two tangential velocities. Required to have direct connection to physics.
ADReal computeFrictionValue(const ADReal &contact_pressure, const Real &tangential_vel, const Real &tangential_vel_dir)
Apply constant or function-based friction coefficient.
void incorrectEdgeDroppingPost(const std::unordered_set< const Node * > &inactive_lm_nodes) override
Copy of the post routine but that skips assembling inactive nodes.
virtual void computeQpIProperties() override
Computes properties that are functions both of _qp and _i, for example the weighted gap.
virtual void enforceConstraintOnDof(const DofObject *const dof) override
Method called from post().
virtual void computeQpProperties() override
Computes properties that are functions only of the current quadrature point (_qp),...
ADRealVectorValue _qp_real_tangential_velocity_nodal
The value of the tangential velocity vectors at the current node.
std::unordered_map< const DofObject *, std::array< ADReal, 2 > > _dof_to_weighted_tangential_velocity
A map from node to two weighted tangential velocities.
const Real _epsilon
Minimum value of contact pressure that will trigger including tangential forces in the contact residu...
const ADVariableValue *const _primary_z_dot
z-velocity on the primary face
std::vector< MooseVariable * > _friction_vars
Frictional Lagrange's multiplier variable pointers.
const ADVariableValue & _secondary_y_dot
y-velocity on the secondary face
ADRealVectorValue _qp_tangential_velocity_nodal
The value of the tangential velocity vectors at the current node.
const ADVariableValue *const _secondary_z_dot
z-velocity on the secondary face
std::array< const ADReal *, 2 > _tangential_vel_ptr
An array of two pointers to avoid copies.
const Moose::Mortar::Contact::FrictionProjectionDegree _friction_projection_degree
Degree of the friction-residual projection used by frictionalContactResidual (see MortarContactUtils....
virtual void enforceConstraintOnDof3d(const DofObject *const dof)
Method called from post().
bool _3d
Automatic flag to determine whether we are doing three-dimensional work.
const ADVariableValue & _secondary_x_dot
x-velocity on the secondary face
const ADVariableValue & _primary_y_dot
y-velocity on the primary face
const Real _c_t
Numerical factor used in the tangential constraints for convergence purposes.
std::unordered_map< const DofObject *, std::array< Real, 2 > > _dof_to_old_real_tangential_velocity
A map from node to two old tangential velocities. Required to have direct connection to physics.
const ADVariableValue & _primary_x_dot
x-velocity on the primary face
Computes the normal contact mortar constraints for dynamic simulations.
const InputParameters & parameters() const
VariableValueTempl< true > ADVariableValue