User manual — chapter list

Electromagnetic transients (EMT)

The emt verb runs a time-domain electromagnetic-transient simulation: it steps the instantaneous network (L·di/dt, C·dv/dt) at a fixed microsecond timestep, resolving the waveform itself rather than a phasor. Use it for switching and fault transients — breaker/capacitor switching, fault inception and clearing, transient recovery voltage, and travelling-wave propagation.

It is a forward simulation about the model: the output is a model trajectory, never a claim about the real grid's present or future. For the method and internals see the technical manual, ch. 21.

Running a transient

gridsim emt case14 --duration 0.05 --dt-us 20 --probe v:4 --out ./emt-out
  • --dt-us is the timestep in microseconds (EMT wants small steps; 20 µs is a good default). --duration is the simulated time in seconds.
  • --probe selects what to record: v:<bus> for a node voltage, i:<from>-<to> for a branch current, comma-separated. With no --probe you get the source-bus voltage and the first branch current.
  • --out is the output directory. You get timeseries.csv (a provenance header then one row per step), summary.md and run-metadata.json.

Source: DC or AC

One source energises the network, at the first generator bus by default (--source <bus> to change it):

  • --freq 0 (default) is a DC source of --amp per-unit; the network settles to the resistive DC solution — good for seeing a settling transient.
  • --freq 50 drives a 50 Hz sinusoid of amplitude --amp.

By default Pd/Qd loads are modelled as constant-impedance shunts (they damp the transient to a physical settling); add --no-loads to omit them. Add --lines to model charged transmission branches as lossless travelling-wave lines instead of lumped pi sections (for wave-propagation studies).

Faults and switching

Schedule events with repeated --event flags. A fault is a bus-to-ground switch, applied then cleared:

gridsim emt case9 --duration 0.2 --dt-us 20 \
        --event fault:[email protected]:0.01 --event clear:[email protected] \
        --probe v:5,i:4-5 --out ./emt-fault
Event Meaning
fault:<bus>@<t>:<Rpu> apply a fault of resistance Rpu from <bus> to ground at time <t>
clear:<bus>@<t> clear that bus's fault at <t>
switch:<id>@<t>:close\|open operate a named switch

At each event the solver applies a Critical Damping Adjustment — two backward-Euler half-steps that remove the spurious numerical oscillation a switching discontinuity would otherwise excite. --no-cda disables it, and --rule be runs the whole simulation in backward Euler (first-order, but always stable).

Reading the output

summary.md reports the step count, the number of matrix factorizations (one, plus a couple per switching event), the peak probe magnitude and the wall time. timeseries.csv has a t_seconds column then one column per probe; open it in any plotting tool. A clean run ends with exit code 0; a bad flag or an event outside the run window exits 2; a numerical failure (singular network, NaN) exits 3.

Three-phase and unbalanced faults

The emt verb is single-phase (positive-sequence). For genuine three-phase abc studies with inter-phase mutual coupling and unbalanced faults (single-line-to-ground, etc.), the three-phase engine (ThreePhaseEmtEngine) is driven programmatically rather than from the CLI — it needs per-phase sequence data that isn't carried on a standard case file. See the technical manual (ch. 21) and ThreePhaseEmtTests for worked examples.

The forward-inference horizon

Like every GridSim tool, EMT respects the no-forward-inference rule: it is Solving (stepping the model forward), which is permitted, but it is not a grid forecast. If you seed a run from dated data, that data must be at least 169 hours old; the trajectory it produces is a statement about the model, not about what the real grid will do.

See also