11#include <dpsim-models/Base/Base_Ph1_SVC.h>
12#include <dpsim-models/DP/DP_Ph1_Capacitor.h>
13#include <dpsim-models/DP/DP_Ph1_Inductor.h>
14#include <dpsim-models/DP/DP_Ph1_Switch.h>
15#include <dpsim-models/Solver/MNAInterface.h>
16#include <dpsim-models/Solver/MNAVariableCompInterface.h>
38 std::shared_ptr<DP::Ph1::Switch> mSubInductorProtectionSwitch;
41 std::shared_ptr<DP::Ph1::Switch> mSubCapacitorProtectionSwitch;
43 Bool mValueChange =
false;
44 Bool mInductiveMode =
false;
48 Real mSwitchStateChange =
false;
49 Real mSwitchROpen = 1e9;
50 Real mSwitchRClosed = 1e-9;
53 Real mBSetCounter = 0;
65 Bool mDisconnect =
false;
68 const Attribute<Real>::Ptr mVpcc;
69 const Attribute<Real>::Ptr mVmeasPrev;
72 SVC(String
uid, String name, Logger::Level logLevel = Logger::Level::off);
74 SVC(String name, Logger::Level logLevel = Logger::Level::off)
75 :
SVC(name, name, logLevel) {}
86 Attribute<Matrix>::Ptr leftVector)
override;
100 Attribute<Matrix>::Ptr &leftVector)
override;
103 AttributeBase::List &prevStepDependencies,
104 AttributeBase::List &attributeDependencies,
105 AttributeBase::List &modifiedAttributes)
override;
109 AttributeBase::List &attributeDependencies,
110 AttributeBase::List &modifiedAttributes,
111 Attribute<Matrix>::Ptr &leftVector)
override;
115 void setSwitchState();
117 void updateSusceptance();
118 void mechanicalModelUpdateSusceptance(Real time);
120 void checkProtection(Real time);
Static VAR compensator (SVC)
void mnaCompApplySystemMatrixStamp(SparseMatrixRow &systemMatrix) override
Stamps system matrix.
void mnaCompPostStep(Real time, Int timeStepCount, Attribute< Matrix >::Ptr &leftVector) override
MNA post step operations.
void mnaCompUpdateCurrent(const Matrix &leftVector) override
Update interface current from MNA system results.
void createSubComponents() override
Constructs subcomponents; idempotent.
std::shared_ptr< DP::Ph1::Capacitor > mSubCapacitor
Internal capacitor.
void mnaCompUpdateVoltage(const Matrix &leftVector) override
Update interface voltage from MNA system results.
void mnaCompInitialize(Real omega, Real timeStep, Attribute< Matrix >::Ptr leftVector) override
Initializes MNA specific variables.
void mnaCompAddPostStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes, Attribute< Matrix >::Ptr &leftVector) override
add MNA post step dependencies
std::shared_ptr< DP::Ph1::Inductor > mSubInductor
void mnaCompApplyRightSideVectorStamp(Matrix &rightVector) override
Stamps right side (source) vector.
void initializeFromNodesAndTerminals(Real frequency) override
Initializes states from power flow data.
void mnaCompPreStep(Real time, Int timeStepCount) override
MNA pre step operations.
SVC(String name, Logger::Level logLevel=Logger::Level::off)
Defines name and log level.
void mnaCompAddPreStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes) override
add MNA pre step dependencies
SVC(String uid, String name, Logger::Level logLevel=Logger::Level::off)
Defines UID, name and log level.
String uid()
Returns unique id.
MNASimPowerComp(String uid, String name, Bool hasPreStep, Bool hasPostStep, Logger::Level logLevel)
MNA interface to be used by elements that require recomputing of the system matrix.