xuansenpa1/skillrevise/dc-power-flow
Claude Code and agent skill by xuansenpa1/skillrevise
- community
Checking that the SKILL.md file is still in the repository.
DC power flow analysis for power systems. Use when computing power flows using DC approximation, building susceptance matrices, calculating line flows and loading percentages, or performing sensitivity analysis on transmission networks.
Install
npx vskill@latest install xuansenpa1/skillrevise/dc-power-flowSKILL.md
DC Power Flow
DC power flow is a linearized approximation of AC power flow, suitable for economic dispatch and contingency analysis.
DC Approximations
- Lossless lines - Ignore resistance (R ≈ 0)
- Flat voltage - All bus voltages = 1.0 pu
- Small angles - sin(θ) ≈ θ, cos(θ) ≈ 1
Result: Power flow depends only on bus angles (θ) and line reactances (X).
Bus Number Mapping
Power system bus numbers may not be contiguous (e.g., case300 has non-sequential bus IDs). Always create a mapping from bus numbers to 0-indexed array positions:
Susceptance Matrix (B)
Build from branch reactances using bus number mapping:
Power Balance Equation
At each bus: Pg - Pd = B[i, :] @ θ
Where:
- Pg = generation at bus (pu)
- Pd = load at bus (pu)
- θ = vector of bus angles (radians)
Slack Bus
One bus must have θ = 0 as reference. Find slack bus (type=3):
Line Flow Calculation
Flow on branch from bus f to bus t (use bus number mapping):
Line Loading Percentage
Where rating_MW = branch[5] (RATE_A column).
Branch Susceptances for Constraints
Store susceptances when building constraints:
Line Flow Limits (for OPF)
Enforce thermal limits as linear constraints:
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdata/skillsbench/tasks/energy-market-pricing/environment/skills/dc-power-flow/SKILL.md
Popularity
- Repository stars
- 56
- Repository forks
- 3
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/xuansenpa1/skillrevise/dc-power-flow)