kicad2ems.pcbqs.power_spice¶
ngspice transient adapter with explicit RLC, switch and terminal-model
choices.
No device parameters are inferred from a footprint. Model libraries and selected
parasitics are inputs. All currents, including package capacitance/diode
currents, are measured at the component terminals for subsequent MQS field
inference.
- kicad2ems.pcbqs.power_spice.cancel_active_runs()[source]¶
Stop all circuit children, including runs started by sweep worker threads.
- kicad2ems.pcbqs.power_spice.coil_capacitance(coil)[source]¶
The winding's self-capacitance: Cp_F, else from its SRF_Hz, else 0.
- kicad2ems.pcbqs.power_spice.fit_core_resistance(L_H, R_ohm, ac_ohm, f_Hz, SRF_Hz=None, Cp_F=None)[source]¶
The parallel core-loss resistance (ohm) that gives a winding of inductance L_H and DC resistance R_ohm the AC resistance ac_ohm at f_Hz (its Q there), with its self-capacitance (Cp_F, or from SRF_Hz): a model's core_R_ohm. None when the DC resistance alone is already as lossy. Its constant conductance is an assumption, not broadband ferrite data; it damps the DCR-only SRF pole passively. (The fit had been done at every deck build from Rac_ref_ohm, loss_model and loss_reference_Hz, for wpthb's coils alone: R-F1.)
- kicad2ems.pcbqs.power_spice.include_line(path, what)[source]¶
The .include of a part's library, which must exist.
- kicad2ems.pcbqs.power_spice.library_entry(path, name)[source]¶
What a SPICE library calls `name`: ('subckt', [its pins in order]), ('model', its type), or None. Lines continued with '+' are joined; a subcircuit's params: are not pins.