v1.7.1
Built against MKF e0fb636d, which contains the ABT #823 wire fix.
Catalogue loading is fixed (ABT #823)
Loading a magnetics catalogue would die with an anonymous bad optional access on any record whose wire is supplied inline with no outer size (conductingDiameter + coating, no outerDiameter) on a coil that is not pre-wound. magnetic_autocomplete ends in coil.wind(), which read the outer dimension as a bare .value().
- MKF now derives the missing outer dimensions from the conductor and its coating, and where it genuinely cannot, throws
[INVALID_WIRE_DATA]naming the winding index, winding name and the magnetic's reference. load_magnetics_from_fileis now atomic. The file is parsed into a staging vector and committed only if every record survives, so a failed load leaves the cache at 0 rather than partly populated. Previously it stopped at the first bad record and left everything before it loaded — a truncated catalogue that looked healthy.- Failures name the record:
<path>:<line> (part '<reference>'): <reason>. - A record with no
manufacturerInfo.referenceis a named error rather than a second anonymous optional access. - A file that cannot be opened now raises instead of returning the cache size.
Measured on a 236-part common-mode-choke catalogue: previously a hard failure at record 78 with 77 parts cached; now all 236 load in ~2 s.
Winding-loss numbers change (ABT #832)
This release carries an FEM-arbitrated (2D OMFEM) correction to the loss models. Anything that pins or snapshots winding loss, R_ac, or efficiency will move. This is a correctness improvement, not a regression, but it is not silent:
- Rectangular-wire proximity loss was ~1000x under (a dimensionally wrong prefactor); now within 3% of FEM at 5 turns.
- Gapped fringing was up to 53x over on a 2 mm-gap ETD24; now tracks FEM.
- Residual (5 um mating-surface) gaps no longer fringe at all.
Known limitations, stated deliberately
- The loss residual grows with conductor packing: 7-turn rectangular +21%, ten toroidal turns +35-62% vs FEM.
- Foil beside a gap is missing its dominant current-crowding term entirely (ABT #836).
- Most user-selectable non-default loss models are still wrong (ABT #837). The defaults are the good path.
New bindings
load_magnetics_from_file_report(path, expand)/load_magnetics_from_string_report(...)— return{'loaded', 'cacheSize', 'rejected': [{'line', 'reference', 'reason'}]}, caching the good records and never throwing on a bad one. Strict loading stays strict; tolerance is a separate function name so a truncated catalogue cannot become the default by accident.get_core_material_available_losses_methods(material_json)— asks the loss-methods question of a material directly, so a caller comparing materials need not build aMagneticaround each one.
Other fixes
calculate_advised_cores/_magnetics: six result loops dereferenced the optionalmanufacturerInfoand itsreferenceunconditionally, killing the whole call at the very end — after every candidate had been advised and scored — for a catalogue entry that simply had no reference (ABT #825).- Test suite: xfails and skips that no longer described reality have been removed (ABT #824), including the core-adviser timeout skip.