DPsim
Loading...
Searching...
No Matches
EMT_Ph3_SynchronGeneratorDQTrapez.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 EMT {
16namespace Ph3 {
18 : public SynchronGeneratorDQ,
20 public SharedFactory<SynchronGeneratorDQTrapez> {
21public:
23 Logger::Level loglevel = Logger::Level::off);
25 Logger::Level loglevel = Logger::Level::off);
26
27 // #### MNA Section ####
28 void mnaCompInitialize(Real omega, Real timeStep,
29 Attribute<Matrix>::Ptr leftVector) override;
30 void mnaCompPreStep(Real time, Int timeStepCount) override;
31 void mnaCompApplySystemMatrixStamp(SparseMatrixRow &systemMatrix) override;
32 void mnaCompApplyRightSideVectorStamp(Matrix &rightVector) override;
33 void mnaCompPostStep(Real time, Int timeStepCount,
34 Attribute<Matrix>::Ptr &leftVector) override;
35 Bool hasParameterChanged() override { return true; }
36
39 AttributeBase::List &prevStepDependencies,
40 AttributeBase::List &attributeDependencies,
41 AttributeBase::List &modifiedAttributes) override;
42
43protected:
48 Matrix mNortonConductance = Matrix::Zero(3, 3);
49
50 // #### Trapezoidal Section ####
51
54 void stepInPerUnit(Real time);
55};
56} // namespace Ph3
57} // namespace EMT
58} // namespace CPS
std::vector< Ptr > List
Definition Attribute.h:123
AttributePointer< Attribute< T > > Ptr
Definition Attribute.h:249
SynchronGeneratorDQ(String name, String uid, Logger::Level logLevel=Logger::Level::off)
Defines UID, name and logging level.
void mnaCompPreStep(Real time, Int timeStepCount) override
void mnaCompAddPreStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes) override
Add MNA pre step dependencies.
void mnaCompPostStep(Real time, Int timeStepCount, Attribute< Matrix >::Ptr &leftVector) override
void mnaCompApplySystemMatrixStamp(SparseMatrixRow &systemMatrix) override
void mnaCompApplyRightSideVectorStamp(Matrix &rightVector) override
SynchronGeneratorDQTrapez(String uid, String name, Logger::Level loglevel=Logger::Level::off)
Bool hasParameterChanged() override
Returns true if one of the element paramters has changed.
void mnaCompInitialize(Real omega, Real timeStep, Attribute< Matrix >::Ptr leftVector) override
String uid()
Returns unique id.
spdlog::level::level_enum Level
Definition Logger.h:33
MNA interface to be used by elements that require recomputing of the system matrix.
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > Matrix
Dense matrix for real numbers.
Definition Definitions.h:79
std::string String
Definition Definitions.h:63
double Real
Definition Definitions.h:60
int Int
Definition Definitions.h:59
bool Bool
Definition Definitions.h:62
Eigen::SparseMatrix< Real, Eigen::RowMajor > SparseMatrixRow
Sparse matrix for real numbers (row major).
Definition Definitions.h:72