Line data Source code
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 : 10 : #include "HeatStructure2DRadiationCouplerRZBC.h" 11 : #include "HeatConductionNames.h" 12 : 13 : registerMooseObject("ThermalHydraulicsApp", HeatStructure2DRadiationCouplerRZBC); 14 : 15 : InputParameters 16 68 : HeatStructure2DRadiationCouplerRZBC::validParams() 17 : { 18 68 : InputParameters params = HeatStructure2DCouplerBCBase::validParams(); 19 68 : params += RZSymmetry::validParams(); 20 : 21 136 : params.addRequiredParam<Real>("emissivity", "Emissivity function of this boundary"); 22 136 : params.addRequiredParam<Real>("coupled_emissivity", 23 : "Emissivity function of the coupled boundary"); 24 136 : params.addRequiredParam<Real>("view_factor", "View factor of this boundary"); 25 136 : params.addRequiredParam<Real>("area", "Area of this boundary"); 26 136 : params.addRequiredParam<Real>("coupled_area", "Area of the coupled boundary"); 27 136 : params.addParam<Real>("stefan_boltzmann_constant", 28 : HeatConduction::Constants::sigma, 29 : "Stefan Boltzmann constant [W/(m^2-K^4)]. This constant is provided as a " 30 : "parameter to allow different precisions."); 31 : 32 68 : params.addClassDescription("Applies BC for HeatStructure2DRadiationCouplerRZ"); 33 : 34 68 : return params; 35 0 : } 36 : 37 36 : HeatStructure2DRadiationCouplerRZBC::HeatStructure2DRadiationCouplerRZBC( 38 36 : const InputParameters & parameters) 39 : : HeatStructure2DCouplerBCBase(parameters), 40 : RZSymmetry(this, parameters), 41 : 42 36 : _emissivity(getParam<Real>("emissivity")), 43 72 : _coupled_emissivity(getParam<Real>("coupled_emissivity")), 44 72 : _view_factor(getParam<Real>("view_factor")), 45 72 : _area(getParam<Real>("area")), 46 72 : _coupled_area(getParam<Real>("coupled_area")), 47 72 : _sigma(getParam<Real>("stefan_boltzmann_constant")), 48 36 : _radiation_resistance((1.0 - _emissivity) / _emissivity + 1.0 / _view_factor + 49 36 : (1.0 - _coupled_emissivity) / _coupled_emissivity * _area / _coupled_area) 50 : { 51 36 : } 52 : 53 : ADReal 54 140000 : HeatStructure2DRadiationCouplerRZBC::computeQpResidual() 55 : { 56 : using std::pow; 57 140000 : const auto T_coupled = computeCoupledTemperature(); 58 140000 : const Real circumference = computeCircumference(_q_point[_qp]); 59 280000 : return _sigma * (pow(_u[_qp], 4) - pow(T_coupled, 4)) / _radiation_resistance * circumference * 60 140000 : _test[_i][_qp]; 61 : }