Product documentation — installation, licensing, and integration guides.
SolvLRDE
Examples
07 SolvLRDE-Grid

Journey 07 — SolvLRDE-Grid

License token: grid · Product name: SolvLRDE-Grid (resonix-grid)

See also: Vertical SKUs overview · Licensing

What this SKU is for

SolvLRDE-Grid is the licensed vertical for electromagnetic transient (EMT) and power-system simulation teams — transmission operators, EMTP-class vendors, protection engineers, and anyone embedding companion-form transients in digital twins or planning tools.

The engineering problem

After a breaker opens, a tap changes, or a fault is cleared, the network is piecewise linear for a finite interval. On each interval the state obeys y' = A y where y holds bus voltages, branch currents, and companion-form capacitor/inductor states, and A is fixed until the next switching event. Classic EMTP engines time-step that interval: cost grows with segment duration T, and stiff fast modes (surge capacitors, short lines) force small steps even when you only need the terminal state at the next breaker time.

Why Grid exists (and why LRDE fits)

SolvLRDE evaluates y(T) directly via Talbot contour Laplace inversion. Contour work depends on the spectrum of A, not on how large T is — a 50 ms segment and a 500 ms segment cost essentially the same. Production EMTP orchestration already stitches segments at switching times; Grid replaces only the inner propagate step:

  1. Hold companion-form or Y-bus linearization A for the current topology.
  2. Call solve(A, y0, T=dt) for the segment duration.
  3. Pass result["y"] as y0 for the next segment.

You keep your breaker logic, device models, and nonlinear outer loop. LRDE is the linear segment kernel.

Who should buy Grid (not another SKU)

Choose Grid when…Choose something else when…
A comes from a power-network companion or admittance linearizationRates/OU or PDE spatial operators → Pricing
You stitch at breaker/tap eventsLTI plant step response → Control
Sparse chains may be tridiagonal → solve_bandedNonlinear IVPs → SolvSRK

Typical production integration

  • Operator: dense A for small networks; solve_banded when the semidiscrete companion is tridiagonal or banded.
  • State: segment initial condition from prior terminal state or fault injection.
  • Horizon: segment length T = time until next scheduled switching event (not a fixed global dt).
  • License gate: solvlrde.license_has_sku("grid") before calling Grid code paths in an OEM embed.

This walkthrough

Prerequisites: Core journeys 01–06 complete.

Scenario: After a switching event, each EMTP segment is a constant linear system y' = A y on bus voltages and branch states. SolvLRDE inverts the resolvent directly — segment duration T does not inflate the cost.

Key APIs

  • solvlrde.solve()
  • segment stitching pattern

Concepts to internalize

  • SolvLRDE-Grid — licensed as resonix-grid; trial wheel is generic.
  • Companion-form A — holds per-unit admittance linearization.
  • Segment cost flat in dt — long EMTP windows do not inflate contour work.

Important code

The guided tour script wraps this pattern. Copy the production shape into your pipeline:

# Per switching segment:
result = lrde.solve(A_segment, y0_segment, T=dt)
y0_next = result['y']  # initial state for next segment

Act-by-act walkthrough

Act 1 — EMTP linear segment

After a switching event, each EMTP segment is a constant linear system y' = A y on bus voltages and branch states. SolvLRDE inverts the resolvent directly — segment duration T does not inflate the cost.

Act 2 — Pre-switch network

Toy 3-bus chain: each bus couples to its neighbors through series admittance. This is not a full IEEE case — it shows the API pattern your EMTP kernel uses per segment.

FieldValueNotes
segment_s0.0
duration_s0.05
buses3
survivedTrue
statusok
y[0.604297, 0.690446, 0.457145]
n_talbot_used32
n_solves32
nu_used0.6
contour_scale256
wall_s0

Act 3 — Post-switch topology

Trip the middle tie — admittance matrix changes, initial state is the terminal state from the prior segment. Stitch segments at switching times in production; here we only show the second solve.

FieldValueNotes
survivedTrue
statusok
y[0.427786, 0.614569, 0.277273]
n_talbot_used32
n_solves32
nu_used0.6
contour_scale256
wall_s0

Act 4 — Production integration

Your EMTP orchestration holds Y-bus or companion-form A per topology, calls solve() per segment, and stitches at breakers. For large sparse networks use solve_banded when the operator is tridiagonal or banded.

Guided tour output

Verified console capture from sku_grid.py:

-- Act 1 - EMTP linear segment --
  -> After a switching event, each EMTP segment is a constant linear system y' = A y on bus voltages and branch states. SolvLRDE inverts the resolvent directly — segment duration T does not inflate the cost.

-- Act 2 - Pre-switch network --
  -> Toy 3-bus chain: each bus couples to its neighbors through series admittance. This is not a full IEEE case — it shows the API pattern your EMTP kernel uses per segment.
  segment_s: 0.0
  duration_s: 0.05
  buses: 3
  survived: True
  status: ok
  y: [0.604297, 0.690446, 0.457145]
  n_talbot_used: 32
  n_solves: 32
  nu_used: 0.6
  contour_scale: 256
  wall_s: 0

-- Act 3 - Post-switch topology --
  -> Trip the middle tie — admittance matrix changes, initial state is the terminal state from the prior segment. Stitch segments at switching times in production; here we only show the second solve.
  survived: True
  status: ok
  y: [0.427786, 0.614569, 0.277273]
  n_talbot_used: 32
  n_solves: 32
  nu_used: 0.6
  contour_scale: 256
  wall_s: 0

-- Act 4 - Production integration --
  -> Your EMTP orchestration holds Y-bus or companion-form A per topology, calls solve() per segment, and stitches at breakers. For large sparse networks use solve_banded when the operator is tridiagonal or banded.

-- Run complete --
  next_journey: sku_pricing.py (Pricing SKU)

Run it

cd python
# Guided tour — narrated scenario walkthrough (recommended first run):
python examples/skus/sku_grid.py
 
# Production one-liner — same API call you ship:
python -c "import solvlrde,numpy as np;A=np.array([[-20.,10.,0.],[10.,-20.,10.],[0.,10.,-20.]]);print(solvlrde.solve(A,[1.,.8,.6],T=0.05)['y'])"

What comes next

See SolvLRDE-Pricing for OU/rate inner solves.

Navigation

← Journey 06 — Limits · Journey 08 — SolvLRDE-Pricing →