DPsim
SP_Ph1_Shunt.h
1 /* Copyright 2017-2021 Institute for Automation of Complex Power Systems,
2  * EONERC, RWTH Aachen University
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at https://mozilla.org/MPL/2.0/.
7  *********************************************************************************/
8 
9 #pragma once
10 #include <dpsim-models/SimPowerComp.h>
11 #include <dpsim-models/Solver/PFSolverInterfaceBranch.h>
12 
13 namespace CPS {
14 
15 namespace SP {
16 namespace Ph1 {
17 
18 class Shunt : public SimPowerComp<Complex>,
19  public SharedFactory<Shunt>,
21 public:
30 
31 private:
33  Real mBaseVoltage;
34 
35 public:
37  Shunt(String uid, String name, Logger::Level logLevel = Logger::Level::off);
38 
40  Shunt(String name, Logger::Level logLevel = Logger::Level::off)
41  : Shunt(name, name, logLevel) {}
42 
43  // #### General ####
45  void setParameters(Real conductance, Real susceptance);
46 
47  // #### Powerflow section ####
49  void setBaseVoltage(Real baseVoltage);
51  void calculatePerUnitParameters(Real baseApparentPower, Real baseOmega);
53  void pfApplyAdmittanceMatrixStamp(SparseMatrixCompRow &Y);
54 };
55 } // namespace Ph1
56 } // namespace SP
57 } // namespace CPS
String uid()
Returns unique id.
Common base class of all Component templates.
const Attribute< Real >::Ptr mConductance
Conductance [S].
Definition: SP_Ph1_Shunt.h:23
const Attribute< Real >::Ptr mSusceptance
Susceptance [S].
Definition: SP_Ph1_Shunt.h:25
void setBaseVoltage(Real baseVoltage)
Set base voltage.
void pfApplyAdmittanceMatrixStamp(SparseMatrixCompRow &Y)
Stamps admittance matrix.
Shunt(String uid, String name, Logger::Level logLevel=Logger::Level::off)
Defines UID, name, component parameters and logging level.
const Attribute< Real >::Ptr mSusceptancePerUnit
Susceptance [pu].
Definition: SP_Ph1_Shunt.h:29
const Attribute< Real >::Ptr mConductancePerUnit
Conductance [pu].
Definition: SP_Ph1_Shunt.h:27
void calculatePerUnitParameters(Real baseApparentPower, Real baseOmega)
Initializes component from power flow data.
void setParameters(Real conductance, Real susceptance)
Set shunt specific parameters.
Shunt(String name, Logger::Level logLevel=Logger::Level::off)
Defines name and logging level.
Definition: SP_Ph1_Shunt.h:40
Base class for all components that are transmitting power.
Definition: SimPowerComp.h:17