kicad2ems.pcbqs.circuit.windings

An inductor's losses worked out after the run (R-E10): what its winding loses
to its AC resistance and its core to the flux's swing, from the reported run's
last period. The circuit itself has the winding's DC resistance (and a constant
core resistor, core_R_ohm, where one is given); these come on top, from two
fields of an inductor:

    AC_R_ohm   [[f_Hz, R_ohm], ...]: the winding's resistance against frequency
               (a datasheet's ACR curve, or a measurement). Each harmonic n of
               the winding's current I_n (RMS) loses (R(n f) - DCR) I_n^2 more
               than the DCR the circuit has. Between the points R is
               interpolated on log-log axes; below the first the excess over DCR
               falls as f^2 (eddy and proximity losses at low frequency); above
               the last R grows as sqrt(f) (skin effect). The current's AC above
               the harmonics taken (HARMONICS) is put at the last one's
               resistance.
    core_loss  {k, alpha, beta, turns, Ae_m2, Ve_m3}: the core material's
               Steinmetz fit, P = k f^alpha B^beta in W/m^3 with f in Hz and B
               the peak flux density in T (core_k_si converts a datasheet's k
               for mW/cm^3, kHz and mT), and the core's turns, effective area
               and volume. The loss is the improved generalised Steinmetz
               equation's (iGSE) for the flux's own waveform, B from the
               winding's voltage less its resistance's drop: one major loop a
               period, and no DC-bias or relaxation terms (a ferrite under DC
               bias loses more). A transformer's core is one winding's: give
               core_loss on one of its windings.

Both go to the part (core_loss_W, AC_winding_loss_W, and their sum added_loss_W,
which the thermal model counts on its footprint) and to the case's loss; the
efficiency counts them as drawn from the source on top of what the run drew
(first order: the run's currents are as they would be with them).
kicad2ems.pcbqs.circuit.windings.ac_resistance(table, dcr, f)[source]
R(f) from AC_R_ohm's points (see the module's notes), for frequencies f
(Hz, an array).
kicad2ems.pcbqs.circuit.windings.ac_winding_loss(t, i, period, table, dcr)[source]
What the winding's AC resistance loses above its DCR (W), from its
current i(t) over the last period.
kicad2ems.pcbqs.circuit.windings.apply(stats, added, notes)[source]
The losses worked out after the run into the case's results (see the
module's notes).
kicad2ems.pcbqs.circuit.windings.check(part)[source]
A part's AC_R_ohm and core_loss, resolved to numbers: a ModelError for
what cannot be used.
kicad2ems.pcbqs.circuit.windings.core_k_si(k, alpha, beta, f_unit=1000.0, B_unit=0.001, P_unit=1000.0)[source]
A Steinmetz k given for f in f_unit Hz, B in B_unit T and P in P_unit
W/m^3 (the defaults: kHz, mT and mW/cm^3, which is 1e3 W/m^3) as core_loss's
k (Hz, T, W/m^3).
kicad2ems.pcbqs.circuit.windings.igse_coefficient(k, alpha, beta)[source]
iGSE's k_i for Steinmetz's k, alpha, beta: a sine of peak B at f gives k
f^alpha B^beta.
kicad2ems.pcbqs.circuit.windings.igse_loss(t, v, core)[source]
The core's loss (W) for its winding's voltage v(t) less the resistive
drop (one period, piecewise linear): B = int v dt / (turns Ae); P = Ve k_i
dB^(beta - alpha) / T int |dB/dt|^alpha dt.
kicad2ems.pcbqs.circuit.windings.last_period(t, y, period)[source]
The samples of the run's last period, with its ends interpolated: (t,
y).
kicad2ems.pcbqs.circuit.windings.losses(model, result, period)[source]
{ref: dict(core_loss_W, AC_winding_loss_W, added_loss_W)} for the model's
inductors that give AC_R_ohm or core_loss; {} when none does.