https://mooseframework.inl.gov
SimpleTurbinePowerAux.C
Go to the documentation of this file.
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",
18 
19 template <typename T>
22 {
24  params.addRequiredParam<bool>("on", "Flag determining if turbine is operating or not");
25  params.addClassDescription("Computes turbine power for 1-phase flow for a simple on/off turbine");
26  params.declareControllable("on");
27  return params;
28 }
29 
30 template <typename T>
32  : T(parameters), _on(this->template getParam<bool>("on"))
33 {
34 }
35 
36 template <typename T>
37 Real
39 {
40  if (_on)
41  return this->_value;
42  else
43  return 0.;
44 }
45 
registerMooseObject("ThermalHydraulicsApp", SimpleTurbinePowerFieldAux)
SimpleTurbinePowerAuxTempl(const InputParameters &parameters)
virtual Real computeValue() override
Computes turbine power for 1-phase flow.
void addRequiredParam(const std::string &name, const std::string &doc_string)
registerMooseObjectRenamed("ThermalHydraulicsApp", SimpleTurbinePowerAux, "10/31/2024 00:00", SimpleTurbinePowerScalarAux)
InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})