https://mooseframework.inl.gov
NSFVEnergyAmbientConvection.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 #include "NS.h"
12 
14 
17 {
19  params.addClassDescription(
20  "Implements a solid-fluid ambient convection volumetric term "
21  "proportional to the difference between the fluid and ambient temperatures : "
22  "$q''' = \\alpha (T_{fluid} - T_{ambient})$.");
23  params.addRequiredParam<MaterialPropertyName>(NS::alpha,
24  "Name of the convective heat transfer coefficient");
25  params.addRequiredParam<MooseFunctorName>("T_ambient", "The ambient temperature");
26  return params;
27 }
28 
30  : FVElementalKernel(parameters),
31  _alpha(getFunctor<ADReal>(NS::alpha)),
32  _temp_ambient(getFunctor<ADReal>("T_ambient"))
33 {
34 }
35 
36 ADReal
38 {
39  auto elem_arg = makeElemArg(_current_elem);
40  const auto state = determineState();
41  return _alpha(elem_arg, state) * (_var(elem_arg, state) - _temp_ambient(elem_arg, state));
42 }
Moose::StateArg determineState() const
Implements a heat transfer term with an ambient medium, proportional to the difference between the fl...
DualNumber< Real, DNDerivativeType, true > ADReal
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
const Elem *const & _current_elem
const Moose::Functor< ADReal > & _alpha
the convective heat transfer coefficient
static InputParameters validParams()
const Moose::Functor< ADReal > & _temp_ambient
the ambient temperature of the medium with which the fluid exchanges heat
NSFVEnergyAmbientConvection(const InputParameters &parameters)
static const std::string alpha
Definition: NS.h:134
registerMooseObject("NavierStokesApp", NSFVEnergyAmbientConvection)
void addClassDescription(const std::string &doc_string)
MooseVariableFV< Real > & _var