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 "ADHeatFluxBaseBC.h" 11 : #include "ADHeatFluxFromHeatStructureBaseUserObject.h" 12 : #include "THMIndicesVACE.h" 13 : #include "Assembly.h" 14 : #include "NonlinearSystemBase.h" 15 : 16 : InputParameters 17 320 : ADHeatFluxBaseBC::validParams() 18 : { 19 320 : InputParameters params = ADIntegratedBC::validParams(); 20 640 : params.addRequiredParam<UserObjectName>( 21 : "q_uo", "The name of the user object that computes the heat flux"); 22 640 : params.addRequiredParam<Real>("P_hs_unit", "Perimeter of a single unit of heat structure"); 23 640 : params.addRequiredParam<unsigned int>("n_unit", "Number of units of heat structure"); 24 640 : params.addRequiredParam<bool>("hs_coord_system_is_cylindrical", 25 : "Is the heat structure coordinate system cylindrical?"); 26 320 : params.addClassDescription("Base class for heat flux boundary conditions"); 27 320 : return params; 28 0 : } 29 : 30 173 : ADHeatFluxBaseBC::ADHeatFluxBaseBC(const InputParameters & parameters) 31 : : ADIntegratedBC(parameters), 32 173 : _q_uo(getUserObject<ADHeatFluxFromHeatStructureBaseUserObject>("q_uo")), 33 346 : _P_hs_unit(getParam<Real>("P_hs_unit")), 34 346 : _n_unit(getParam<unsigned int>("n_unit")), 35 346 : _hs_coord_system_is_cylindrical(getParam<bool>("hs_coord_system_is_cylindrical")), 36 173 : _hs_coord(_hs_coord_system_is_cylindrical ? _P_hs_unit : 1.0), 37 173 : _hs_scale(-_hs_coord / (_n_unit * _P_hs_unit)) 38 : { 39 173 : }