11 #include <dpsim-models/CompositePowerComp.h>
12 #include <dpsim-models/SP/SP_Ph1_VoltageSource.h>
13 #include <dpsim-models/Solver/DAEInterface.h>
14 #include <dpsim-models/Solver/PFSolverInterfaceBus.h>
34 std::shared_ptr<SP::Ph1::VoltageSource> mSubVoltageSource;
38 std::vector<const Matrix *> mRightVectorStamps;
60 Logger::Level logLevel = Logger::Level::off);
90 void setParameters(Complex initialPhasor, Real freqStart, Real rocof,
91 Real timeStart, Real duration,
bool smoothRamp =
true);
94 void setParameters(Complex initialPhasor, Real modulationFrequency,
95 Real modulationAmplitude, Real baseFrequency = 0.0,
111 AttributeBase::List &prevStepDependencies,
112 AttributeBase::List &attributeDependencies,
113 AttributeBase::List &modifiedAttributes)
override;
117 AttributeBase::List &attributeDependencies,
118 AttributeBase::List &modifiedAttributes,
123 void daeResidual(
double ttime,
const double state[],
const double dstate_dt[],
124 double resid[], std::vector<int> &off)
override;
Base class for composite power components.
String uid()
Returns unique id.
Common base class of all Component templates.
const Attribute< Real >::Ptr mActivePowerInjection
Active Power Injection [W].
void setParameters(Real vSetPointPerUnit)
Set parameters relevant for PF solver.
Complex daeInitialize() override
Voltage Getter.
void daeResidual(double ttime, const double state[], const double dstate_dt[], double resid[], std::vector< int > &off) override
Residual function for DAE Solver.
void mnaParentApplyRightSideVectorStamp(Matrix &rightVector) override
Stamps right side (source) vector.
void initializeFromNodesAndTerminals(Real frequency) override
Initializes component from power flow data.
void mnaParentAddPreStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes) override
Add MNA pre step dependencies.
void calculatePerUnitParameters(Real baseApparentPower, Real baseOmega)
Calculates component's parameters in specified per-unit system.
void mnaParentAddPostStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes, Attribute< Matrix >::Ptr &leftVector) override
Add MNA post step dependencies.
const Attribute< Real >::Ptr mVoltageSetPoint
Voltage set point [V].
NetworkInjection(String uid, String name, Logger::Level logLevel=Logger::Level::off)
Defines UID, name and logging level.
void mnaCompUpdateVoltage(const Matrix &leftVector) override
Updates voltage across component.
NetworkInjection(String name, Logger::Level logLevel=Logger::Level::off)
Defines name and logging level.
void mnaParentPostStep(Real time, Int timeStepCount, Attribute< Matrix >::Ptr &leftVector) override
MNA post step operations.
void mnaParentPreStep(Real time, Int timeStepCount) override
MNA pre step operations.
void setBaseVoltage(Real baseVoltage)
Set base voltage.
const Attribute< Real >::Ptr mVoltageSetPointPerUnit
Voltage set point [pu].
void modifyPowerFlowBusType(PowerflowBusType powerflowBusType) override
Modify powerflow bus type.
void mnaCompUpdateCurrent(const Matrix &leftVector) override
Returns current through the component.
void updatePowerInjection(Complex powerInj)
Update power injection.
SimPowerComp< Complex >::Ptr clone(String name) override
Returns a modified copy of the component with the given suffix added to the name and without.
const Attribute< Real >::Ptr mReactivePowerInjection
Reactive Power Injection [Var].
Base class for all components that are transmitting power.