DPsim
Loading...
Searching...
No Matches
MNATearInterface.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 {
16public:
17 // Returns a list of additional components connected to ground that
18 // need to be considered for the original systems.
22 // Initialize the internal state of the component
23 virtual void mnaTearInitialize(Real omega, Real timeStep) {}
24 // Apply the stamp to the impedance matrix of the removed network
25 virtual void mnaTearApplyMatrixStamp(SparseMatrixRow &tearMatrix) = 0;
26 // TODO: if we're consequent, these should be implemented as tasks
27 // Apply the stamp to the vector of additional voltages in the removed network
28 virtual void mnaTearApplyVoltageStamp(Matrix &currentVector) {}
29 // Update the internal state based on the solution of the complete system
30 virtual void mnaTearPostStep(Complex voltage, Complex current) {}
31 // Update the internal state based on the solution of the complete system
32 virtual void mnaTearPostStep(MatrixComp voltage, MatrixComp current) {}
33
34 void mnaTearSetIdx(UInt compIdx) { mTearIdx = compIdx; }
35
36protected:
38};
39} // namespace CPS
std::vector< Ptr > List
virtual void mnaTearInitialize(Real omega, Real timeStep)
virtual void mnaTearApplyMatrixStamp(SparseMatrixRow &tearMatrix)=0
virtual void mnaTearPostStep(MatrixComp voltage, MatrixComp current)
void mnaTearSetIdx(UInt compIdx)
virtual void mnaTearPostStep(Complex voltage, Complex current)
virtual void mnaTearApplyVoltageStamp(Matrix &currentVector)
virtual MNAInterface::List mnaTearGroundComponents()
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > Matrix
Dense matrix for real numbers.
Definition Definitions.h:81
double Real
Definition Definitions.h:62
std::complex< Real > Complex
Definition Definitions.h:63
Eigen::Matrix< Complex, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > MatrixComp
Dense matrix for complex numbers.
Definition Definitions.h:84
unsigned int UInt
Definition Definitions.h:60
Eigen::SparseMatrix< Real, Eigen::RowMajor > SparseMatrixRow
Sparse matrix for real numbers (row major).
Definition Definitions.h:74