DPsim
Loading...
Searching...
No Matches
SteamTurbine.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Institute for Automation of Complex Power Systems, EONERC, RWTH Aachen University
2// SPDX-License-Identifier: MPL-2.0
3
4#pragma once
5
9
10namespace CPS {
11namespace Signal {
12
14 public SharedFactory<SteamTurbineParameters> {
15public:
17 Real Fhp = 0;
19 Real Fip = 0;
21 Real Flp = 0;
23 Real Tch = 0;
25 Real Trh = 0;
27 Real Tco = 0;
28};
29
35 public Base::Turbine,
36 public SharedFactory<SteamTurbine> {
37private:
38 std::shared_ptr<SteamTurbineParameters> mParameters;
39
40 // ### State variables at time k — loggable via .attr() ###
42 const Attribute<Real>::Ptr mPhp;
44 const Attribute<Real>::Ptr mPip;
46 const Attribute<Real>::Ptr mPlp;
48 const Attribute<Real>::Ptr mPm;
49
50 // ### Staging variables for next step ###
51 Real mPhp_next = 0;
52 Real mPip_next = 0;
53 Real mPlp_next = 0;
54
55public:
56 explicit SteamTurbine(const String &name)
57 : SimSignalComp(name, name), mPhp(mAttributes->create<Real>("Php")),
58 mPip(mAttributes->create<Real>("Pip")),
59 mPlp(mAttributes->create<Real>("Plp")),
60 mPm(mAttributes->create<Real>("Pm")) {}
61
63
64 void setParameters(std::shared_ptr<Base::TurbineParameters> parameters) final;
65 void initializeStates(Real Pminit) final;
66 Real step(Real Pgv, Real dt) final;
67};
68
69} // namespace Signal
70} // namespace CPS
AttributePointer< Attribute< T > > Ptr
Definition Attribute.h:250
Base model for Turbines.
AttributeList::Ptr mAttributes
Attribute List.
spdlog::level::level_enum Level
Definition Logger.h:33
void initializeStates(Real Pminit) final
Set steady-state initial values (call after setParameters, before first step)
Real step(Real Pgv, Real dt) final
Step the turbine with valve/gate opening Pgv and return mechanical power Pm.
void setParameters(std::shared_ptr< Base::TurbineParameters > parameters) final
SteamTurbine(const String &name)
Real Trh
Time constant of reheater (s)
Real Tco
Time constant of crossover piping and LP inlet volumes (s)
Real Fhp
Power fraction of the high-pressure stage.
Real Fip
Power fraction of the intermediate-pressure stage.
Real Tch
Time constant of main inlet volume and steam chest (s)
Real Flp
Power fraction of the low-pressure stage.
SimSignalComp(String uid, String name, Logger::Level logLevel=Logger::Level::off)
std::string String
Definition Definitions.h:65
double Real
Definition Definitions.h:62