https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
11
14registerMooseObjectRenamed("ThermalHydraulicsApp",
15 SimpleTurbinePowerAux,
16 "10/31/2024 00:00",
18
19template <typename T>
22{
23 InputParameters params = T::validParams();
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
30template <typename T>
32 : T(parameters), _on(this->template getParam<bool>("on"))
33{
34}
35
36template <typename T>
37Real
39{
40 if (_on)
41 return this->_value;
42 else
43 return 0.;
44}
45
const double T
registerMooseObject("ThermalHydraulicsApp", SimpleTurbinePowerFieldAux)
registerMooseObjectRenamed("ThermalHydraulicsApp", SimpleTurbinePowerAux, "10/31/2024 00:00", SimpleTurbinePowerScalarAux)
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Computes turbine power for 1-phase flow.
virtual Real computeValue() override
SimpleTurbinePowerAuxTempl(const InputParameters &parameters)
static InputParameters validParams()