The platform

One engine for the whole study.

Power flow, optimisation, short circuit, dynamics and protection in one C#/.NET core. One network model, one set of numerics, and results that repeat to the bit.

01 / Power flow

Sparse or dense, the same answer to the last bit.

AC power flow by Newton-Raphson in polar form. The sparse engine, Gilbert-Peierls LU over an exact minimum-degree ordering, runs every meshed network by default. The dense engine is selectable and agrees with it bit for bit: every value, iteration count and status.

Radial feeders use the backward/forward sweep. Every solve can be exported with its full trace, from the Y-bus to every iteration and Jacobian, so anyone can check it independently.

Commands: pf, batchsolve, dcpf, ptdf, lodf, dist3ph-mesh, estimate

Power flow, technical chapter
  • Reactive limits with PV-to-PQ switching, and on-load tap changers regulating in an outer loop
  • Distributed slack and switched shunts
  • DC power flow and the PTDF and LODF distribution factors
  • Three-phase unbalanced feeders: a radial sweep and a meshed Newton solver with neutral, earthing, split-phase and SWER
  • State estimation alongside: WLS, Huber, exact LAV, Schweppe-GM, constrained and physically feasible forms, with bad-data identification and observability
Single-line diagram of the North England A 400 kV substation in the GridSim desktop app: the Heysham nuclear unit at 2,033 MW, seven connections with their flows and loading, and the bus at 1.040 pu.
One substation of the solved GB example model in the GridSim desktop app: every connection with its flow and loading.

02 / OPF and SCOPF

From the cheapest dispatch to a secure one.

DC and AC optimal power flow share the case, the limits and the results format. The full AC-OPF is an interior point method with voltage, reactive and branch MVA limits. Security-constrained dispatch holds every secured outage inside its limits.

Around the optimiser sit unit commitment, loadability and contingency screening, so a dispatch can be found, stressed and screened in one tool.

Commands: dcopf, acopf, acopf-full, scopf, scuc, cpf, nminus1, nminus2, n-1-1

OPF technical chapterContingency analysis
  • DC-OPF by bounded simplex: security-constrained, quadratic and costed forms, with nodal prices
  • Full AC-OPF (acopf-full) and a DC-OPF dispatch with an AC loss loop (acopf)
  • Preventive security-constrained DC-OPF over single-branch outages (scopf)
  • Security-constrained unit commitment on GridSim's own branch-and-bound; continuation power flow to maximum loadability
  • N-1, N-2 and N-1-1 screening, a parallel N-1 sweep, infeed-loss screening against GB limits and generator trips with RoCoF and nadir

03 / Short circuit

Fault duty to the standard, number by number.

The IEC 60909-0 duty study gives Ik'', the peak ip by methods B and C, the breaking current Ib with the near-generator factor, the thermal Ith and the decaying DC component, with the impedance correction factors on request.

Sequence-network fault studies cover three-phase, line-to-ground, line-to-line and double line-to-ground faults, at a bus or part-way along a line.

Commands: fault, iec60909, fault-series, fault-simultaneous, fault-line, g74, ansi-sc, sc-61363, sc-dc, arc-flash

IEC 60909 technical chapterUser manual, faults
  • IEC 60909-0 short-circuit duty, methods B and C
  • Series and simultaneous faults
  • ENA Engineering Recommendation G74
  • ANSI short-circuit duty
  • IEC 61363 and IEC 61660 duty studies
  • IEEE 1584 arc flash

04 / Dynamics, RMS and EMT

From the first cycle to the inter-area mode.

A multi-machine RMS transient-stability engine with critical clearing time search, small-signal modal analysis, impedance-based stability and a Dommel-method EMT solver in one and three phases. Every model starts at rest on its solved power-flow point.

Inertia is modelled per machine, not as one scalar: a lumped centre-of-inertia model or a distributed multi-domain model that collapses exactly to the lumped one.

Commands: stability, modal, modal-full, dynamics-study, impedance-stability, emt, emt3, freq

Dynamic-model librarySmall-signal and impedanceEMT
  • Machines: the classical model and the GENROU and GENSAL subtransient models
  • Exciters SEXS, IEEET1, EXAC1 and ESST4B, the PSS1A stabiliser, and the TGOV1, IEEEG1, HYGOV and GAST governors
  • WECC renewable models: REGC_A and B, REEC_A to D, REPC_A, the WTG set, DER_A and REGFM_A1
  • Small-signal eigenvalues, damping and participation factors, dense and Arnoldi; generalised Nyquist and critical short-circuit ratio
  • EMT: trapezoidal and backward-Euler companion models, Bergeron travelling-wave lines, switching events and probes
  • PSS/E DYR import for the library

05 / Protection

Relays placed, graded and tripped in the simulation.

Placed relays, fuses, reclosers and breakers are audited for coordination at every bus, with grading margins, sensitivity at the smallest in-zone fault, instantaneous reach and breaker duty. IDMT overcurrent grading follows the IEC 60255 and IEEE C37.112 curves.

A passive assessment reads the solved state, or a fault on it, and reports which protection would operate, with its pickup, time and basis. The solve itself is unchanged.

Commands: grade, protection-check, devices-check, protection-audit, trip

Protection technical chapterIDMT grading
  • Placed devices: 50/51, 50N/51N, 67 and 21 relays, fuses, reclosers and breakers
  • Generic settings for 27/59, 81U/81O, 81R RoCoF and 78 vector shift, with defaults from G99 and G59
  • A passive relay overlay with cascade checking
  • Coordination checks over every bus

06 / CGMES and PSS/E exchange

Bring your models in. Take them out again.

GridSim reads and writes the formats power-system models actually travel in, and checks what it reads. CGMES export writes per profile, and conformity checks report what an imported model gets wrong.

A model handover can be tested end to end: solve, export, read back and solve again, and compare the voltages.

Commands: convert, validate, export, cgmes-study, cgmes-export, cgmes-conform

CIM and CGMESFile and wire formats
  • PSS/E RAW: revisions 30 and 33 to 35 read, 33 to 35 written, with version 35 node-breaker topology; DYR dynamics and SEQ sequence data
  • CIM/CGMES import and per-profile export, with conformity checks
  • MATPOWER .m import and export; JSON cases v1 and v2 with a schema validator
  • UCTE-DEF import, PowerFactory DGS import and PyPSA-GB
  • Telemetry: IEEE C37.118 synchrophasors, IEC 60870-5-104 and Modbus
  • Results to the console, or to JSON and CSV with --json, --csv or --out

07 / Scripting and Python API

Script the study. Run it again byte for byte.

gridsim-script runs GridSim from a text script, one statement per line, the way a person would type it at a console: load a case, solve it, trip a generator, step a simulation, report, export. Every interactive session is saved as a script, so anything done by hand can be run again byte for byte.

Python drives the gridsim command line through a small, pure-Python package that runs each verb and reads its result document, so every number is the CLI’s own, bit for bit.

Commands: gridsim-script

Scripting manual
  • Loops over the elements of a case, decisions on results, state and time, unit-checked arithmetic and named procedures
  • Five engines to step: the live simulation, a frequency swing, the protection bundle, an RMS multi-machine run and an EMT run
  • A run record naming the version, the SHA-256 of the script, the model and every output, and every decision taken
  • Every script terminates: no unbounded loop, and no clock, random number, file or network access beyond the named verbs
  • A Python package on the standard library only that reads the CLI’s result files

08 / User models

Your own models, held to the same determinism.

A user model is a gridsim-model/1 JSON block diagram, not code: ports, parameters with units and bounds, blocks from a closed catalogue, wires and an initialisation block. It runs on the same step operators as the coded controllers, inside the same integration machinery.

So a declarative model is inside GridSim’s bit-identity guarantee: a model that re-expresses a coded one gives the coded model’s output bit for bit.

Commands: user-model list, user-model check

Extending GridSim
  • Exciter, governor and stabiliser models, declared rather than compiled
  • Re-expressions of TGOV1, SEXS, PSS1A, GAST, IEEET1 and IEEEG1 match the coded models bit for bit at three step sizes
  • user-model check checks a model before it runs

The numerical foundation

One managed core, several ways to work.

Command line

The gridsim tool runs every study as a verb, with strict versioned study files and JSON or CSV results for scripted pipelines.

Desktop and web

A desktop control room on Windows and Linux with a single-line editor, analysis views and a case editor, and a Blazor web app with REST and WebSocket APIs.

.NET and GPU

GridSim.Core embeds in a C#/.NET application. The linear solve sits behind a swappable seam: native ROCm for AMD Instinct first, then OpenCL and CUDA.

Shared numerical infrastructurePer-unit network modelSparse LU with minimum-degree orderingDeterministic maths libraryPhysics checks on every converged stateDouble precision end to end
How results stay bit-identicalRead the architecture