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 Lagrange multiplier from the mortar contact enforcement.");
31 params.addRequiredParam<Real>("mu", "Friction coefficient to compute nodal states");
32 params.addParam<Real>("tolerance", 1.0e-3, "Tolerance value used to determine the states");
33 params.addParam<bool>(
34 "use_displaced_mesh", true, "Whether to use the displaced mesh to get the mortar interface.");
35 return params;
36}
37
39 : AuxKernel(params),
40 _tangent_one(coupledValueLower("tangent_one")),
41 _tangent_two(isParamValid("tangent_two") ? coupledValueLower("tangent_two") : _zero),
42 _contact_pressure(coupledValueLower("contact_pressure")),
43 _use_displaced_mesh(getParam<bool>("use_displaced_mesh")),
44 _mu(getParam<Real>("mu")),
45 _tolerance(getParam<Real>("tolerance"))
46{
47 // Only consider nodal quantities
48 if (!isNodal())
49 mooseError("MortarFrictionalStateAux auxiliary kernel can only be used with nodal kernels.");
50
52 paramError("use_displaced_mesh",
53 "This auxiliary kernel requires the use of displaced meshes to compute the "
54 "frictional pressure vector.");
55
56 // Kernel need to be boundary restricted
57 if (!this->_bnd)
58 paramError("boundary",
59 "MortarFrictionalStateAux auxiliary kernel must be restricted to a boundary.");
60
61 const auto mortar_dimension = _subproblem.mesh().dimension() - 1;
62 if (mortar_dimension == 2 && !isParamValid("tangent_two"))
63 paramError("tangent_two",
64 "MortarFrictionalStateAux auxiliary kernel requires a second tangent Lagrange "
65 "multiplier for three-dimensional problems");
66}
67
68Real
70{
71 // 0-NaN: Error
72 // 1: Node is not in contact
73 // 2: Node is in contact and sticking
74 // 3: Node is in contact and sliding
75
76 Real status = 1;
77
79 status = 2;
80
81 const Real tangential_pressure =
83
84 const Real tangential_pressure_sat = _mu * _contact_pressure[_qp];
85
86 if (status == 2 && tangential_pressure * (1.0 + _tolerance) > tangential_pressure_sat)
87 status = 3;
88
89 return status;
90}
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