19 params.addParam<MooseFunctorName>(
"temperature",
"temperature variable");
21 params.addRequiredParam<MooseFunctorName>(
"htc",
"heat transfer coefficient");
26 "emissivity of the surface");
28 params.addRequiredParam<std::vector<Real>>(
29 "thermal_conductivities",
30 "vector of thermal conductivity values used for the conduction layers");
31 params.addRequiredParam<std::vector<Real>>(
"conduction_thicknesses",
32 "vector of conduction layer thicknesses");
34 MooseEnum geometry(
"cartesian cylindrical",
"cartesian");
35 params.addParam<
MooseEnum>(
"geometry", geometry,
"type of geometry");
36 params.addRangeCheckedParam<
Real>(
"inner_radius",
38 "coordinate corresponding to the first resistance layer");
40 params.addRangeCheckedParam<
Real>(
41 "step_size", 0.1,
"step_size > 0.0",
"underrelaxation step size");
43 params.addRangeCheckedParam<
unsigned int>(
44 "max_iterations", 100,
"max_iterations >= 0",
"maximum iterations");
46 params.addRangeCheckedParam<
Real>(
47 "tolerance", 1E-3,
"tolerance > 0.0",
"tolerance to converge iterations");
48 params.addClassDescription(
"Thermal resistance heat flux boundary condition for the " 49 "fluid and solid energy equations");
58 _T(isParamValid(
"temperature") ? getFunctor<
ADReal>(
"temperature")
59 : getFunctor<
ADReal>(
"variable")),
61 _k(getParam<
std::vector<
Real>>(
"thermal_conductivities")),
62 _dx(getParam<
std::vector<
Real>>(
"conduction_thicknesses")),
63 _h(getFunctor<
ADReal>(getParam<MooseFunctorName>(
"htc"))),
65 _max_iterations(getParam<unsigned
int>(
"max_iterations")),
66 _tolerance(getParam<
Real>(
"tolerance")),
67 _alpha(getParam<
Real>(
"step_size")),
69 _outer_radius(_inner_radius),
70 _conduction_resistance(0.0),
71 _parallel_resistance(0.0)
73 if (
_k.size() !=
_dx.size())
75 "Number of specified thermal conductivities must match " 76 "the number of conduction layers!");
78 if (
_geometry == Moose::CoordinateSystemType::COORD_RZ)
79 for (
const auto &
d :
_dx)
96 case Moose::CoordinateSystemType::COORD_XYZ:
99 case Moose::CoordinateSystemType::COORD_RZ:
106 mooseError(
"Unhandled 'GeometryEnum' in 'FunctorThermalResistanceBC'!");
131 unsigned int iteration = 0;
133 ADReal T_surface_previous;
150 norm = std::abs(
_T_surface - T_surface_previous) / std::abs(T_surface_previous);
154 mooseWarning(
"Maximum number of iterations reached in 'FunctorThermalResistanceBC'!");
ADReal _conduction_resistance
conduction thermal resistance
const Real _T_ambient
ambient temperature for convection and radiation heat transfer
static InputParameters validParams()
const Moose::Functor< ADReal > & _h
convective heat transfer coefficient
const Real & _alpha
underrelaxation factor (when radiative heat transfer is included)
Moose::StateArg determineState() const
const std::vector< Real > & _dx
thicknesses for each conduction layer, listed in order closest to the boundary
const Real & _emissivity
boundary emissivity
FunctorThermalResistanceBC(const InputParameters ¶meters)
ADReal _outer_radius
outer radius of surface
Moose::FaceArg singleSidedFaceArg(const FaceInfo *fi=nullptr, Moose::FV::LimiterType limiter_type=Moose::FV::LimiterType::CentralDifference, bool correct_skewness=false, const Moose::StateArg *state_limiter=nullptr) const
const Real _inner_radius
Radius corresponding to the cylindrical surface (when using a cylindrical geometry) ...
DualNumber< Real, DNDerivativeType, true > ADReal
void mooseWarning(Args &&... args) const
static const std::string T_ambient
This BC applies a heat flux to a boundary, where the heat flux is determined using series conduction ...
static InputParameters validParams()
void paramError(const std::string ¶m, Args... args) const
const unsigned int & _max_iterations
maximum number of iterations (when radiative heat transfer is included)
ADReal _parallel_resistance
parallel convection and radiation thermal resistance
const Real & _tolerance
tolerance of iterations (when radiative heat transfer is included)
ADReal _T_surface
surface temperature
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
registerMooseObject("HeatTransferApp", FunctorThermalResistanceBC)
virtual ADReal computeQpResidual() override
const Moose::Functor< ADReal > & _T
temperature variable
void mooseError(Args &&... args) const
const Moose::CoordinateSystemType _geometry
Whether to use a cylindrical or cartesian form for the thermal resistances.
const std::vector< Real > & _k
thermal conductivities for each conduction layer, listed in order closest to the boundary ...
void ErrorVector unsigned int
auto index_range(const T &sizable)
static const std::string emissivity
void computeConductionResistance()
Computes the serial resistance of multiple conductive layers.
void computeParallelResistance()
Computes the parallel heat flux resistance for a combined radiation-convection boundary.