rizer.spice.backend.services.ltspice_export#

Generate LTSpice-compatible SPICE netlists from Rizer circuit configurations.

Attributes#

Functions#

export_rllc(→ str)

Generate an LTSpice netlist for the RLLC circuit.

export_castera(→ str)

Generate an LTSpice netlist for the Castera circuit.

export_nrp(→ str)

Generate an LTSpice netlist for the NRP circuit.

export_lte_discharge(→ str)

Generate an LTSpice netlist for the LTE discharge circuit.

export_netlist(→ str)

Dispatch to the appropriate exporter.

Module Contents#

rizer.spice.backend.services.ltspice_export.export_rllc(req: rizer.spice.circuits.schemas.RLLCSimulationRequest) → str#

Generate an LTSpice netlist for the RLLC circuit.

rizer.spice.backend.services.ltspice_export.export_castera(req: rizer.spice.circuits.schemas.CasteraSimulationRequest) → str#

Generate an LTSpice netlist for the Castera circuit.

rizer.spice.backend.services.ltspice_export.export_nrp(req: rizer.spice.circuits.schemas.NRPSimulationRequest) → str#

Generate an LTSpice netlist for the NRP circuit.

Raises:

ValueError – If req.source_circuit.type is not “resistive” – LTSpice export does not model a capacitor embedded in the source network.

rizer.spice.backend.services.ltspice_export.export_lte_discharge(req: rizer.spice.circuits.schemas.LTEDischargeSimulationRequest) → str#

Generate an LTSpice netlist for the LTE discharge circuit.

The electrical part is a simple R-L-R_plasma loop driven by a pulsed voltage source.

rizer.spice.backend.services.ltspice_export.EXPORTERS: dict[str, collections.abc.Callable[[rizer.spice.circuits.schemas.SimulationRequest], str]]#
rizer.spice.backend.services.ltspice_export.export_netlist(circuit_type: str, request: rizer.spice.circuits.schemas.SimulationRequest) → str#

Dispatch to the appropriate exporter.