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 "SimpleTurbinePowerAux.h" 11 : 12 : registerMooseObject("ThermalHydraulicsApp", SimpleTurbinePowerFieldAux); 13 : registerMooseObject("ThermalHydraulicsApp", SimpleTurbinePowerScalarAux); 14 : registerMooseObjectRenamed("ThermalHydraulicsApp", 15 : SimpleTurbinePowerAux, 16 : "10/31/2024 00:00", 17 : SimpleTurbinePowerScalarAux); 18 : 19 : template <typename T> 20 : InputParameters 21 146 : SimpleTurbinePowerAuxTempl<T>::validParams() 22 : { 23 146 : InputParameters params = T::validParams(); 24 292 : params.addRequiredParam<bool>("on", "Flag determining if turbine is operating or not"); 25 292 : params.addClassDescription("Computes turbine power for 1-phase flow for a simple on/off turbine"); 26 292 : params.declareControllable("on"); 27 146 : return params; 28 0 : } 29 : 30 : template <typename T> 31 79 : SimpleTurbinePowerAuxTempl<T>::SimpleTurbinePowerAuxTempl(const InputParameters & parameters) 32 158 : : T(parameters), _on(this->template getParam<bool>("on")) 33 : { 34 79 : } 35 : 36 : template <typename T> 37 : Real 38 1307 : SimpleTurbinePowerAuxTempl<T>::computeValue() 39 : { 40 1307 : if (_on) 41 1107 : return this->_value; 42 : else 43 : return 0.; 44 : } 45 : 46 : template class SimpleTurbinePowerAuxTempl<ConstantAux>; 47 : template class SimpleTurbinePowerAuxTempl<ConstantScalarAux>;