https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MortarFrictionalStateAux.C
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
11#include "SystemBase.h"
12
14
17{
19 params.set<ExecFlagEnum>("execute_on") = EXEC_NONLINEAR;
20 params.addClassDescription("This class creates discrete states for nodes into frictional "
21 "contact, including contact/no-contact and stick/slip.");
22 params.addRequiredCoupledVar("tangent_one",
23 "First tangent vector Lagrange multiplier for computing the mortar "
24 "frictional pressure vector.");
25 params.addCoupledVar("tangent_two",
26 "Second tangent vector Lagrange multiplier for computing the mortar "
27 "frictional pressure vector.");
29 "contact_pressure",
30 "Normal contact pressure from the mortar contact enforcement, either the raw Lagrange "
31 "multiplier variable or a physical-pressure auxiliary variable populated by "
32 "MortarUserObjectAux.");
33 params.addRequiredParam<Real>("mu", "Friction coefficient to compute nodal states");
34 params.addParam<Real>("tolerance", 1.0e-3, "Tolerance value used to determine the states");
35 params.addParam<bool>(
36 "use_displaced_mesh", true, "Whether to use the displaced mesh to get the mortar interface.");
37 return params;
38}
39
41 : AuxKernel(params),
42 _tangent_one(coupledValueLower("tangent_one")),
43 _tangent_two(isParamValid("tangent_two") ? coupledValueLower("tangent_two") : _zero),
44 _contact_pressure(coupledValueLower("contact_pressure")),
45 _use_displaced_mesh(getParam<bool>("use_displaced_mesh")),
46 _mu(getParam<Real>("mu")),
47 _tolerance(getParam<Real>("tolerance"))
48{
49 // Only consider nodal quantities
50 if (!isNodal())
51 mooseError("MortarFrictionalStateAux auxiliary kernel can only be used with nodal kernels.");
52
54 paramError("use_displaced_mesh",
55 "This auxiliary kernel requires the use of displaced meshes to compute the "
56 "frictional pressure vector.");
57
58 // Kernel need to be boundary restricted
59 if (!this->_bnd)
60 paramError("boundary",
61 "MortarFrictionalStateAux auxiliary kernel must be restricted to a boundary.");
62
63 const auto mortar_dimension = _subproblem.mesh().dimension() - 1;
64 if (mortar_dimension == 2 && !isParamValid("tangent_two"))
65 paramError("tangent_two",
66 "MortarFrictionalStateAux auxiliary kernel requires a second tangent Lagrange "
67 "multiplier for three-dimensional problems");
68}
69
70Real
72{
73 // 0-NaN: Error
74 // 1: Node is not in contact
75 // 2: Node is in contact and sticking
76 // 3: Node is in contact and sliding
77
78 Real status = 1;
79
81 status = 2;
82
83 const Real tangential_pressure =
85
86 const Real tangential_pressure_sat = _mu * _contact_pressure[_qp];
87
88 if (status == 2 && tangential_pressure * (1.0 + _tolerance) > tangential_pressure_sat)
89 status = 3;
90
91 return status;
92}
const ExecFlagType EXEC_NONLINEAR
registerMooseObject("ContactApp", MortarFrictionalStateAux)
SubProblem & _subproblem
static InputParameters validParams()
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
void addCoupledVar(const std::string &name, const std::string &doc_string)
void paramError(const std::string &param, Args... args) const
void mooseError(Args &&... args) const
bool isParamValid(const std::string &name) const
virtual unsigned int dimension() const
Computes the frictional state of nodes in mechanical contact using a mortar approach.
static InputParameters validParams()
const bool _use_displaced_mesh
Whether to use displaced mesh (required for this auxiliary kernel)
const MooseArray< Real > & _contact_pressure
Normal contact pressure.
const Real _tolerance
Tolerance used to determine nodal contact states.
const MooseArray< Real > & _tangent_two
Tangent along the second direction.
virtual Real computeValue() override
const MooseArray< Real > & _tangent_one
Tangent along the first direction.
const Real _mu
Coefficient of friction corresponding to the contact interface TODO: Allow variable friction coeffici...
MortarFrictionalStateAux(const InputParameters &parameters)
virtual MooseMesh & mesh()=0