https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MortarGenericTraction.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
12
14
17{
19 // Mechanical contact residuals use only primal values and normals
20 params.set<bool>("_compute_primal_gradients") = false;
21
22 MooseEnum component("x=0 y=1 z=2");
24 "component", component, "The force component constraint that this object is supplying");
26 "Used to apply tangential stresses from frictional contact using lagrange multipliers");
27 params.addRequiredParam<UserObjectName>("cohesive_zone_uo", "The cohesive zone user object.");
28 params.set<bool>("interpolate_normals") = false;
29 params.set<bool>("compute_lm_residual") = false;
30 // The cohesive zone user object runs on the displaced mesh and is only reinitialized for
31 // constraints that also run there.
32 params.set<bool>("use_displaced_mesh") = true;
33 return params;
34}
35
37 : ADMortarLagrangeConstraint(parameters),
38 _component(getParam<MooseEnum>("component")),
39 _cohesize_zone_uo(const_cast<CohesiveZoneModelBase &>(
40 getUserObject<CohesiveZoneModelBase>("cohesive_zone_uo")))
41{
42 if (!getParam<bool>("use_displaced_mesh"))
43 paramError("use_displaced_mesh",
44 "'use_displaced_mesh' must be true for the MortarGenericTraction object");
45}
46
49{
50 switch (type)
51 {
52 case Moose::MortarType::Secondary:
54 case Moose::MortarType::Primary:
56
57 default:
58 return 0;
59 }
60}
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("ContactApp", MortarGenericTraction)
This class enforces mortar constraints on lower dimensional domains, skipping interior nodes.
static InputParameters validParams()
Base class for mortar-based cohesive zone model.
virtual const ADVariableValue & czmGlobalTraction(unsigned int i) const
unsigned int _qp
unsigned int _i
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
const std::string & type() const
void paramError(const std::string &param, Args... args) const
const VariableTestValue & _test_secondary
const VariableTestValue & _test_primary
const CohesiveZoneModelBase & _cohesize_zone_uo
The cohesive zone user object that provides the surface traction.
MortarGenericTraction(const InputParameters &parameters)
static InputParameters validParams()
const MooseEnum _component
Displacement component on which the residual will be computed.
ADReal computeQpResidual(Moose::MortarType type) final