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 156 : HeatStructure2DRadiationCouplerRZBC::validParams() 17 : { 18 156 : InputParameters params = HeatStructure2DCouplerBCBase::validParams(); 19 156 : params += RZSymmetry::validParams(); 20 : 21 312 : params.addRequiredParam<Real>("emissivity", "Emissivity function of this boundary"); 22 312 : params.addRequiredParam<Real>("coupled_emissivity", 23 : "Emissivity function of the coupled boundary"); 24 312 : params.addRequiredParam<Real>("view_factor", "View factor of this boundary"); 25 312 : params.addRequiredParam<Real>("area", "Area of this boundary"); 26 312 : params.addRequiredParam<Real>("coupled_area", "Area of the coupled boundary"); 27 312 : 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 156 : params.addClassDescription("Applies BC for HeatStructure2DRadiationCouplerRZ"); 33 : 34 156 : return params; 35 0 : } 36 : 37 84 : HeatStructure2DRadiationCouplerRZBC::HeatStructure2DRadiationCouplerRZBC( 38 84 : const InputParameters & parameters) 39 : : HeatStructure2DCouplerBCBase(parameters), 40 : RZSymmetry(this, parameters), 41 : 42 84 : _emissivity(getParam<Real>("emissivity")), 43 168 : _coupled_emissivity(getParam<Real>("coupled_emissivity")), 44 168 : _view_factor(getParam<Real>("view_factor")), 45 168 : _area(getParam<Real>("area")), 46 168 : _coupled_area(getParam<Real>("coupled_area")), 47 168 : _sigma(getParam<Real>("stefan_boltzmann_constant")), 48 84 : _radiation_resistance((1.0 - _emissivity) / _emissivity + 1.0 / _view_factor + 49 84 : (1.0 - _coupled_emissivity) / _coupled_emissivity * _area / _coupled_area) 50 : { 51 84 : } 52 : 53 : ADReal 54 224000 : HeatStructure2DRadiationCouplerRZBC::computeQpResidual() 55 : { 56 224000 : const auto T_coupled = computeCoupledTemperature(); 57 224000 : const Real circumference = computeCircumference(_q_point[_qp]); 58 448000 : return _sigma * (std::pow(_u[_qp], 4) - std::pow(T_coupled, 4)) / _radiation_resistance * 59 224000 : circumference * _test[_i][_qp]; 60 : }