https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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
39{
40 using std::max;
41 const auto l = max(_gap_width, _min_gap);
42
43 return _k * (_primary_T[_qp] - _secondary_T[_qp]) / l;
44}
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("HeatTransferApp", GapFluxModelSimple)
Base class for gap flux models used by ModularGapConductanceConstraint.
static InputParameters validParams()
Base class for gap flux models used by ModularGapConductanceConstraint.
const Real _min_gap
Minimum gap distance allowed.
const ADVariableValue & _primary_T
Temperatures.
GapFluxModelSimple(const InputParameters &parameters)
static InputParameters validParams()
ADReal computeFlux() const override
Compute gap physics used cache information in GapFluxModelBase.
const Real _k
Thermal conductivity of the gap medium (e.g. air).
const ADVariableValue & _secondary_T
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
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)