19 "Computes the residual and Jacobian contributions for the 'Lagrange Multiplier' "
20 "implementation of the thermal contact problem. It pulls an auxiliary variable that acts as "
21 "an old material property recovered at the node using the nodal patch recovery capability.");
25 "The history variable whose old state we use for the constraint computation.");
28 "The minimum gap distance allowed. This helps with preventing the heat "
29 "flux from going to infinity as the gap approaches zero.");
30 params.
addCoupledVar(
"displacements",
"Displacement variables.");
37 _k(getParam<Real>(
"k")),
38 _min_gap(getParam<Real>(
"min_gap")),
39 _disp_name(parameters.getVecMooseType(
"displacements")),
40 _n_disp(_disp_name.size()),
41 _disp_secondary(_n_disp),
42 _disp_primary(_n_disp),
43 _stress_old(isCoupled(
"stateful_variable") ? coupledValueOld(
"stateful_variable") : _zero),
45 isCoupled(
"stateful_variable") ? coupledNeighborValueOld(
"stateful_variable") : _zero)
47 for (
unsigned int i = 0; i <
_n_disp; ++i)
58 using std::max, std::abs;
62 case Moose::MortarType::Primary:
64 case Moose::MortarType::Secondary:
66 case Moose::MortarType::Lower:
75 for (
unsigned int i = 0; i <
_n_disp; ++i)
77 ad_phys_points_primary(i).derivatives() = (*
_disp_primary[i])[
_qp].derivatives();
81 auto l = max((ad_phys_points_primary - ad_phys_points_secondary) *
_normals[
_qp],
_min_gap);
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("CombinedTestApp", GapConductanceStatefulConstraint)
const ADVariableValue & _u_secondary
const ADVariableValue & _lambda
const ADVariableValue & _u_primary
static InputParameters validParams()
virtual ADReal computeQpResidual(Moose::MortarType mortar_type) override
Computes the residual for the LM equation, lambda = (k/l)*(T^(1) - PT^(2)).
std::vector< const ADVariableValue * > _disp_primary
const VariableValue & _stress_neighbor_old
Old stress variable (possibly nodally recovered property) on primary surface.
const Real _k
Thermal conductivity of the gap medium (e.g. air).
std::vector< const ADVariableValue * > _disp_secondary
GapConductanceStatefulConstraint(const InputParameters ¶meters)
const VariableValue & _stress_old
Old stress variable (possibly nodally recovered property) on secondary surface.
const Real _min_gap
Minimum gap distance allowed.
const unsigned int _n_disp
static InputParameters validParams()
const std::vector< std::string > _disp_name
Displacement variables.
const ADTemplateVariableValue< OutputType > & adSln() const override
const VariableTestValue & _test_secondary
const VariableTestValue & _test
const VariableTestValue & _test_primary
const MooseArray< Point > & _phys_points_secondary
const MooseArray< Point > & _phys_points_primary
std::vector< Point > _normals
virtual MooseVariable & getStandardVariable(const THREAD_ID tid, const std::string &var_name)=0