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 "HeatRateHeatFlux.h" 11 : #include "Function.h" 12 : 13 : registerMooseObject("ThermalHydraulicsApp", HeatRateHeatFlux); 14 : 15 : InputParameters 16 99 : HeatRateHeatFlux::validParams() 17 : { 18 99 : InputParameters params = FunctionSideIntegral::validParams(); 19 : 20 198 : params.addParam<FunctionName>("scale", 1.0, "Function by which to scale the heat flux"); 21 : 22 198 : params.renameParam("function", "q", "Heat flux function"); 23 : 24 99 : params.addClassDescription("Integrates a heat flux function over a boundary"); 25 : 26 99 : return params; 27 0 : } 28 : 29 45 : HeatRateHeatFlux::HeatRateHeatFlux(const InputParameters & parameters) 30 : : FunctionSideIntegral(parameters), 31 : 32 45 : _scale_fn(getFunction("scale")) 33 : { 34 45 : } 35 : 36 : Real 37 1520 : HeatRateHeatFlux::computeQpIntegral() 38 : { 39 1520 : return _scale_fn.value(_t, _q_point[_qp]) * FunctionSideIntegral::computeQpIntegral(); 40 : }