https://mooseframework.inl.gov
GapFluxModelSimple.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 "GapFluxModelSimple.h"
11 
12 registerMooseObject("HeatTransferApp", GapFluxModelSimple);
13 
16 {
18  params.addClassDescription("Gap flux model with a constant conductance");
19  params.addRequiredCoupledVar("temperature", "The name of the temperature variable");
20  params.addRequiredParam<Real>("k", "Gap conductance");
21  params.addParam<Real>("min_gap",
22  1e-6,
23  "The minimum gap distance allowed. This helps with preventing the heat "
24  "flux from going to infinity as the gap approaches zero.");
25  return params;
26 }
27 
29  : GapFluxModelBase(parameters),
30  _k(getParam<Real>("k")),
31  _min_gap(getParam<Real>("min_gap")),
32  _primary_T(adCoupledNeighborValue("temperature")),
33  _secondary_T(adCoupledValue("temperature"))
34 {
35 }
36 
37 ADReal
39 {
40  const auto l = std::max(_gap_width, _min_gap);
41 
42  return _k * (_primary_T[_qp] - _secondary_T[_qp]) / l;
43 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
const Real _min_gap
Minimum gap distance allowed.
registerMooseObject("HeatTransferApp", GapFluxModelSimple)
Base class for gap flux models used by ModularGapConductanceConstraint.
DualNumber< Real, DNDerivativeType, true > ADReal
const Real _k
Thermal conductivity of the gap medium (e.g. air).
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
Base class for gap flux models used by ModularGapConductanceConstraint.
const ADVariableValue & _secondary_T
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned int _qp
void addClassDescription(const std::string &doc_string)
ADReal computeFlux() const override
Compute gap physics used cache information in GapFluxModelBase.
const ADVariableValue & _primary_T
Temperatures.
GapFluxModelSimple(const InputParameters &parameters)
static InputParameters validParams()