Overview
The Load Flow module provides functions to run AC and DC power flow calculations on power networks. Load flow analysis computes the steady-state voltages, currents, and power flows in the network.Running Load Flow
run_ac
Run an AC load flow on a network.The network on which to run the load flow
Load flow parameters to customize the calculation
The load flow implementation provider. If empty, uses the default provider
Reporter to create an execution report
A list of component results, one for each component of the network
run_dc
Run a DC load flow on a network.run_ac. DC load flow is a simplified calculation that assumes:
- All voltages are at nominal values
- Only active power flows are calculated
- Line resistances and reactive power are ignored
run_ac_async
Run an AC load flow asynchronously.The network on which to run the load flow
The variant ID to use for the calculation
Load flow parameters
The load flow implementation provider
Reporter for execution reports
A future that will contain the list of component results
Parameters
Parameters Class
TheParameters class configures load flow calculations.
Resolution starting point:
UNIFORM_VALUES: Flat start (all voltages at 1.0 pu)DC_VALUES: Use DC load flow results as starting point
Enable transformer voltage control simulation. The initial tap position is used as the starting point
Whether to enforce reactive power limits on generators
Enable phase shifter regulation simulation
Enable voltage control of shunt compensators
Distribute active power slack across the network. When True, active power mismatch is distributed according to balance_type
How to distribute active power slack:
PROPORTIONAL_TO_LOAD: Distribute on loadsPROPORTIONAL_TO_GENERATION_P_MAX: Distribute on generators proportional to PmaxPROPORTIONAL_TO_GENERATION_P: Distribute on generators proportional to current P
Which network components to compute:
MAIN_SYNCHRONOUS: Only main synchronous componentMAIN_CONNECTED: Only main connected componentALL_CONNECTED: All connected components
In DC mode, whether to include transformer ratios in the calculation
Power factor used to convert current limits to active power limits in DC calculations
Enable AC emulation of HVDC links
Provider-specific parameters as key-value pairs
Results
ComponentResult
Represents the result of a load flow calculation for one network component.The component number
The status of the calculation:
CONVERGED: Calculation converged successfullyMAX_ITERATION_REACHED: Maximum iterations reachedFAILED: Calculation failed
Number of iterations performed
Active power mismatch at the slack bus (in MW)
ID of the slack bus
SlackBusResult
Detailed information about the slack bus.ID of the slack bus
Active power mismatch (in MW)
Validation
run_validation
Validate that network data is consistent with AC load flow equations.The network to validate
Types of data to check. If None, all types are checked:
BUSES: Bus voltage and phase validationFLOWS: Branch flow validationGENERATORS: Generator validationSVCS: Static VAR compensator validationSHUNTS: Shunt compensator validationTWTS: Two-winding transformer validationTWTS3W: Three-winding transformer validation
Parameters for the validation
Validation result containing DataFrames for each validation type
Provider Management
get_provider_names
Get the list of available load flow providers.List of available provider names
get_default_provider
Get the current default load flow provider.Name of the default provider (typically ‘OpenLoadFlow’)
set_default_provider
Set the default load flow provider.Name of the provider to set as default
get_provider_parameters
Get provider-specific parameters.Provider name. If None, uses the default provider
DataFrame with columns: category_key, description, type, default, possible_values
Enumerations
VoltageInitMode
UNIFORM_VALUES: Flat start (all voltages at 1.0 pu)DC_VALUES: Use DC load flow as starting point
BalanceType
PROPORTIONAL_TO_LOAD: Distribute slack on loadsPROPORTIONAL_TO_GENERATION_P_MAX: Distribute on generators by PmaxPROPORTIONAL_TO_GENERATION_P: Distribute on generators by current P
ComponentMode
MAIN_SYNCHRONOUS: Main synchronous component onlyMAIN_CONNECTED: Main connected component onlyALL_CONNECTED: All connected components
ComponentStatus
CONVERGED: Calculation convergedMAX_ITERATION_REACHED: Maximum iterations reachedFAILED: Calculation failed
See Also
- Network - Loading and creating networks
- Security Analysis - N-1 security analysis
