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

fix dp1ph voltage source for compatibility with python api

parent c1cc2a10
......@@ -37,7 +37,9 @@ void DP::Ph1::VoltageSource::setParameters(Complex voltageRef, Real srcFreq) {
void DP::Ph1::VoltageSource::initializeFromNodesAndTerminals(Real frequency) {
mVoltageRef = attribute<Complex>("V_ref");
mSrcFreq = attribute<Real>("f_src");
if (!mParametersSet)
// TODO: find more explicit way, e.g. make dependend on mParametersSet or other flag
if (mVoltageRef->get() == Complex(0, 0))
mVoltageRef->set(initialSingleVoltage(1) - initialSingleVoltage(0));
mSLog->info(
......
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