21 inductance <= std::numeric_limits<Real>::epsilon())
22 throw std::invalid_argument(
23 "DC inductance must be finite and safely greater than zero.");
25 throw std::invalid_argument(
"Initial inductor current must be finite.");
32 Matrix::Constant(1, 1, 1.0 / inductance),
33 Matrix::Identity(1, 1), Matrix::Zero(1, 1));
38 throw std::logic_error(
39 "setParameters() must be called before inductor initialization.");
44 std::abs(voltage.imag()) > std::numeric_limits<Real>::epsilon())
45 throw std::invalid_argument(
46 "DC initial inductor voltage must be a finite real scalar value.");
49 (**mIntfVoltage)(0, 0) = voltage.real();
void initializeFromNodesAndTerminals(Real frequency) override final
Initializes Component variables according to power flow data stored in Nodes.
const Attribute< Real >::Ptr mInitialCurrent
Initial current from terminal 1 to terminal 0 [A].
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.
Inductor(String uid, String name, Logger::Level logLevel=Logger::Level::off)
void setParameters(Real inductance, Real initialCurrent=0.0)
const Attribute< Real >::Ptr mInductance
Inductance [H].
void validateDCTerminals() const
TwoTerminalVTypeSSNComp(String uid, String name, Logger::Level logLevel=Logger::Level::off)
void setParameters(const Matrix &A, const Matrix &B, const Matrix &C, const Matrix &D)
String uid()
Returns unique id.
AttributeList::Ptr mAttributes
Attribute List.
spdlog::level::level_enum Level
static bool isFinite(Real value)
std::shared_ptr< SimPowerComp< VarType > > Ptr
Complex initialSingleVoltage(UInt index)
Logger::Level mLogLevel
Component logger control for internal variables.
bool mParametersSet
Flag indicating that parameters are set via setParameters() function.
static std::shared_ptr< Inductor > make(Args &&...args)
std::complex< Real > Complex