https://mooseframework.inl.gov
Loading...
Searching...
No Matches
OneDEnergyWallHeating.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
11
13
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}
30
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}
44
45Real
47{
48 return _Hw[_qp] * _P_hf[_qp] * (_temperature[_qp] - _T_wall[_qp]) * _test[_i][_qp];
49}
50
51Real
53{
54 return _Hw[_qp] * _P_hf[_qp] * _dT_drhoEA[_qp] * _phi[_j][_qp] * _test[_i][_qp];
55}
56
57Real
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}
registerMooseObject("ThermalHydraulicsApp", OneDEnergyWallHeating)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
OneDEnergyWallHeating(const InputParameters &parameters)
static InputParameters validParams()
const MaterialProperty< Real > & _dT_drhoEA
const VariableValue & _T_wall
const MaterialProperty< Real > & _dT_drhouA
const VariableValue & _P_hf
const MaterialProperty< Real > & _temperature
const MaterialProperty< Real > & _dT_drhoA
const MaterialProperty< Real > & _Hw
virtual Real computeQpOffDiagJacobian(unsigned int jvar)