https://mooseframework.inl.gov
FinEnhancementFactorFunctorMaterial.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 
14 
15 template <bool is_ad>
18 {
20  params.addClassDescription("Computes a heat transfer enhancement factor for fins.");
21  params.addRequiredParam<MooseFunctorName>("fin_efficiency", "Fin efficiency functor");
22  params.addRequiredParam<MooseFunctorName>(
23  "fin_area_fraction",
24  "Functor for the fraction of the total surface area corresponding to fins");
25  params.addRequiredParam<MooseFunctorName>(
26  "area_increase_factor",
27  "Functor for the ratio of the total surface area with fins to the base surface area");
28  params.addParam<MooseFunctorName>(
29  "fin_enhancement_factor_name",
30  "fin_enhancement_factor",
31  "Name to give the fin enhancement factor functor material property");
32  return params;
33 }
34 
35 template <bool is_ad>
37  const InputParameters & parameters)
38  : FunctorMaterial(parameters),
39  _fin_efficiency(getFunctor<GenericReal<is_ad>>("fin_efficiency")),
40  _fin_area_fraction(getFunctor<GenericReal<is_ad>>("fin_area_fraction")),
41  _area_increase_factor(getFunctor<GenericReal<is_ad>>("area_increase_factor"))
42 {
43  addFunctorProperty<GenericReal<is_ad>>(
44  getParam<MooseFunctorName>("fin_enhancement_factor_name"),
45  [this](const auto & r, const auto & t) -> GenericReal<is_ad>
46  {
47  const auto fin_efficiency = _fin_efficiency(r, t);
48  const auto fin_area_fraction = _fin_area_fraction(r, t);
49  const auto total_efficiency = 1.0 - (1.0 - fin_efficiency) * fin_area_fraction;
50  const auto area_increase_factor = _area_increase_factor(r, t);
51  return total_efficiency * area_increase_factor;
52  });
53 }
54 
Moose::GenericType< Real, is_ad > GenericReal
Computes a heat transfer enhancement factor for fins.
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
FinEnhancementFactorFunctorMaterialTempl(const InputParameters &parameters)
const Moose::Functor< GenericReal< is_ad > > & _area_increase_factor
Ratio of the total surface area with fins to the base surface area.
void addRequiredParam(const std::string &name, const std::string &doc_string)
const Moose::Functor< GenericReal< is_ad > > & _fin_area_fraction
Fraction of the total surface area corresponding to fins.
const Moose::Functor< GenericReal< is_ad > > & _fin_efficiency
Fin efficiency.
void addClassDescription(const std::string &doc_string)
registerMooseObject("HeatTransferApp", FinEnhancementFactorFunctorMaterial)