www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
ConvectiveFluxFunction Class Reference

#include <ConvectiveFluxFunction.h>

Inheritance diagram for ConvectiveFluxFunction:
[legend]

Public Member Functions

 ConvectiveFluxFunction (const InputParameters &parameters)
 
virtual ~ConvectiveFluxFunction ()
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Types

enum  CoefFuncType { CoefFuncType::TIME_AND_POSITION, CoefFuncType::TEMPERATURE }
 Enum used to define the type of function used for the heat transfer coefficient. More...
 

Protected Member Functions

virtual Real computeQpResidual () override
 
virtual Real computeQpJacobian () override
 

Protected Attributes

const Function & _T_infinity
 Far-field temperature. More...
 
const Function & _coefficient
 Heat transfer coefficient. More...
 
const CoefFuncType _coef_func_type
 Type of function used for the heat transfer coefficient. More...
 
const Function *const _coef_func
 Heat transfer coefficient function (Deprecated – being replaced by _coefficient) More...
 

Detailed Description

Definition at line 14 of file ConvectiveFluxFunction.h.

Member Enumeration Documentation

◆ CoefFuncType

Enum used to define the type of function used for the heat transfer coefficient.

Enumerator
TIME_AND_POSITION 
TEMPERATURE 

Definition at line 33 of file ConvectiveFluxFunction.h.

34  {
35  TIME_AND_POSITION,
36  TEMPERATURE
37  };

Constructor & Destructor Documentation

◆ ConvectiveFluxFunction()

ConvectiveFluxFunction::ConvectiveFluxFunction ( const InputParameters &  parameters)

Definition at line 41 of file ConvectiveFluxFunction.C.

42  : IntegratedBC(parameters),
43  _T_infinity(getFunction("T_infinity")),
44  _coefficient(getFunction("coefficient")),
45  _coef_func_type(getParam<MooseEnum>("coefficient_function_type").getEnum<CoefFuncType>()),
46  _coef_func(isParamValid("coefficient_function") ? &getFunction("coefficient_function") : NULL)
47 {
49  mooseError("Deprecated 'coefficient_function' parameter cannot be used with "
50  "'coefficient_function_type=TEMPERATURE'");
51 }

◆ ~ConvectiveFluxFunction()

virtual ConvectiveFluxFunction::~ConvectiveFluxFunction ( )
inlinevirtual

Definition at line 20 of file ConvectiveFluxFunction.h.

20 {}

Member Function Documentation

◆ computeQpJacobian()

Real ConvectiveFluxFunction::computeQpJacobian ( )
overrideprotectedvirtual

Definition at line 70 of file ConvectiveFluxFunction.C.

71 {
73  {
74  Real coef = _coefficient.value(_t, _q_point[_qp]);
75  if (_coef_func) // Deprecated behavior
76  coef *= _coef_func->value(_t, _q_point[_qp]);
77  return _test[_i][_qp] * coef * _phi[_j][_qp];
78  }
79  else
80  {
81  const Real coef = _coefficient.value(_u[_qp], Point());
82  const Real dcoef_dT = _coefficient.timeDerivative(_u[_qp], Point());
83  return _test[_i][_qp] * (coef + (_u[_qp] - _T_infinity.value(_t, _q_point[_qp])) * dcoef_dT) *
84  _phi[_j][_qp];
85  }
86 }

◆ computeQpResidual()

Real ConvectiveFluxFunction::computeQpResidual ( )
overrideprotectedvirtual

Definition at line 54 of file ConvectiveFluxFunction.C.

55 {
56  Real coef;
58  {
59  coef = _coefficient.value(_t, _q_point[_qp]);
60  if (_coef_func) // Deprecated behavior
61  coef *= _coef_func->value(_t, _q_point[_qp]);
62  }
63  else
64  coef = _coefficient.value(_u[_qp], Point());
65 
66  return _test[_i][_qp] * coef * (_u[_qp] - _T_infinity.value(_t, _q_point[_qp]));
67 }

◆ validParams()

InputParameters ConvectiveFluxFunction::validParams ( )
static

Definition at line 19 of file ConvectiveFluxFunction.C.

20 {
21  InputParameters params = IntegratedBC::validParams();
22  params.addRequiredParam<FunctionName>("T_infinity", "Function describing far-field temperature");
23  params.addRequiredParam<FunctionName>("coefficient",
24  "Function describing heat transfer coefficient");
25  MooseEnum coef_func_type("TIME_AND_POSITION TEMPERATURE", "TIME_AND_POSITION");
26  params.addParam<MooseEnum>(
27  "coefficient_function_type",
28  coef_func_type,
29  "Type of function for heat transfer coefficient provided in 'coefficient' parameter");
30  params.addDeprecatedParam<FunctionName>(
31  "coefficient_function",
32  "Heat transfer coefficient function",
33  "'coefficient' should be used instead. 'coefficient_function will be removed on March 1, "
34  "2020.");
35  params.addClassDescription(
36  "Determines boundary value by fluid heat transfer coefficient and far-field temperature");
37 
38  return params;
39 }

Member Data Documentation

◆ _coef_func

const Function* const ConvectiveFluxFunction::_coef_func
protected

Heat transfer coefficient function (Deprecated – being replaced by _coefficient)

Definition at line 43 of file ConvectiveFluxFunction.h.

Referenced by computeQpJacobian(), computeQpResidual(), and ConvectiveFluxFunction().

◆ _coef_func_type

const CoefFuncType ConvectiveFluxFunction::_coef_func_type
protected

Type of function used for the heat transfer coefficient.

Definition at line 40 of file ConvectiveFluxFunction.h.

Referenced by computeQpJacobian(), computeQpResidual(), and ConvectiveFluxFunction().

◆ _coefficient

const Function& ConvectiveFluxFunction::_coefficient
protected

Heat transfer coefficient.

Definition at line 30 of file ConvectiveFluxFunction.h.

Referenced by computeQpJacobian(), and computeQpResidual().

◆ _T_infinity

const Function& ConvectiveFluxFunction::_T_infinity
protected

Far-field temperature.

Definition at line 27 of file ConvectiveFluxFunction.h.

Referenced by computeQpJacobian(), and computeQpResidual().


The documentation for this class was generated from the following files:
ConvectiveFluxFunction::_coefficient
const Function & _coefficient
Heat transfer coefficient.
Definition: ConvectiveFluxFunction.h:30
ConvectiveFluxFunction::_T_infinity
const Function & _T_infinity
Far-field temperature.
Definition: ConvectiveFluxFunction.h:27
ConvectiveFluxFunction::CoefFuncType::TIME_AND_POSITION
validParams
InputParameters validParams()
ConvectiveFluxFunction::_coef_func
const Function *const _coef_func
Heat transfer coefficient function (Deprecated – being replaced by _coefficient)
Definition: ConvectiveFluxFunction.h:43
ConvectiveFluxFunction::_coef_func_type
const CoefFuncType _coef_func_type
Type of function used for the heat transfer coefficient.
Definition: ConvectiveFluxFunction.h:40
ConvectiveFluxFunction::CoefFuncType::TEMPERATURE