Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

GDM-Flow

Power Flow & Optimal Power Flow for Distribution Systems

GDM-Flow provides four complementary solvers for analyzing distribution power systems built on grid-data-models:

SolverMethodStrengths
AC OPFNonlinear least-squares on Y-busFull voltage & power accuracy including losses
AC PFFixed-point iteration (OpenDSS-style)Classical power flow with exact bus voltages
DC OPFQuadratic programming with linearized constraintsEconomic dispatch with generation cost optimization
LinDistFlowBackward/forward sweep on radial treeFast, lightweight voltage drop analysis

Key Features

Architecture

DistributionSystem (GDM JSON)
        │
        ▼
   ┌─────────┐
   │  Y-Bus  │  ← Phase-domain admittance matrix
   └────┬────┘
        │
   ┌────┴───────────────────────┐
   │            │               │
   ▼            ▼               ▼
┌───────┐  ┌────────┐  ┌─────────────┐
│AC OPF │  │DC OPF  │  │ LinDistFlow │
└───┬───┘  └───┬────┘  └──────┬──────┘
    │          │               │
    ▼          ▼               ▼
 Results    Results         Results
    │          │               │
    └──────────┴───────────────┘
               │
         ┌─────┴─────┐
         │  CLI / DB  │
         └────────────┘

Quick Example

from gdm.distribution import DistributionSystem
from gdm_flow import optimize_ac_power_flow_from_components

system = DistributionSystem.from_json("model.json")
result = optimize_ac_power_flow_from_components(system)

print(f"Success: {result.success}")
print(f"Iterations: {result.iterations}")

Use the sidebar to explore: