www.mooseframework.org
ConvectiveFluxFunction.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
8 
9 #include "Function.h"
10 
11 template <>
12 InputParameters
14 {
15  InputParameters params = validParams<IntegratedBC>();
16  params.addRequiredParam<FunctionName>("T_infinity", "Function describing far-field temperature");
17  params.addRequiredParam<Real>("coefficient", "Heat transfer coefficient");
18  params.addParam<FunctionName>("coefficient_function", "Heat transfer coefficient function");
19  params.addClassDescription(
20  "Determines boundary value by fluid heat transfer coefficient and far-field temperature");
21 
22  return params;
23 }
24 
25 ConvectiveFluxFunction::ConvectiveFluxFunction(const InputParameters & parameters)
26  : IntegratedBC(parameters),
27  _T_infinity(getFunction("T_infinity")),
28  _coefficient(getParam<Real>("coefficient")),
29  _coef_func(isParamValid("coefficient_function") ? &getFunction("coefficient_function") : NULL)
30 {
31 }
32 
33 Real
35 {
36  const Real coef(_coefficient * (_coef_func ? _coef_func->value(_t, _q_point[_qp]) : 1));
37  return _test[_i][_qp] * coef * (_u[_qp] - _T_infinity.value(_t, _q_point[_qp]));
38 }
39 
40 Real
42 {
43  const Real coef(_coefficient * (_coef_func ? _coef_func->value(_t, _q_point[_qp]) : 1));
44  return _test[_i][_qp] * coef * _phi[_j][_qp];
45 }
InputParameters validParams< ConvectiveFluxFunction >()
ConvectiveFluxFunction(const InputParameters &parameters)