https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FVFunctorConvectiveHeatFluxBC.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 "Function.h"
12
14
17{
20 "Convective heat transfer boundary condition with temperature and heat "
21 "transfer coefficient given by functors.");
22 params.addRequiredParam<MooseFunctorName>("T_solid", "Functor for wall temperature");
23 params.addRequiredParam<MooseFunctorName>("T_bulk", "Functor for far-field temperature");
24 params.addRequiredParam<MooseFunctorName>("heat_transfer_coefficient",
25 "Functor for heat transfer coefficient");
26 params.addRequiredParam<bool>("is_solid", "Whether this kernel acts on the solid temperature");
27
28 return params;
29}
30
32 : FVFluxBC(parameters),
33 _T_solid(getFunctor<ADReal>("T_solid")),
34 _T_bulk(getFunctor<ADReal>("T_bulk")),
35 _htc(getFunctor<ADReal>("heat_transfer_coefficient")),
36 _is_solid(getParam<bool>("is_solid"))
37{
38}
39
42{
43 // Allow the functors to pick their side evaluation since either T_bulk or T_solid is likely not
44 // defined on this boundary condition's side
45 const Moose::FaceArg face{
46 _face_info, Moose::FV::LimiterType::CentralDifference, true, false, nullptr, nullptr};
47 const auto flux = _htc(face, determineState()) *
48 (_T_bulk(face, determineState()) - _T_solid(face, determineState()));
49 if (_is_solid)
50 return -flux;
51 else
52 return flux;
53}
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("HeatTransferApp", FVFunctorConvectiveHeatFluxBC)
const FaceInfo * _face_info
static InputParameters validParams()
Robin boundary condition (temperatures) for finite volume scheme between a solid and fluid where the ...
const Moose::Functor< ADReal > & _htc
Convective heat transfer coefficient functor.
const Moose::Functor< ADReal > & _T_solid
Wall temperature functor.
FVFunctorConvectiveHeatFluxBC(const InputParameters &parameters)
const bool _is_solid
Boolean specifying if domain is solid or fluid.
const Moose::Functor< ADReal > & _T_bulk
Far-field temperature functor.
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Moose::StateArg determineState() const