Commit 4a76ac23 authored by Markus Mirz's avatar Markus Mirz
Browse files

Merge branch 'update-vsrc' into 'development'

Update vsrc

See merge request acs/public/simulation/dpsim!78

Former-commit-id: 7a65e3bc
parents fff8e136 62990595
Subproject commit 57fa03cde512d3e53c2b43a4468295f21b76edc5
Subproject commit adac52c0b39412b0e300e3e6e9638cd35646149d
......@@ -114,8 +114,9 @@ void MnaSolver<Real>::initializeComponents() {
// This intialization according to power flow information is not MNA specific.
mSLog->info("-- Initialize components from power flow");
for (auto comp : mPowerComponents) {
auto pComp = std::dynamic_pointer_cast<PowerComponent<Real>>(comp);
if (!pComp) continue;
auto pComp = std::dynamic_pointer_cast<PowerComponent<Complex>>(comp);
if (!pComp) continue;
pComp->initialize(mSystem.mFrequencies);
pComp->initializeFromPowerflow(mSystem.mSystemFrequency);
}
......@@ -146,9 +147,9 @@ void MnaSolver<Complex>::initializeComponents() {
// Initialize power components with frequencies and from powerflow results
for (auto comp : mPowerComponents) {
comp->initialize(mSystem.mFrequencies);
auto pComp = std::dynamic_pointer_cast<PowerComponent<Complex>>(comp);
if (!pComp) continue;
pComp->initialize(mSystem.mFrequencies);
pComp->initializeFromPowerflow(mSystem.mSystemFrequency);
}
......
......@@ -61,7 +61,7 @@ static PyMethodDef dpsimModuleMethods[] = {
Component::constructorDef<CPS::DP::Ph1::SynchronGeneratorTrStab>("_dp_ph1_SynchronGeneratorTrStab"),
Component::constructorDef<CPS::DP::Ph1::Transformer>("_dp_ph1_Transformer"),
Component::constructorDef<CPS::DP::Ph1::VoltageSource>("_dp_ph1_VoltageSource"),
Component::constructorDef<CPS::DP::Ph1::VoltageSourceFreq>("_dp_ph1_VoltageSourceFreq"),
Component::constructorDef<CPS::DP::Ph1::VoltageSourceRamp>("_dp_ph1_VoltageSourceRamp"),
Component::constructorDef<CPS::DP::Ph1::VoltageSourceNorton>("_dp_ph1_VoltageSourceNorton"),
Component::constructorDef<CPS::DP::Ph3::SeriesResistor>("_dp_ph3_SeriesResistor"),
Component::constructorDef<CPS::DP::Ph3::SeriesSwitch>("_dp_ph3_SeriesSwitch"),
......@@ -76,7 +76,7 @@ static PyMethodDef dpsimModuleMethods[] = {
Component::constructorDef<CPS::EMT::Ph1::Inductor>("_emt_ph1_Inductor"),
Component::constructorDef<CPS::EMT::Ph1::Resistor>("_emt_ph1_Resistor"),
Component::constructorDef<CPS::EMT::Ph1::VoltageSource>("_emt_ph1_VoltageSource"),
Component::constructorDef<CPS::EMT::Ph1::VoltageSourceFreq>("_emt_ph1_VoltageSourceFreq"),
Component::constructorDef<CPS::EMT::Ph1::VoltageSourceRamp>("_emt_ph1_VoltageSourceRamp"),
Component::constructorDef<CPS::EMT::Ph1::VoltageSourceNorton>("_emt_ph1_VoltageSourceNorton"),
// Static Phasor (SP)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment