https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OneDEnergyWallHeating Class Reference

#include <OneDEnergyWallHeating.h>

Inheritance diagram for OneDEnergyWallHeating:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 OneDEnergyWallHeating (const InputParameters &parameters)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialPropertyByName (const std::string &name)
 
void validateDerivativeMaterialPropertyBase (const std::string &base)
 
const MaterialPropertyName derivativePropertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName derivativePropertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName derivativePropertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName derivativePropertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual Real computeQpResidual ()
 
virtual Real computeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar)
 
MaterialProperty< U > & declarePropertyDerivativeTHM (const std::string &base, const std::string &var_name, const unsigned int i=0)
 Method for declaring derivative material properties. More...
 
const MaterialProperty< U > & getMaterialPropertyDerivativeTHM (const std::string &base, const std::string &var_name, const unsigned int i=0)
 Method for retrieving derivative material properties. More...
 
const MaterialProperty< U > & getMaterialPropertyDerivativeTHMPhase (const std::string &base, bool property_is_liquid, const std::string &var_name, bool var_is_liquid, const unsigned int i=0)
 Method for retrieving derivative material properties corresponding to phase-dependent derivatives. More...
 

Protected Attributes

const MaterialProperty< Real > & _temperature
 
const MaterialProperty< Real > & _dT_drhoA
 
const MaterialProperty< Real > & _dT_drhouA
 
const MaterialProperty< Real > & _dT_drhoEA
 
const MaterialProperty< Real > & _Hw
 
const VariableValue_T_wall
 
const VariableValue_P_hf
 
unsigned _rhoA_var_number
 
unsigned _rhouA_var_number
 

Detailed Description

Definition at line 16 of file OneDEnergyWallHeating.h.

Constructor & Destructor Documentation

◆ OneDEnergyWallHeating()

OneDEnergyWallHeating::OneDEnergyWallHeating ( const InputParameters parameters)

Definition at line 31 of file OneDEnergyWallHeating.C.

33  _temperature(getMaterialProperty<Real>("T")),
34  _dT_drhoA(getMaterialPropertyDerivativeTHM<Real>("T", "rhoA")),
35  _dT_drhouA(getMaterialPropertyDerivativeTHM<Real>("T", "rhouA")),
36  _dT_drhoEA(getMaterialPropertyDerivativeTHM<Real>("T", "rhoEA")),
37  _Hw(getMaterialProperty<Real>("Hw")),
38  _T_wall(coupledValue("T_wall")),
39  _P_hf(coupledValue("P_hf")),
40  _rhoA_var_number(coupled("rhoA")),
41  _rhouA_var_number(coupled("rhouA"))
42 {
43 }
const MaterialProperty< Real > & _dT_drhoA
const MaterialProperty< Real > & _Hw
const VariableValue & _T_wall
const VariableValue & _P_hf
const MaterialProperty< Real > & _temperature
const MaterialProperty< Real > & _dT_drhoEA
const MaterialProperty< Real > & _dT_drhouA

Member Function Documentation

◆ computeQpJacobian()

Real OneDEnergyWallHeating::computeQpJacobian ( )
protectedvirtual

Definition at line 52 of file OneDEnergyWallHeating.C.

53 {
54  return _Hw[_qp] * _P_hf[_qp] * _dT_drhoEA[_qp] * _phi[_j][_qp] * _test[_i][_qp];
55 }
const MaterialProperty< Real > & _Hw
const VariableValue & _P_hf
const MaterialProperty< Real > & _dT_drhoEA

◆ computeQpOffDiagJacobian()

Real OneDEnergyWallHeating::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 58 of file OneDEnergyWallHeating.C.

59 {
60  if (jvar == _rhoA_var_number)
61  return _Hw[_qp] * _P_hf[_qp] * _dT_drhoA[_qp] * _phi[_j][_qp] * _test[_i][_qp];
62 
63  else if (jvar == _rhouA_var_number)
64  return _Hw[_qp] * _P_hf[_qp] * _dT_drhouA[_qp] * _phi[_j][_qp] * _test[_i][_qp];
65 
66  else
67  return 0.;
68 }
const MaterialProperty< Real > & _dT_drhoA
const MaterialProperty< Real > & _Hw
const VariableValue & _P_hf
const MaterialProperty< Real > & _dT_drhouA

◆ computeQpResidual()

Real OneDEnergyWallHeating::computeQpResidual ( )
protectedvirtual

Definition at line 46 of file OneDEnergyWallHeating.C.

47 {
48  return _Hw[_qp] * _P_hf[_qp] * (_temperature[_qp] - _T_wall[_qp]) * _test[_i][_qp];
49 }
const MaterialProperty< Real > & _Hw
const VariableValue & _T_wall
const VariableValue & _P_hf
const MaterialProperty< Real > & _temperature

◆ declarePropertyDerivativeTHM()

MaterialProperty< U > & DerivativeMaterialInterfaceTHM< Kernel >::declarePropertyDerivativeTHM ( const std::string &  base,
const std::string &  var_name,
const unsigned int  i = 0 
)
protectedinherited

Method for declaring derivative material properties.

Template Parameters
UThe material property type
Parameters
baseThe name of the property to take the derivative of
var_nameThe name of the coupled variable vector containing the variable to take the derivative with respect to
iThe index of the variable to take the derivative with respect to within the coupled variable vector

Definition at line 88 of file DerivativeMaterialInterfaceTHM.h.

91 {
92  return this->template declarePropertyDerivative<U>(base, this->coupledName(var_name, i));
93 }

◆ getMaterialPropertyDerivativeTHM()

const MaterialProperty< U > & DerivativeMaterialInterfaceTHM< Kernel >::getMaterialPropertyDerivativeTHM ( const std::string &  base,
const std::string &  var_name,
const unsigned int  i = 0 
)
protectedinherited

Method for retrieving derivative material properties.

Template Parameters
UThe material property type
Parameters
baseThe name of the property to take the derivative of
var_nameThe name of the coupled variable vector containing the variable to take the derivative with respect to
iThe index of the variable to take the derivative with respect to within the coupled variable vector

Definition at line 98 of file DerivativeMaterialInterfaceTHM.h.

101 {
102  // get the base property name
103  const std::string prop_name = this->getMaterialPropertyName(base);
104 
105  // get the name of the variable which derivative is respect to
106  const std::string der_var_name = this->coupledName(var_name, i);
107 
108  return this->template getMaterialPropertyByName<U>(
109  this->derivativePropertyNameFirst(prop_name, der_var_name));
110 }
const MaterialPropertyName derivativePropertyNameFirst(const MaterialPropertyName &base, const SymbolName &c1) const

◆ getMaterialPropertyDerivativeTHMPhase()

const MaterialProperty< U > & DerivativeMaterialInterfaceTHM< Kernel >::getMaterialPropertyDerivativeTHMPhase ( const std::string &  base,
bool  property_is_liquid,
const std::string &  var_name,
bool  var_is_liquid,
const unsigned int  i = 0 
)
protectedinherited

Method for retrieving derivative material properties corresponding to phase-dependent derivatives.

The intended behavior of this function is as follows. If the material property and derivative variable correspond to the same phase, then the material property is retrieved as usual. Else, a zero-valued material property is returned, as it is assumed that the material property depends only upon the variables corresponding to its phase.

Template Parameters
UThe material property type
Parameters
baseThe name of the property to take the derivative of
property_is_liquidDoes the property correspond to the liquid phase?
var_nameThe name of the coupled variable vector containing the variable to take the derivative with respect to
var_is_liquidDoes the derivative variable correspond to the liquid phase?
iThe index of the variable to take the derivative with respect to within the coupled variable vector

Definition at line 115 of file DerivativeMaterialInterfaceTHM.h.

121 {
122  if (property_is_liquid == var_is_liquid)
123  {
124  return getMaterialPropertyDerivativeTHM<U>(base, var_name, i);
125  }
126  else
127  {
128  const std::string prop_name = this->getMaterialPropertyName(base);
129  const std::string der_var_name = this->coupledName(var_name, i);
130  const std::string der_prop_name = this->derivativePropertyNameFirst(prop_name, der_var_name);
131  return this->template getZeroMaterialProperty<U>(der_prop_name);
132  }
133 }
const MaterialPropertyName derivativePropertyNameFirst(const MaterialPropertyName &base, const SymbolName &c1) const

◆ validParams()

InputParameters OneDEnergyWallHeating::validParams ( )
static

Definition at line 15 of file OneDEnergyWallHeating.C.

16 {
18  params.addClassDescription("Adds a convective heat flux term from a wall temperature");
19  params.addRequiredCoupledVar("rhoA", "");
20  params.addRequiredCoupledVar("rhouA", "");
21  params.addRequiredCoupledVar("rhoEA", "Energy equation variable");
22  params.addRequiredCoupledVar("P_hf", "heat flux perimeter");
23  params.addCoupledVar("T_wall", "Wall temperature as a field variable");
24  params.addRequiredParam<MaterialPropertyName>("Hw",
25  "Convective heat transfer coefficient, W/m^2-K");
26  params.addRequiredParam<MaterialPropertyName>("T", "Temperature material property");
27 
28  return params;
29 }
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _dT_drhoA

const MaterialProperty<Real>& OneDEnergyWallHeating::_dT_drhoA
protected

Definition at line 27 of file OneDEnergyWallHeating.h.

Referenced by computeQpOffDiagJacobian().

◆ _dT_drhoEA

const MaterialProperty<Real>& OneDEnergyWallHeating::_dT_drhoEA
protected

Definition at line 29 of file OneDEnergyWallHeating.h.

Referenced by computeQpJacobian().

◆ _dT_drhouA

const MaterialProperty<Real>& OneDEnergyWallHeating::_dT_drhouA
protected

Definition at line 28 of file OneDEnergyWallHeating.h.

Referenced by computeQpOffDiagJacobian().

◆ _Hw

const MaterialProperty<Real>& OneDEnergyWallHeating::_Hw
protected

◆ _P_hf

const VariableValue& OneDEnergyWallHeating::_P_hf
protected

◆ _rhoA_var_number

unsigned OneDEnergyWallHeating::_rhoA_var_number
protected

Definition at line 36 of file OneDEnergyWallHeating.h.

Referenced by computeQpOffDiagJacobian().

◆ _rhouA_var_number

unsigned OneDEnergyWallHeating::_rhouA_var_number
protected

Definition at line 37 of file OneDEnergyWallHeating.h.

Referenced by computeQpOffDiagJacobian().

◆ _T_wall

const VariableValue& OneDEnergyWallHeating::_T_wall
protected

Definition at line 32 of file OneDEnergyWallHeating.h.

Referenced by computeQpResidual().

◆ _temperature

const MaterialProperty<Real>& OneDEnergyWallHeating::_temperature
protected

Definition at line 26 of file OneDEnergyWallHeating.h.

Referenced by computeQpResidual().


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