-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Everything here runs on a bare machine: .NET 10 SDK is the only prerequisite. No grid data, no GPU, no network access.
git clone git@github.com:MarkS0485/GridSim.git
cd GridSim
dotnet build GridSim.slnx
dotnet test GridSim.slnx # 81 tests, ~3 s — all headlessThe classic WSCC 9-bus case is built in (IeeeCases.Case9()) and is the canonical "is the solver right?" check:
dotnet run --project src/GridSim.Cli case9GridSim — IEEE 9-bus (WSCC) (9 buses, 9 branches, base 100 MVA)
================================================================
Converged in 4 iterations (max mismatch 1.84E-014 p.u.)
Bus Vm(pu) Va(deg) P(MW) Q(MVAr)
1 1.0400 0.000 71.64 27.05
...
Total losses: 4.641 MW, -92.160 MVAr
Slack generation ≈ 71.64 MW and total losses ≈ 4.64 MW match the published MATPOWER solution. If you change solver internals and this still prints, you probably didn't break the physics.
With no arguments the CLI loads the reduced 10-zone GB model from data/uk/ and runs it continuously: demand follows a day/night curve, generation re-dispatches, and the network re-solves each tick (any key stops it):
dotnet run --project src/GridSim.Cli # live, starts at 08:00
dotnet run --project src/GridSim.Cli -- --once # solve once and print
dotnet run --project src/GridSim.Cli -- --ticks 50 # headless: N ticks then exitGridSim — GB reduced (10-zone)
20 buses · 24 branches · 22 generators · base 10000 MVA · 50 Hz
========================================================================
Converged (3 NR iters, 3 OLTC passes, max mismatch 1.29E-011 p.u.)
Generation 39.56 GW · Demand 39.50 GW · Losses 56.3 MW · System inertia 171.7 GVA·s
Voltage range: 0.998 – 1.040 p.u. (within 0.94–1.06 band)
The headline demo — lose a unit and watch frequency physics respond:
dotnet run --project src/GridSim.Cli trip "Sizewell"
dotnet run --project src/GridSim.Cli trip Hinkley --export trip.csv
dotnet run --project src/GridSim.Cli replay trip.csv # watch the dip at 20 msSee Frequency Dynamics for what the numbers mean.
The whole grid is just data — point the CLI at any folder with the same JSON layout as data/uk/:
dotnet run --project src/GridSim.Cli -- --dir path/to/caseSee The UK Model for the file format.
- Architecture — how the pieces fit
- The CLI — every command and flag
- The GDA Replica — building the real grid (requires access to the GDA archive)
⚡ GridSim Wiki · Repository · GPL-3.0-or-later · validated against published reference cases