1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Changeset 3120

Show
Ignore:
Timestamp:
04/23/12 19:19:30 (2 years ago)
Author:
ftuffner
Message:

Update so nominal voltage values are not automatically populated into non-three-phase and non-split-phase nodes, regardless of if they are set or not. Trunk commit.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/powerflow/node.cpp

    r3101 r3120  
    955955                if (!has_phase(PHASE_A)) 
    956956                        voltage[0]=0.0; 
    957                 else 
     957                else if (voltage[0] == 0) 
    958958                        voltage[0].SetPolar(nominal_voltage,0); 
    959959 
    960960                if (!has_phase(PHASE_B)) 
    961961                        voltage[1]=0.0; 
    962                 else 
    963                         voltage[2].SetPolar(nominal_voltage,-2*PI/3); 
     962                else if (voltage[1] == 0) 
     963                        voltage[1].SetPolar(nominal_voltage,-2*PI/3); 
    964964 
    965965                if (!has_phase(PHASE_C)) 
    966966                        voltage[2]=0.0; 
    967                 else 
     967                else if (voltage[2] == 0) 
    968968                        voltage[2].SetPolar(nominal_voltage,2*PI/3); 
    969969        }