3 #include <dpsim-models/MNASimPowerComp.h>
7 template <
typename VarType>
12 template <
typename VarType>
17 template <
typename VarType>
22 template <
typename VarType>
26 **this->mRightVector = Matrix::Zero(leftVector->
get().rows(), 1);
29 this->mMnaTasks.push_back(
33 this->mMnaTasks.push_back(
38 this->mnaCompInitialize(omega, timeStep, leftVector);
41 template <
typename VarType>
45 this->mnaCompInitializeHarm(omega, timeStep, leftVector);
48 template <
typename VarType>
50 SparseMatrixRow &systemMatrix) {
51 this->mnaCompApplySystemMatrixStamp(systemMatrix);
52 systemMatrix.makeCompressed();
55 template <
typename VarType>
57 Matrix &rightVector) {
58 this->mnaCompApplyRightSideVectorStamp(rightVector);
61 template <
typename VarType>
63 this->mnaCompUpdateVoltage(leftVector);
66 template <
typename VarType>
68 this->mnaCompUpdateCurrent(leftVector);
71 template <
typename VarType>
73 this->mnaCompPreStep(time, timeStepCount);
76 template <
typename VarType>
79 this->mnaCompPostStep(time, timeStepCount, leftVector);
82 template <
typename VarType>
84 AttributeBase::List &prevStepDependencies,
85 AttributeBase::List &attributeDependencies,
86 AttributeBase::List &modifiedAttributes) {
87 this->mnaCompAddPreStepDependencies(
88 prevStepDependencies, attributeDependencies, modifiedAttributes);
91 template <
typename VarType>
93 AttributeBase::List &prevStepDependencies,
94 AttributeBase::List &attributeDependencies,
95 AttributeBase::List &modifiedAttributes,
97 this->mnaCompAddPostStepDependencies(prevStepDependencies,
98 attributeDependencies,
99 modifiedAttributes, leftVector);
102 template <
typename VarType>
104 SparseMatrixRow &systemMatrix, Int freqIdx) {
105 this->mnaCompApplySystemMatrixStampHarm(systemMatrix, freqIdx);
108 template <
typename VarType>
110 Matrix &sourceVector) {
111 this->mnaCompApplyRightSideVectorStampHarm(sourceVector);
114 template <
typename VarType>
116 Matrix &sourceVector, Int freqIdx) {
117 this->mnaCompApplyRightSideVectorStampHarm(sourceVector, freqIdx);
120 template <
typename VarType>
126 template <
typename VarType>
128 SparseMatrixRow &systemMatrix) {
132 template <
typename VarType>
134 Matrix &rightVector) {
138 template <
typename VarType>
143 template <
typename VarType>
148 template <
typename VarType>
153 template <
typename VarType>
159 template <
typename VarType>
161 AttributeBase::List &prevStepDependencies,
162 AttributeBase::List &attributeDependencies,
163 AttributeBase::List &modifiedAttributes) {
167 template <
typename VarType>
169 AttributeBase::List &prevStepDependencies,
170 AttributeBase::List &attributeDependencies,
171 AttributeBase::List &modifiedAttributes,
176 template <
typename VarType>
182 template <
typename VarType>
184 SparseMatrixRow &systemMatrix, Int freqIdx) {
188 template <
typename VarType>
190 Matrix &sourceVector) {
194 template <
typename VarType>
196 Matrix &sourceVector, Int freqIdx) {
Base class for all MNA components that are transmitting power.
void mnaAddPreStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes) final
Add MNA pre step dependencies.
void mnaApplyRightSideVectorStampHarm(Matrix &sourceVector) final
Stamps right side (source) vector considering the frequency index.
void mnaApplySystemMatrixStamp(SparseMatrixRow &systemMatrix) final
Stamps system matrix.
void mnaUpdateCurrent(const Matrix &leftVector) final
Update interface current from MNA system result.
void mnaUpdateVoltage(const Matrix &leftVector) final
Update interface voltage from MNA system result.
const Task::List & mnaTasks() const final
Return list of MNA tasks.
void mnaInitialize(Real omega, Real timeStep) final
Initializes variables of components.
void mnaPreStep(Real time, Int timeStepCount) final
MNA pre step operations.
void mnaApplySystemMatrixStampHarm(SparseMatrixRow &systemMatrix, Int freqIdx) final
Stamps system matrix considering the frequency index.
void mnaApplyRightSideVectorStamp(Matrix &rightVector) final
Stamps right side (source) vector.