rizer.boulder_plugin.circuit#

Simulink-style electrical circuit blocks for the Boulder GUI.

The NRP electric circuit is expressed in STONE YAML with the voltage source as a block and the transmission line as a connector (an edge, like a wire):

- id: gen
  Generator: {waveform: trapezoidal, voltage: 7 kV, ...}
- id: cable
  CoaxialCable:
    length: 6.2 m
    impedance: 75 ohm
    wave_speed: 1.9e+8
    include_reflections: true
  source: gen
  target: plasma

Generator (and the hybrid model’s RLRCircuit) builders return ElectricalNode placeholders (cantera.Reservoir subclasses, so Boulder excludes them from the ReactorNet while still drawing them in the network graph) carrying the rizer circuit component. CoaxialCable and ElectricalConnection are registered connection builders producing no-flow ElectricalLink edges. After each stage is built, the wire_electrical_circuit() post-build hook walks the links, builds the transmission-line circuit matching the Generator’s own source type (build_transmission_line_circuit()) from the Generator --CoaxialCable--> reactor wiring and attaches it to the plasma reactor.

Classes#

ElectricalNode

Placeholder node carrying an electrical circuit component.

ElectricalLink

No-flow connection between electrical blocks and the plasma reactor.

Functions#

build_generator_node(→ ElectricalNode)

Build a Generator block (voltage source) as a placeholder node.

build_rlr_node(→ ElectricalNode)

Build an RLRCircuit block (low-voltage R-L-R(t) circuit).

build_electrical_connection(→ ElectricalLink)

Build an ElectricalConnection edge (plain wire between blocks).

build_cable_connection(→ ElectricalLink)

Build a CoaxialCable edge (ideal transmission line as a connector).

wire_electrical_circuit(→ None)

Post-build hook: assemble the electric circuits from the wiring.

Module Contents#

class rizer.boulder_plugin.circuit.ElectricalNode#

Bases: cantera.Reservoir

Placeholder node carrying an electrical circuit component.

Subclasses cantera.Reservoir so Boulder keeps it out of the Cantera ReactorNet (electrical blocks carry no mass) while the network graph still shows it. Built on a plain air Solution — deliberately not the user’s plasma mechanism: cloning a Solution that carries Python ExtensibleRate objects is unreliable in Cantera 4.0a2.

component: Any = None#
component_kind: str = ''#
window_span: float | None = None#
r_p_rtol: float = 0.001#
rizer.boulder_plugin.circuit.build_generator_node(converter: Any, node: Dict[str, Any]) → ElectricalNode#

Build a Generator block (voltage source) as a placeholder node.

Supports all three source types (see _build_source_input()); the two capacitive types only combine with a plain resistive PlasmaReactor2T load, mirroring build_circuit_from_input().

rizer.boulder_plugin.circuit.build_rlr_node(converter: Any, node: Dict[str, Any]) → ElectricalNode#

Build an RLRCircuit block (low-voltage R-L-R(t) circuit).

No-flow connection between electrical blocks and the plasma reactor.

kind is "wire" for a plain ElectricalConnection and "cable" for a CoaxialCable transmission line (component then holds the rizer IdealCable).

id: str#
source: str#
target: str#
kind: str = 'wire'#
component: Any = None#
include_reflections: bool | None = None#
properties: Dict[str, Any]#
rizer.boulder_plugin.circuit.build_electrical_connection(converter: Any, conn: Dict[str, Any]) → ElectricalLink#

Build an ElectricalConnection edge (plain wire between blocks).

rizer.boulder_plugin.circuit.build_cable_connection(converter: Any, conn: Dict[str, Any]) → ElectricalLink#

Build a CoaxialCable edge (ideal transmission line as a connector).

rizer.boulder_plugin.circuit.wire_electrical_circuit(converter: Any, config: Dict[str, Any]) → None#

Post-build hook: assemble the electric circuits from the wiring.

Runs once per stage (before the stage is solved).

  • PlasmaReactor2T: expects an incoming CoaxialCable edge from a Generator block; builds the transmission-line circuit matching the generator’s own source type (build_transmission_line_circuit(), with the edge’s include_reflections) and attaches it to the node’s NRPCase. For a stateful source ("c_shunt"/"c_parallel"), also checks the reactor’s own simulation.solver.max_step against the generator’s window_span (same bound as check_circuit_solver_compatibility()).

  • HybridDischarge2T: expects an incoming ElectricalConnection from an RLRCircuit block.