https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MortarFrictionalWorkWearAux.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 "MooseVariableFE.h"
12#include "FEProblemBase.h"
13#include "Assembly.h"
15
18 MortarArchardsLawAux,
19 "06/30/2027 24:00",
21
24{
27 "Computes the nodal worn-out depth from the frictional work dissipated on a mortar contact "
28 "surface (Reye's wear law, commonly called Archard's law)");
29 params.addCoupledVar("v",
30 "Optional variable to take the value of. If omitted the value of the "
31 "`variable` itself is returned.");
32 params.addRequiredCoupledVar("displacements",
33 "The displacement variables. This mortar nodal auxiliary kernel can "
34 "take two or three displacements");
35 params.addParam<UserObjectName>(
36 "weighted_gap_uo",
37 "The mortar contact user object that provides the normal contact pressure. Required when the "
38 "contact pressure comes from a mechanical contact solve.");
39 params.addCoupledVar(
40 "normal_pressure",
41 "An auxiliary variable holding a prescribed physical normal contact pressure");
42 params.addParam<bool>("use_displaced_mesh",
43 true,
44 "Whether to use the displaced mesh to compute the auxiliary kernel value");
45 params.addParam<bool>(
46 "incremental",
47 true,
48 "Whether to accumulate worn-out depth (The default 'true' is strongly recommended)");
49 params.addRequiredParam<Real>(
50 "friction_coefficient",
51 "Coulomb friction coefficient used to compute the frictional dissipation rate (to match "
52 "that of frictional contact)");
53 params.addRequiredParam<Real>(
54 "energy_wear_coefficient",
55 "Worn-out depth per unit frictional work dissipated per unit area (Reye's wear law)");
56 params.set<bool>("interpolate_normals") = false;
57
58 return params;
59}
60
62 : MortarNodalAuxKernel(parameters),
63 _contact_pressure_provider(
64 isParamValid("weighted_gap_uo")
65 ? &getUserObject<MortarContactPressureProvider>("weighted_gap_uo")
66 : nullptr),
67 _normal_pressure(isCoupled("normal_pressure") || isCoupledConstant("normal_pressure")
68 ? &coupledValueLower("normal_pressure")
69 : nullptr),
70 _friction_coefficient(getParam<Real>("friction_coefficient")),
71 _energy_wear_coefficient(getParam<Real>("energy_wear_coefficient")),
72 _displacements(
73 {getVar("displacements", 0), getVar("displacements", 1), getVar("displacements", 2)}),
74 _has_disp_z(_displacements[2] ? true : false),
75 _secondary_x_dot(_displacements[0]->adUDot()),
76 _primary_x_dot(_displacements[0]->adUDotNeighbor()),
77 _secondary_y_dot(_displacements[1]->adUDot()),
78 _primary_y_dot(_displacements[1]->adUDotNeighbor()),
79 _secondary_z_dot(_has_disp_z ? &_displacements[2]->adUDot() : nullptr),
80 _primary_z_dot(_has_disp_z ? &_displacements[2]->adUDotNeighbor() : nullptr),
81 _worn_depth(0),
82 _qp_gap_velocity_nodal(0)
83{
84 if (!_displaced)
86 "use_displaced_mesh",
87 "The MortarFrictionalWorkWearAux auxiliary kernel requires the use of displaced meshes to "
88 "compute the worn-out depth.");
89
91 paramError("normal_pressure",
92 "Provide the normal contact pressure through either 'normal_pressure' or "
93 "'weighted_gap_uo', but not both.");
95 paramError("weighted_gap_uo",
96 "Provide the normal contact pressure through 'weighted_gap_uo' or "
97 "'normal_pressure'.");
100 *this, "weighted_gap_uo", primarySubdomain(), secondarySubdomain(), _displaced);
101}
102
103Real
110
111Real
113{
114 mooseAssert(_normals.size() == _test_lower.size(),
115 "Normals and test_lower must be the same size");
116 _worn_depth = 0;
118 for (_qp = 0; _qp < _qrule_msm->n_points(); _qp++)
119 {
121 for (_i = 0; _i < _test_lower.size(); ++_i)
123 }
124
125 return _worn_depth;
126}
127
128void
133
134void
136{
137 RealVectorValue gap_velocity_vec;
140
141 if (_has_disp_z)
142 gap_velocity_vec(2) = MetaPhysicL::raw_value((*_secondary_z_dot)[_qp] - (*_primary_z_dot)[_qp]);
143
144 // Remove point-wise normal component of the relative velocity
145 gap_velocity_vec -= gap_velocity_vec.contract(_normals[_i]) * _normals[_i];
146
147 // Compute norm of the relative tangential velocity (used to compute the weighted quantity)
148 const auto norm_tangential_vel = gap_velocity_vec.norm();
149
150 const auto worn_out_depth_dt = norm_tangential_vel * _energy_wear_coefficient *
153
154 // Accumulate worn-out depth over time.
155 _worn_depth += _test_lower[_i][_qp] * worn_out_depth_dt;
156}
registerMooseObject("ContactApp", MortarFrictionalWorkWearAux)
registerMooseObjectRenamed("ContactApp", MortarArchardsLawAux, "06/30/2027 24:00", MortarFrictionalWorkWearAux)
const Node *const & _current_node
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
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
SubdomainID primarySubdomain() const
const libMesh::QBase *const & _qrule_msm
SubdomainID secondarySubdomain() const
std::vector< Point > _normals
const std::vector< Real > & _JxW_msm
void checkConsumer(const MooseObject &consumer, const std::string &param, SubdomainID primary_subdomain, SubdomainID secondary_subdomain, bool use_displaced_mesh) const
virtual ADReal nodalContactPressure(const libMesh::Node &node) const=0
Compute the nodal worn-out depth from Reye's wear law (Reye 1860, col.
const Real _friction_coefficient
Coulomb friction coefficient used to compute the frictional dissipation rate.
const ADVariableValue & _secondary_x_dot
x-velocity on the secondary face
const ADVariableValue *const _primary_z_dot
z-velocity on the primary face
const bool _has_disp_z
For 2D mortar contact no displacement will be specified, so const pointers used.
Real _worn_depth
The worn-out depth (Aux Kernel computed value)
const ADVariableValue & _primary_x_dot
x-velocity on the primary face
const ADVariableValue & _secondary_y_dot
y-velocity on the secondary face
Real _nodal_normal_pressure
The normal contact pressure at the current node.
MortarFrictionalWorkWearAux(const InputParameters &parameters)
Constructor of mortar auxiliary kernel to compute nodal worn-out depth.
Real normalPressure() const
The normal contact pressure at the current node.
const Real _energy_wear_coefficient
Worn-out depth per unit dissipated frictional energy density (Reye's wear coefficient)
const ADVariableValue *const _secondary_z_dot
z-velocity on the secondary face
const MortarContactPressureProvider *const _contact_pressure_provider
Mortar contact object that provides the physical normal contact pressure, or nullptr.
const VariableValue *const _normal_pressure
Prescribed normal contact pressure variable, or nullptr when the pressure comes from the user object ...
const ADVariableValue & _primary_y_dot
y-velocity on the primary face
const OutputTools< ComputeValueType >::VariableTestValue & _test_lower
const MooseArray< Real > & _coord_msm
static InputParameters validParams()
unsigned int n_points() const
auto raw_value(const Eigen::Map< T > &in)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real