https://mooseframework.inl.gov
WeightedVelocitiesUserObject.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 
12 #include "WeightedGapUserObject.h"
13 
18 {
19 public:
21 
23 
24  virtual void initialize() override;
25  virtual void finalize() override;
26 
30  const std::unordered_map<const DofObject *, std::array<ADReal, 2>> &
32 
36  virtual const ADVariableValue & contactTangentialPressureDirOne() const = 0;
37  virtual const ADVariableValue & contactTangentialPressureDirTwo() const = 0;
38 
39 protected:
44  virtual void computeQpProperties() override;
45 
49  virtual void computeQpIProperties() override;
50 
51  void selfInitialize();
53 
55  std::unordered_map<const DofObject *, std::array<ADReal, 2>> _dof_to_weighted_tangential_velocity;
56 
58  std::unordered_map<const DofObject *, std::array<ADReal, 2>> _dof_to_real_tangential_velocity;
59 
61  std::array<const ADReal *, 2> _tangential_vel_ptr = {{nullptr, nullptr}};
62 
64  std::array<ADReal, 2> _qp_tangential_velocity;
65 
67  std::array<ADReal, 2> _qp_real_tangential_velocity;
68 
71 
74 
77 
80 
83 
86 
89 
92 
95 
98 
101 
103  bool _3d;
104 };
105 
106 inline const std::unordered_map<const DofObject *, std::array<ADReal, 2>> &
108 {
110 }
ADRealVectorValue _qp_tangential_velocity_nodal
The value of the tangential velocity vectors at the current node.
const ADVariableValue & _secondary_y_dot
y-velocity on the secondary face
std::unordered_map< const DofObject *, std::array< ADReal, 2 > > _dof_to_real_tangential_velocity
A map from node to two interpolated, physical tangential velocities.
const ADVariableValue *const _secondary_z_dot
z-velocity on the secondary face
bool _3d
Automatic flag to determine whether we are doing three-dimensional work.
SystemBase & _sys
Reference to the EquationSystem object.
Creates dof object to weighted tangential velocities map.
const ADVariableValue *const _primary_z_dot
z-velocity on the primary face
ADRealVectorValue _qp_real_tangential_velocity_nodal
The value of the real tangential velocity vectors at the current node.
const std::unordered_map< const DofObject *, std::array< ADReal, 2 > > & dofToWeightedVelocities() const
Get the degree of freedom to weighted velocities information.
virtual const ADVariableValue & contactTangentialPressureDirTwo() const =0
const ADVariableValue & _primary_y_dot
y-velocity on the primary face
const ADVariableValue & _primary_x_dot
x-velocity on the primary face
virtual void computeQpProperties() override
Computes properties that are functions only of the current quadrature point (_qp), e.g.
MooseVariableField< Real > & _secondary_var
Reference to the secondary variable.
MooseVariableField< Real > & _primary_var
Reference to the primary variable.
std::array< ADReal, 2 > _qp_tangential_velocity
The value of the tangential velocity values at the current quadrature point.
Creates dof object to weighted gap map.
virtual const ADVariableValue & contactTangentialPressureDirOne() const =0
const ADVariableValue & _secondary_x_dot
x-velocity on the secondary face
std::array< ADReal, 2 > _qp_real_tangential_velocity
The value of the "real" tangential velocity values at the current quadrature point.
WeightedVelocitiesUserObject(const InputParameters &parameters)
const InputParameters & parameters() const
std::unordered_map< const DofObject *, std::array< ADReal, 2 > > _dof_to_weighted_tangential_velocity
A map from node to two weighted tangential velocities.
virtual void computeQpIProperties() override
Computes properties that are functions both of _qp and _i, for example the weighted gap...
std::array< const ADReal *, 2 > _tangential_vel_ptr
An array of two pointers to avoid copies.