50 Real parallelCapacitance = 0.0,
51 Real parallelConductance = 0.0,
Real initialCurrent = 0.0);
79 Bool mUseSubcomponents = true;
81 Real mDirectInductorAdmittance = 0.;
82 Real mDirectSeriesAdmittance = 0.;
83 Real mDirectCapAdmittance = 0.;
84 Real mDirectSeriesHistory = 0.;
85 Real mDirectCapHistory0 = 0.;
86 Real mDirectCapHistory1 = 0.;
87 std::array<
UInt, 2> mDirectTerminalRows{};
88 std::array<Bool, 2> mDirectTerminalNotGrounded{};
89 std::shared_ptr<Resistor> mSeriesResistor;
90 std::shared_ptr<Inductor> mSeriesInductor;
91 std::shared_ptr<Resistor> mShuntResistor0;
92 std::shared_ptr<Resistor> mShuntResistor1;
93 std::shared_ptr<Capacitor> mShuntCapacitor0;
94 std::shared_ptr<Capacitor> mShuntCapacitor1;
96 void validateDCTerminals()
const;
AttributePointer< Attribute< T > > Ptr
std::shared_ptr< CompositePowerComp< Real > > Ptr
CompositePowerComp(String uid, String name, Bool hasPreStep, Bool hasPostStep, Logger::Level logLevel)
const Attribute< Real >::Ptr mSeriesResistance
Series resistance [ohm].
Bool mnaHasCompactRightSideVectorStamp() const override final
Composite stamps touch only their cached terminal and virtual-node rows.
void initializeParentFromNodesAndTerminals(Real frequency) override final
void mnaParentAddPreStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes) override final
const Attribute< Real >::Ptr mInitialCurrent
Initial series current from terminal 1 to terminal 0 [A].
void mnaCompUpdateVoltage(const Matrix &leftVector) override final
void mnaParentPostStep(Real time, Int timeStepCount, Attribute< Matrix >::Ptr &leftVector) override final
void mnaParentInitialize(Real omega, Real timeStep, Attribute< Matrix >::Ptr leftVector) override final
void mnaParentApplySystemMatrixStamp(SparseMatrixRow &systemMatrix) override final
const Attribute< Real >::Ptr mParallelCapacitance
Total terminal-to-ground shunt capacitance [F].
const Attribute< Real >::Ptr mSeriesInductance
Series inductance [H].
void mnaAddCompactRightSideVectorStamp(Matrix &rightVector) override final
void createSubComponents() override final
Constructs and registers MNA subcomponents; called before collectVirtualNodes so virtual nodes exist ...
void mnaParentPreStep(Real time, Int timeStepCount) override final
void setParameters(Real seriesResistance, Real seriesInductance, Real parallelCapacitance=0.0, Real parallelConductance=0.0, Real initialCurrent=0.0)
void mnaCompUpdateCurrent(const Matrix &leftVector) override final
const Attribute< Real >::Ptr mParallelConductance
Total terminal-to-ground shunt conductance [S].
SimPowerComp< Real >::Ptr clone(String name) override final
Returns a modified copy of the component with the given suffix added to the name and without.
void mnaParentAddPostStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes, Attribute< Matrix >::Ptr &leftVector) override final
PiLine(String name, Logger::Level logLevel=Logger::Level::off)
void mnaParentApplyRightSideVectorStamp(Matrix &rightVector) override final
PiLine(String uid, String name, Logger::Level logLevel=Logger::Level::off)
PiLine(String name, Bool useSubcomponents, Logger::Level logLevel=Logger::Level::off)
String uid()
Returns unique id.
spdlog::level::level_enum Level
std::shared_ptr< SimPowerComp< VarType > > Ptr
static std::shared_ptr< PiLine > make(Args &&...args)
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > Matrix
Dense matrix for real numbers.
Eigen::SparseMatrix< Real, Eigen::RowMajor > SparseMatrixRow
Sparse matrix for real numbers (row major).