10#include <Eigen/src/Core/Array.h>
42 mDelay = (inductance.array() * capacitance.array()).sqrt().maxCoeff();
54 mSrc1->setParameters(Matrix::Zero(3, 1));
56 mSrc2->setParameters(Matrix::Zero(3, 1));
65 throw SystemError(
"Timestep too large for decoupling");
79 initAdmittance * volt1 -
82 initAdmittance * volt2 -
85 SPDLOG_LOGGER_INFO(
mSLog,
"initial voltages: v_k {} v_m {}", volt1, volt2);
86 SPDLOG_LOGGER_INFO(
mSLog,
"initial currents: i_km {} i_mk {}", cur1, cur2);
110 if (timeStepCount == 0) {
132 mLine.step(time, timeStepCount);
140 -
mRes1->intfCurrent().transpose() +
mSrcCur1->get().real().transpose();
142 -
mRes2->intfCurrent().transpose() +
mSrcCur2->get().real().transpose();
155 {std::make_shared<PreStep>(*
this), std::make_shared<PostStep>(*
this)});
AttributeList::Ptr mAttributes
Attribute List.
spdlog::level::level_enum Level
static Matrix singlePhaseParameterToThreePhase(Real parameter)
To convert single phase parameters to symmetrical three phase ones.
void execute(Real time, Int timeStepCount)
void execute(Real time, Int timeStepCount)
std::shared_ptr< EMT::Ph3::ControlledCurrentSource > mSrc2
Attribute< Matrix >::Ptr mSrcCur2
void setParameters(SimNode< Real >::Ptr node1, SimNode< Real >::Ptr node2, Matrix resistance, Matrix inductance, Matrix capacitance)
Attribute< Matrix >::Ptr mSrcCur1
IdentifiedObject::List getLineComponents()
void initialize(Real omega, Real timeStep)
void step(Real time, Int timeStepCount)
std::shared_ptr< EMT::Ph3::Resistor > mRes1
std::shared_ptr< EMT::Ph3::ControlledCurrentSource > mSrc1
const Attribute< Matrix >::Ptr mSrcCur2Ref
std::shared_ptr< EMT::SimNode > mNode2
std::shared_ptr< EMT::SimNode > mNode1
Matrix interpolate(Matrix &data)
std::shared_ptr< EMT::Ph3::Resistor > mRes2
DecouplingLineEMT_Ph3(String name, Logger::Level logLevel=Logger::Level::info)
const Attribute< Matrix >::Ptr mSrcCur1Ref
const Attribute< Matrix >::Ptr mStates
FIXME: workaround for dependency analysis as long as the states aren't attributes.
std::shared_ptr< SimNode< VarType > > Ptr
SimSignalComp(String uid, String name, Logger::Level logLevel=Logger::Level::off)
Logger::Log mSLog
Component logger.
static std::shared_ptr< Resistor > make(Args &&...args)
struct dps_magma_data data
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > Matrix
Dense matrix for real numbers.
std::complex< Real > Complex
Eigen::Matrix< Complex, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > MatrixComp
Dense matrix for complex numbers.