https://mooseframework.inl.gov
ADExternalAppConvectionHeatTransferBC.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 {
19 
20  params.addRequiredCoupledVar("T_ext", "Temperature from external application");
21  params.addRequiredCoupledVar("htc_ext", "Heat transfer coefficient from external application");
22  params.addDeprecatedParam<PostprocessorName>(
23  "scale_pp",
24  "1.0",
25  "Post-processor by which to scale boundary condition",
26  "The 'scale' parameter is replacing the 'scale_pp' parameter. 'scale' is a function "
27  "parameter instead of a post-processor parameter. If you need to scale from a post-processor "
28  "value, use a PostprocessorFunction.");
29  params.addParam<FunctionName>("scale", 1.0, "Function by which to scale the boundary condition");
30 
31  params.addClassDescription("Convection BC from an external application");
32 
33  return params;
34 }
35 
37  const InputParameters & parameters)
38  : ADIntegratedBC(parameters),
39 
40  _T_ext(adCoupledValue("T_ext")),
41  _htc_ext(adCoupledValue("htc_ext")),
42  _scale_pp(getPostprocessorValue("scale_pp")),
43  _scale_fn(getFunction("scale"))
44 {
45 }
46 
47 ADReal
49 {
50  return _scale_pp * _scale_fn.value(_t, _q_point[_qp]) * _htc_ext[_qp] * (_u[_qp] - _T_ext[_qp]) *
51  _test[_i][_qp];
52 }
const ADTemplateVariableValue< T > & _u
void addDeprecatedParam(const std::string &name, const T &value, const std::string &doc_string, const std::string &deprecation_message)
ADExternalAppConvectionHeatTransferBC(const InputParameters &parameters)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
const PostprocessorValue & _scale_pp
Post-processor by which to scale boundary condition.
registerMooseObject("ThermalHydraulicsApp", ADExternalAppConvectionHeatTransferBC)
Convection BC from an external application.
DualNumber< Real, DNDerivativeType, true > ADReal
static InputParameters validParams()
unsigned int _qp
const MooseArray< Point > & _q_point
const Function & _scale_fn
Function by which to scale the boundary condition.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
const ADTemplateVariableTestValue< T > & _test
void addClassDescription(const std::string &doc_string)
const ADVariableValue & _T_ext
Temperature from external application.
virtual Real value(Real t, const Point &p) const
const ADVariableValue & _htc_ext
Heat transfer coefficient from external application.