Commit b6cde857 authored by Jan Dinkelbach's avatar Jan Dinkelbach Committed by Markus Mirz
Browse files

fix init from node for emt3ph voltage source

parent f837bab4
......@@ -39,7 +39,8 @@ set(CIRCUIT_SOURCES
# EMT examples with PF initialization
Circuits/EMT_Slack_PiLine_PQLoad_with_PF_Init.cpp
Circuits/EMT_Slack_PiLine_VSI_with_PF_Init.cpp
# Static Phasor examples
# SP examples
Circuits/SP_Circuits.cpp
# EMT and DP studies
......
......@@ -44,9 +44,9 @@ void EMT::Ph3::VoltageSource::initializeFromNodesAndTerminals(Real frequency) {
// since mParametersSet remains false then
if (!mParametersSet) {
MatrixComp vInitABC = MatrixComp::Zero(3, 1);
vInitABC(0, 0) = initialSingleVoltage(0);
vInitABC(1, 0) = initialSingleVoltage(0) * SHIFT_TO_PHASE_B;
vInitABC(2, 0) = initialSingleVoltage(0) * SHIFT_TO_PHASE_C;
vInitABC(0, 0) = initialSingleVoltage(1) - initialSingleVoltage(0);
vInitABC(1, 0) = (initialSingleVoltage(1) - initialSingleVoltage(0)) * SHIFT_TO_PHASE_B;
vInitABC(2, 0) = (initialSingleVoltage(1) - initialSingleVoltage(0)) * SHIFT_TO_PHASE_C;
mVoltageRef->set(vInitABC);
mSLog->info("\nReference voltage: {:s}"
......
Markdown is supported
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