https://mooseframework.inl.gov
Loading...
Searching...
No Matches
GapConductanceConstraint.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
13
16{
19 "Computes the residual and Jacobian contributions for the 'Lagrange Multiplier' "
20 "implementation of the thermal contact problem. For more information, see the "
21 "detailed description here: http://tinyurl.com/gmmhbe9");
22 params.addRequiredParam<Real>("k", "Gap conductance");
23 params.addParam<Real>("min_gap",
24 1e-6,
25 "The minimum gap distance allowed. This helps with preventing the heat "
26 "flux from going to infinity as the gap approaches zero.");
27
28 // The flux is k/l (T^(1) - PT^(2)) with the plate gap width l, independent of the coordinate
29 // system
30 params.set<MooseEnum>("gap_geometry_type") = "PLATE";
31 params.suppressParameter<MooseEnum>("gap_geometry_type");
32 params.set<std::vector<UserObjectName>>("gap_flux_models") = {};
33 params.suppressParameter<std::vector<UserObjectName>>("gap_flux_models");
34 params.suppressParameter<Real>("max_gap");
35 params.suppressParameter<RealVectorValue>("cylinder_axis_point_1");
36 params.suppressParameter<RealVectorValue>("cylinder_axis_point_2");
37 params.suppressParameter<RealVectorValue>("sphere_origin");
38 return params;
39}
40
43 _k(getParam<Real>("k")),
44 _min_gap(getParam<Real>("min_gap"))
45{
46}
47
50{
51 using std::max;
52 return _k * (_u_primary[_qp] - _u_secondary[_qp]) / max(gapWidth(), _min_gap);
53}
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("HeatTransferApp", GapConductanceConstraint)
const ADVariableValue & _u_secondary
const ADVariableValue & _u_primary
unsigned int _qp
This Constraint implements thermal contact using a "gap conductance" model in which the flux is repre...
static InputParameters validParams()
const Real _k
Thermal conductivity of the gap medium (e.g. air).
GapConductanceConstraint(const InputParameters &parameters)
const Real _min_gap
Minimum gap distance allowed.
void suppressParameter(const std::string &name)
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)
This Constraint implements thermal contact using a "gap conductance" model in which the flux is repre...
const ADReal & gapWidth() const
Gap width at the current quadrature point.