DPsim
Loading...
Searching...
No Matches
DP_Ph1_SynchronGeneratorIter.h
Go to the documentation of this file.
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
13
14namespace CPS {
15namespace DP {
16namespace Ph1 {
20 public MNASyncGenInterface {
21public:
22private:
23protected:
26 Logger::Level logLevel);
28
29 // #### General Functions ####
31 virtual void specificInitialization() = 0;
33 virtual void stepInPerUnit() = 0;
34 //
35 virtual void correctorStep() = 0;
37 void updateVoltage(const Matrix &leftVector);
41 Matrix parkTransform(Real theta, const Matrix &abcVector);
42
43 // ### MNA Section ###
46 void mnaCompPostStep(const Matrix &leftVector);
47 void mnaCompInitialize(Real omega, Real timeStep,
48 Attribute<Matrix>::Ptr leftVector);
49
50public:
52
54 Bool hasParameterChanged() override { return 1; };
55};
56} // namespace Ph1
57} // namespace DP
58} // namespace CPS
AttributePointer< Attribute< T > > Ptr
Definition Attribute.h:250
void updateVoltage(const Matrix &leftVector)
void mnaCompApplySystemMatrixStamp(SparseMatrixRow &systemMatrix)
Stamps system matrix.
void mnaCompApplyRightSideVectorStamp(Matrix &rightVector)
virtual void specificInitialization()=0
Function to initialize the specific variables of each SG model.
Matrix parkTransform(Real theta, const Matrix &abcVector)
SynchronGeneratorIter(const String &name, Logger::Level logLevel)
Bool hasParameterChanged() override
Mark that parameter changes so that system matrix is updated.
virtual void stepInPerUnit()=0
Model specific step.
void mnaCompPostStep(const Matrix &leftVector)
void mnaCompInitialize(Real omega, Real timeStep, Attribute< Matrix >::Ptr leftVector)
SynchronGeneratorIter(const String &uid, const String &name, Logger::Level logLevel)
Constructor.
String uid()
Returns unique id.
spdlog::level::level_enum Level
Definition Logger.h:33
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > Matrix
Dense matrix for real numbers.
Definition Definitions.h:81
std::string String
Definition Definitions.h:65
double Real
Definition Definitions.h:62
bool Bool
Definition Definitions.h:64
Eigen::SparseMatrix< Real, Eigen::RowMajor > SparseMatrixRow
Sparse matrix for real numbers (row major).
Definition Definitions.h:74