www.mooseframework.org
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)
 

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 25 of file CoupledConvectiveHeatFluxBC.h.

Constructor & Destructor Documentation

◆ CoupledConvectiveHeatFluxBC()

CoupledConvectiveHeatFluxBC::CoupledConvectiveHeatFluxBC ( const InputParameters &  parameters)

Definition at line 29 of file CoupledConvectiveHeatFluxBC.C.

30  : IntegratedBC(parameters), _n_components(coupledComponents("T_infinity"))
31 {
32  if (coupledComponents("alpha") != _n_components)
33  paramError(
34  "alpha",
35  "The number of coupled components does not match the number of `T_infinity` components.");
36  if (coupledComponents("htc") != _n_components)
37  paramError(
38  "htc",
39  "The number of coupled components does not match the number of `T_infinity` components.");
40 
41  _htc.resize(_n_components);
42  _T_infinity.resize(_n_components);
43  _alpha.resize(_n_components);
44  for (std::size_t c = 0; c < _n_components; c++)
45  {
46  _htc[c] = &coupledValue("htc", c);
47  _T_infinity[c] = &coupledValue("T_infinity", c);
48  _alpha[c] = &coupledValue("alpha", c);
49  }
50 }
std::vector< const VariableValue * > _alpha
Volume fraction of individual phase.
unsigned int _n_components
The number of components.
std::vector< const VariableValue * > _htc
Convective heat transfer coefficient.
std::vector< const VariableValue * > _T_infinity
Far-field temperatue fields for each component.

Member Function Documentation

◆ computeQpJacobian()

Real CoupledConvectiveHeatFluxBC::computeQpJacobian ( )
protectedvirtual

Definition at line 62 of file CoupledConvectiveHeatFluxBC.C.

63 {
64  Real dq = 0;
65  for (std::size_t c = 0; c < _n_components; c++)
66  dq += (*_alpha[c])[_qp] * (*_htc[c])[_qp] * _phi[_j][_qp];
67  return _test[_i][_qp] * dq;
68 }
std::vector< const VariableValue * > _alpha
Volume fraction of individual phase.
unsigned int _n_components
The number of components.
std::vector< const VariableValue * > _htc
Convective heat transfer coefficient.

◆ computeQpResidual()

Real CoupledConvectiveHeatFluxBC::computeQpResidual ( )
protectedvirtual

Definition at line 53 of file CoupledConvectiveHeatFluxBC.C.

54 {
55  Real q = 0;
56  for (std::size_t c = 0; c < _n_components; c++)
57  q += (*_alpha[c])[_qp] * (*_htc[c])[_qp] * (_u[_qp] - (*_T_infinity[c])[_qp]);
58  return _test[_i][_qp] * q;
59 }
std::vector< const VariableValue * > _alpha
Volume fraction of individual phase.
unsigned int _n_components
The number of components.
std::vector< const VariableValue * > _htc
Convective heat transfer coefficient.
std::vector< const VariableValue * > _T_infinity
Far-field temperatue fields for each component.

Member Data Documentation

◆ _alpha

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

Volume fraction of individual phase.

Definition at line 41 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 39 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 35 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 37 of file CoupledConvectiveHeatFluxBC.h.

Referenced by computeQpResidual(), and CoupledConvectiveHeatFluxBC().


The documentation for this class was generated from the following files: