https://mooseframework.inl.gov
GapFluxModelBase.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 
10 #include "GapFluxModelBase.h"
12 
15 {
17  params.addClassDescription("Gap flux model base class");
18 
19  // UOs of this type should not be executed by MOOSE, but only called through
20  // ModularGapConductanceConstraint
21  params.set<ExecFlagEnum>("execute_on") = EXEC_CUSTOM;
22  params.suppressParameter<ExecFlagEnum>("execute_on");
23 
24  // flux models default to operating on the displaced mesh
25  params.set<bool>("use_displaced_mesh") = true;
26 
27  return params;
28 }
29 
31  : InterfaceUserObjectBase(parameters), ADFunctorInterface(this), _qp(0), _gap_width(0.0)
32 {
33 }
34 
35 ADReal
37  const ModularGapConductanceConstraint & mortar_constraint) const
38 {
39  // Cache general geometry information
40  // This allows derived user object to compute gap physics without external dependencies
41 
42  _qp = mortar_constraint._qp;
43  _gap_width = mortar_constraint._gap_width;
45  _adjusted_length = mortar_constraint._adjusted_length;
46  _normal_pressure = mortar_constraint._normal_pressure;
48  mortar_constraint._phys_points_secondary[_qp],
49  false});
51  mortar_constraint._phys_points_primary[_qp],
52  false});
53 
54  return computeFlux();
55 }
Moose::ElemPointArg _primary_point
The primary quadrature point location.
const Elem *const & _interior_secondary_elem
const ExecFlagType EXEC_CUSTOM
virtual ADReal computeFluxInternal(const ModularGapConductanceConstraint &mortar_constraint) const
Cache geometry-related information from the mortar constraint.
T & set(const std::string &name, bool quiet_mode=false)
const MooseArray< Point > & _phys_points_primary
const Elem *const & _interior_primary_elem
DualNumber< Real, DNDerivativeType, true > ADReal
void suppressParameter(const std::string &name)
static InputParameters validParams()
const MooseArray< Point > & _phys_points_secondary
unsigned int _qp
This Constraint implements thermal contact using a "gap conductance" model in which the flux is repre...
void addClassDescription(const std::string &doc_string)
ADReal _surface_integration_factor
Factor to preserve energy balance (due to mismatch in primary/secondary differential surface sizes) ...
virtual ADReal computeFlux() const =0
Compute gap physics used cache information in GapFluxModelBase.
GapFluxModelBase(const InputParameters &parameters)
static InputParameters validParams()
unsigned int _qp
ADReal _normal_pressure
Cached contact pressure for use by UserObjects.
ADReal _surface_integration_factor
Moose::ElemPointArg _secondary_point
The secondary quadrature point location.
ADReal _gap_width
Gap width to pass into flux models.