loadflow module allows you to run power flow calculations on networks to determine voltage magnitudes, phase angles, and power flows.
Getting Started
Import the necessary modules:Providers
PyPowSyBl supports multiple load flow implementations:Available Providers
OpenLoadFlow (Default)
OpenLoadFlow (Default)
Fully open-source load flow implementation supporting:
- AC Newton-Raphson method
- Linear DC calculation
- Advanced features like distributed slack, voltage control
DynaFlow
DynaFlow
Steady-state simulation using simplified time-domain simulation from the Dynawo project.Configuration Guide
Parameters
Configure load flow behavior with parameters:Key Parameters
| Parameter | Default | Description |
|---|---|---|
voltage_init_mode | UNIFORM_VALUES | How voltages are initialized |
transformer_voltage_control_on | False | Enable transformer voltage control |
use_reactive_limits | True | Respect generator reactive limits |
phase_shifter_regulation_on | False | Enable phase shifter regulation |
distributed_slack | True | Distribute slack across generators |
balance_type | PROPORTIONAL_TO_GENERATION_P_MAX | How to balance power |
dc_use_transformer_ratio | True | Include transformer ratios in DC |
Example Configuration
Provider-Specific Parameters
Providers may support additional parameters:AC Load Flow
Run an AC load flow using the Newton-Raphson method:Component Results
The result contains information for each connected component:Network State After Load Flow
The main output is updated network data:DC Load Flow
Run a linearized DC load flow (faster, less accurate):DC load flow:
- Only calculates active power flows
- Assumes all voltages at 1.0 pu
- Ignores reactive power and losses
- Much faster than AC for large networks
Balance Types
Control how power imbalances are distributed:Reports
Get detailed computation information:Asynchronous API
Run multiple load flows concurrently:Troubleshooting
Load flow did not converge
Load flow did not converge
Common causes:
- Network islands (disconnected components)
- Voltage collapse
- Infeasible reactive power limits
- Bad initial conditions
- Check network connectivity
- Relax reactive limits:
use_reactive_limits=False - Adjust voltage initialization
- Enable distributed slack
Results show NaN values
Results show NaN values
NaN values indicate:
- Elements in disconnected components
- Convergence issues
Next Steps
Security Analysis
Analyze N-1 contingencies
Sensitivity Analysis
Calculate power transfer factors
