AttributePointer< Attribute< T > > Ptr
Base synchronous generator model.
CompositePowerComp(String uid, String name, Bool hasPreStep, Bool hasPostStep, Logger::Level logLevel)
void setStandardParametersPU(Real nomPower, Real nomVolt, Real nomFreq, Real Xpd, Real inertia, Real Rs=0, Real D=0)
Initializes the machine parameters.
void mnaParentAddPostStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes, Attribute< Matrix >::Ptr &leftVector) override
const Attribute< Matrix >::Ptr mStatorVoltagePrevious
Stator R-L branch Norton companion state.
void mnaParentAddPreStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes) override
void mnaParentInitialize(Real omega, Real timeStep, Attribute< Matrix >::Ptr leftVector) override
Initializes variables of component.
Real mThetaN
Nominal system angle.
void setStandardParametersSI(Real nomPower, Real nomVolt, Real nomFreq, Int polePairNumber, Real Rs, Real Lpd, Real inertiaJ, Real Kd=0)
Initializes the machine parameters.
void mnaCompUpdateCurrent(const Matrix &leftVector) override
Real mKd
Absolute damping coefficient.
SimPowerComp< Real >::Ptr clone(String name) override
Returns a modified copy of the component with the given suffix added to the name and without.
void mnaParentPostStep(Real time, Int timeStepCount, Attribute< Matrix >::Ptr &leftVector) override
Retrieves calculated voltage from simulation for next step.
Matrix mStatorConductance
SynchronGeneratorTrStab(String uid, String name, Logger::Level logLevel=Logger::Level::off)
void mnaParentApplyRightSideVectorStamp(Matrix &rightVector) override
const Attribute< Matrix >::Ptr mStatorHistoryCurrent
Matrix getParkTransformMatrixPowerInvariant(Real theta)
const Attribute< Real >::Ptr mRefDelta
const Attribute< Complex >::Ptr mEp
True after createSubComponents() runs; prevents double-construction.
void mnaCompUpdateVoltage(const Matrix &leftVector) override
Matrix parkTransformPowerInvariant(Real theta, const Matrix &fabc)
void mnaParentPreStep(Real time, Int timeStepCount) override
Complex mImpedance
Equivalent impedance for loadflow calculation.
void initializeParentFromNodesAndTerminals(Real frequency) override
void mnaParentApplySystemMatrixStamp(SparseMatrixRow &systemMatrix) override
Stamp the stator R-L Norton conductance and history current.
const Attribute< Real >::Ptr mEp_abs
const Attribute< Real >::Ptr mDelta_p
Angle by which the emf Ep is leading the terminal voltage.
void setInitialValues(Complex elecPower, Real mechPower)
void createSubComponents() override
Constructs and registers MNA subcomponents without emf value; idempotent.
void setFundamentalParametersPU(Real nomPower, Real nomVolt, Real nomFreq, Real Ll, Real Lmd, Real Llfd, Real inertia, Real D=0)
Initializes the machine parameters.
Real mLpd
Absolute d-axis transient inductance.
SynchronGeneratorTrStab(String name, Logger::Level logLevel=Logger::Level::off)
const Attribute< Matrix >::Ptr mStatorSourceVoltage
const Attribute< Real >::Ptr mRefOmega
const Attribute< Real >::Ptr mEp_phase
Real mXpd
Absolute d-axis transient reactance X'd.
String uid()
Returns unique id.
spdlog::level::level_enum Level
std::shared_ptr< SimPowerComp< VarType > > Ptr
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > Matrix
Dense matrix for real numbers.
std::complex< Real > Complex
Eigen::SparseMatrix< Real, Eigen::RowMajor > SparseMatrixRow
Sparse matrix for real numbers (row major).