https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
MortarContactPressureProvider Class Referenceabstract

Interface for objects that provide the physical normal contact pressure of a mortar interface. More...

#include <MortarContactPressureProvider.h>

Public Member Functions

 MortarContactPressureProvider (const MortarUserObject &provider_object)
 
virtual ~MortarContactPressureProvider ()=default
 
virtual ADReal nodalContactPressure (const libMesh::Node &node) const =0
 
virtual const VariableTestValue & tractionBasis () const =0
 
ADReal qpContactPressure (const libMesh::Elem &lower_secondary_elem, unsigned int qp) const
 
void checkConsumer (const MooseObject &consumer, const std::string &param, SubdomainID primary_subdomain, SubdomainID secondary_subdomain, bool use_displaced_mesh) const
 Report an error unless a consumer lies on the same mortar interface and mesh as this provider.
 

Private Attributes

const MortarUserObject & _provider_object
 The mortar user object that implements this interface.
 

Detailed Description

Interface for objects that provide the physical normal contact pressure of a mortar interface.

A contact Lagrange multiplier variable can store a scaled pressure, so objects in other modules that need the pressure obtain it from the contact object through this interface.

Definition at line 28 of file MortarContactPressureProvider.h.

Constructor & Destructor Documentation

◆ MortarContactPressureProvider()

MortarContactPressureProvider::MortarContactPressureProvider ( const MortarUserObject &  provider_object)
Parameters
provider_objectThe mortar user object that implements this interface. Consumers must share its interface and mesh.

Definition at line 15 of file MortarContactPressureProvider.C.

17 : _provider_object(provider_object)
18{
19}
const MortarUserObject & _provider_object
The mortar user object that implements this interface.

◆ ~MortarContactPressureProvider()

virtual MortarContactPressureProvider::~MortarContactPressureProvider ( )
virtualdefault

Member Function Documentation

◆ checkConsumer()

void MortarContactPressureProvider::checkConsumer ( const MooseObject &  consumer,
const std::string &  param,
SubdomainID  primary_subdomain,
SubdomainID  secondary_subdomain,
bool  use_displaced_mesh 
) const

Report an error unless a consumer lies on the same mortar interface and mesh as this provider.

nodalContactPressure() and tractionBasis() are only valid for the nodes and quadrature points of that interface and mesh.

Parameters
consumerThe object that reads the contact pressure
paramThe consumer parameter that names this provider
primary_subdomainThe consumer primary lower-dimensional subdomain
secondary_subdomainThe consumer secondary lower-dimensional subdomain
use_displaced_meshWhether the consumer operates on the displaced mesh

Definition at line 33 of file MortarContactPressureProvider.C.

38{
39 if (primary_subdomain != _provider_object.primarySubdomain() ||
40 secondary_subdomain != _provider_object.secondarySubdomain())
41 consumer.paramError(param,
42 "The contact pressure provider '",
44 "' must be defined on the same primary/secondary subdomain pair as '",
45 consumer.name(),
46 "'.");
47
48 if (use_displaced_mesh != _provider_object.getParam<bool>("use_displaced_mesh"))
49 consumer.paramError(param,
50 "The contact pressure provider '",
52 "' must use the same 'use_displaced_mesh' setting as '",
53 consumer.name(),
54 "'.");
55}
const std::string & name() const
Get the name of the class.
Definition MooseBase.h:103
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition MooseBase.h:466
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition MooseBase.h:415
SubdomainID primarySubdomain() const
SubdomainID secondarySubdomain() const

◆ nodalContactPressure()

virtual ADReal MortarContactPressureProvider::nodalContactPressure ( const libMesh::Node &  node) const
pure virtual
Parameters
nodeA secondary node of the mortar interface
Returns
The physical normal contact pressure at node, carrying its derivatives with respect to the solution

Referenced by qpContactPressure().

◆ qpContactPressure()

ADReal MortarContactPressureProvider::qpContactPressure ( const libMesh::Elem &  lower_secondary_elem,
unsigned int  qp 
) const
Parameters
lower_secondary_elemThe current secondary lower-dimensional element
qpThe current mortar segment quadrature point
Returns
The physical normal contact pressure at qp, interpolated from the nodal pressures of lower_secondary_elem with tractionBasis()

Definition at line 22 of file MortarContactPressureProvider.C.

24{
25 const auto & basis = tractionBasis();
26 ADReal pressure = 0;
27 for (const auto j : index_range(basis))
28 pressure += basis[j][qp] * nodalContactPressure(lower_secondary_elem.node_ref(j));
29 return pressure;
30}
virtual const VariableTestValue & tractionBasis() const =0
virtual ADReal nodalContactPressure(const libMesh::Node &node) const =0
auto index_range(const T &sizable)

◆ tractionBasis()

virtual const VariableTestValue & MortarContactPressureProvider::tractionBasis ( ) const
pure virtual
Returns
The basis that interpolates the nodal contact pressures on the current secondary lower-dimensional element, evaluated at the current mortar segment quadrature points

Referenced by qpContactPressure().

Member Data Documentation

◆ _provider_object

const MortarUserObject& MortarContactPressureProvider::_provider_object
private

The mortar user object that implements this interface.

Definition at line 78 of file MortarContactPressureProvider.h.

Referenced by checkConsumer().


The documentation for this class was generated from the following files: