11#include <dpsim-models/Base/Base_Ph1_Switch.h>
12#include <dpsim-models/MNASimPowerComp.h>
13#include <dpsim-models/Solver/MNAInterface.h>
14#include <dpsim-models/Solver/MNASwitchInterface.h>
15#include <dpsim-models/Solver/MNAVariableCompInterface.h>
34 Bool mPrevState =
false;
35 Real mDeltaResClosed = 0;
36 Real mDeltaResOpen = 1.5;
44 void setInitParameters(Real timestep);
48 Logger::Level logLevel = Logger::Level::off);
50 varResSwitch(String name, Logger::Level logLevel = Logger::Level::off)
56 SimPowerComp<Complex>::Ptr
clone(String name);
65 Attribute<Matrix>::Ptr leftVector);
79 Attribute<Matrix>::Ptr &leftVector);
85 AttributeBase::List &attributeDependencies,
86 AttributeBase::List &modifiedAttributes,
87 Attribute<Matrix>::Ptr &leftVector);
94 SparseMatrixRow &systemMatrix,
Dynamic Phasor Three-Phase Switch.
SimPowerComp< Complex >::Ptr clone(String name)
Returns a modified copy of the component with the given suffix added to the name and without.
Bool hasParameterChanged()
Returns true if one of the element paramters has changed.
void mnaCompAddPostStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes, Attribute< Matrix >::Ptr &leftVector)
void initializeFromNodesAndTerminals(Real frequency)
Initializes states from power flow data.
void mnaCompApplySwitchSystemMatrixStamp(Bool closed, SparseMatrixRow &systemMatrix, Int freqIdx)
Stamps system matrix considering the defined switch position.
void mnaCompUpdateCurrent(const Matrix &leftVector)
Update interface current from MNA system results.
void mnaCompUpdateVoltage(const Matrix &leftVector)
Update interface voltage from MNA system results.
varResSwitch(String name, Logger::Level logLevel=Logger::Level::off)
Defines name and log level.
void mnaCompApplyRightSideVectorStamp(Matrix &rightVector)
Stamps right side (source) vector.
void mnaCompApplySystemMatrixStamp(SparseMatrixRow &systemMatrix)
Stamps system matrix.
varResSwitch(String uid, String name, Logger::Level logLevel=Logger::Level::off)
Defines UID, name and log level.
void mnaCompInitialize(Real omega, Real timeStep, Attribute< Matrix >::Ptr leftVector)
Initializes MNA specific variables.
Bool mnaIsClosed()
Check if switch is closed.
void mnaCompPostStep(Real time, Int timeStepCount, Attribute< Matrix >::Ptr &leftVector)
MNA pre step operations.
String uid()
Returns unique id.
MNASimPowerComp(String uid, String name, Bool hasPreStep, Bool hasPostStep, Logger::Level logLevel)
MNA interface to be used by switching devices.
MNA interface to be used by elements that require recomputing of the system matrix.