https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
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
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}
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesApp", NSFVEnergyAmbientConvection)
static InputParameters validParams()
MooseVariableFV< Real > & _var
const Elem *const & _current_elem
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Implements a heat transfer term with an ambient medium, proportional to the difference between the fl...
const Moose::Functor< ADReal > & _temp_ambient
the ambient temperature of the medium with which the fluid exchanges heat
NSFVEnergyAmbientConvection(const InputParameters &parameters)
const Moose::Functor< ADReal > & _alpha
the convective heat transfer coefficient
Moose::StateArg determineState() const
static const std::string alpha
Definition NS.h:138