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

Boundary condition for convective heat flux where temperature and heat transfer coefficient are given by auxiliary variables. More...

#include <CoupledConvectiveHeatFluxBC.h>

Inheritance diagram for CoupledConvectiveHeatFluxBC:
[legend]

Public Member Functions

 CoupledConvectiveHeatFluxBC (const InputParameters &parameters)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual Real computeQpResidual ()
 
virtual Real computeQpJacobian ()
 

Protected Attributes

unsigned int _n_components
 The number of components. More...
 
std::vector< const VariableValue * > _T_infinity
 Far-field temperatue fields for each component. More...
 
std::vector< const VariableValue * > _htc
 Convective heat transfer coefficient. More...
 
std::vector< const VariableValue * > _alpha
 Volume fraction of individual phase. More...
 

Detailed Description

Boundary condition for convective heat flux where temperature and heat transfer coefficient are given by auxiliary variables.

Typically used in multi-app coupling scenario. It is possible to couple in a vector variable where each entry corresponds to a "phase".

Definition at line 24 of file CoupledConvectiveHeatFluxBC.h.

Constructor & Destructor Documentation

◆ CoupledConvectiveHeatFluxBC()

CoupledConvectiveHeatFluxBC::CoupledConvectiveHeatFluxBC ( const InputParameters &  parameters)

Definition at line 30 of file CoupledConvectiveHeatFluxBC.C.

31  : IntegratedBC(parameters), _n_components(coupledComponents("T_infinity"))
32 {
33  if (coupledComponents("alpha") != _n_components)
34  paramError(
35  "alpha",
36  "The number of coupled components does not match the number of `T_infinity` components.");
37  if (coupledComponents("htc") != _n_components)
38  paramError(
39  "htc",
40  "The number of coupled components does not match the number of `T_infinity` components.");
41 
42  _htc.resize(_n_components);
43  _T_infinity.resize(_n_components);
44  _alpha.resize(_n_components);
45  for (std::size_t c = 0; c < _n_components; c++)
46  {
47  _htc[c] = &coupledValue("htc", c);
48  _T_infinity[c] = &coupledValue("T_infinity", c);
49  _alpha[c] = &coupledValue("alpha", c);
50  }
51 }

Member Function Documentation

◆ computeQpJacobian()

Real CoupledConvectiveHeatFluxBC::computeQpJacobian ( )
protectedvirtual

Definition at line 63 of file CoupledConvectiveHeatFluxBC.C.

64 {
65  Real dq = 0;
66  for (std::size_t c = 0; c < _n_components; c++)
67  dq += (*_alpha[c])[_qp] * (*_htc[c])[_qp] * _phi[_j][_qp];
68  return _test[_i][_qp] * dq;
69 }

◆ computeQpResidual()

Real CoupledConvectiveHeatFluxBC::computeQpResidual ( )
protectedvirtual

Definition at line 54 of file CoupledConvectiveHeatFluxBC.C.

55 {
56  Real q = 0;
57  for (std::size_t c = 0; c < _n_components; c++)
58  q += (*_alpha[c])[_qp] * (*_htc[c])[_qp] * (_u[_qp] - (*_T_infinity[c])[_qp]);
59  return _test[_i][_qp] * q;
60 }

◆ validParams()

InputParameters CoupledConvectiveHeatFluxBC::validParams ( )
static

Definition at line 17 of file CoupledConvectiveHeatFluxBC.C.

18 {
19  InputParameters params = IntegratedBC::validParams();
20  params.addClassDescription(
21  "Convective heat transfer boundary condition with temperature and heat "
22  "transfer coefficent given by auxiliary variables.");
23  params.addCoupledVar("alpha", 1., "Volume fraction of components");
24  params.addRequiredCoupledVar("T_infinity", "Field holding far-field temperature");
25  params.addRequiredCoupledVar("htc", "Heat transfer coefficient");
26 
27  return params;
28 }

Member Data Documentation

◆ _alpha

std::vector<const VariableValue *> CoupledConvectiveHeatFluxBC::_alpha
protected

Volume fraction of individual phase.

Definition at line 42 of file CoupledConvectiveHeatFluxBC.h.

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

◆ _htc

std::vector<const VariableValue *> CoupledConvectiveHeatFluxBC::_htc
protected

Convective heat transfer coefficient.

Definition at line 40 of file CoupledConvectiveHeatFluxBC.h.

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

◆ _n_components

unsigned int CoupledConvectiveHeatFluxBC::_n_components
protected

The number of components.

Definition at line 36 of file CoupledConvectiveHeatFluxBC.h.

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

◆ _T_infinity

std::vector<const VariableValue *> CoupledConvectiveHeatFluxBC::_T_infinity
protected

Far-field temperatue fields for each component.

Definition at line 38 of file CoupledConvectiveHeatFluxBC.h.

Referenced by computeQpResidual(), and CoupledConvectiveHeatFluxBC().


The documentation for this class was generated from the following files:
CoupledConvectiveHeatFluxBC::_alpha
std::vector< const VariableValue * > _alpha
Volume fraction of individual phase.
Definition: CoupledConvectiveHeatFluxBC.h:42
validParams
InputParameters validParams()
CoupledConvectiveHeatFluxBC::_T_infinity
std::vector< const VariableValue * > _T_infinity
Far-field temperatue fields for each component.
Definition: CoupledConvectiveHeatFluxBC.h:38
CoupledConvectiveHeatFluxBC::_htc
std::vector< const VariableValue * > _htc
Convective heat transfer coefficient.
Definition: CoupledConvectiveHeatFluxBC.h:40
CoupledConvectiveHeatFluxBC::_n_components
unsigned int _n_components
The number of components.
Definition: CoupledConvectiveHeatFluxBC.h:36