PyOpenMagnetics 1.7.15__tar.gz → 1.7.16__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/CMakeLists.txt +5 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/PKG-INFO +1 -1
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/pyproject.toml +1 -1
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/advisers.cpp +41 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/advisers.h +3 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/common.h +1 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/.github/workflows/ci.yml +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/.github/workflows/publish.yml +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/.gitignore +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/AGENTS.md +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/LICENSE +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/PyOpenMagnetics.pyi +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/README.md +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/_packaging/__init__.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/_packaging/_build_info.py.in +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/api/MAS.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/api/mas_db_reader.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/api/validation.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/clear_cibuildwheel_cache.sh +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/docs/compatibility.md +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/docs/errors.md +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/docs/performance.md +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/README.md +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/buck_inductor.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/complete_simulation_example.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/converter_design_example.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/debug_bobbin.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/debug_coil.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/debug_core.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/debug_plotting.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/flyback_220v_12v_1a.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/flyback_220v_12v_2a_complete.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/flyback_bh_curve.png +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/flyback_core.png +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/flyback_design.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/flyback_summary.png +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/flyback_waveforms.png +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/list_plot_funcs.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/plot_flyback_design.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/plot_flyback_pyom.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/test_field_calc.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/examples/test_field_plot.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/force_fresh_build.sh +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/llms.txt +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/notebooks/01_getting_started.ipynb +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/notebooks/02_buck_inductor.ipynb +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/notebooks/03_core_losses.ipynb +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/notebooks/README.md +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/requirements.txt +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/bobbin.cpp +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/bobbin.h +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/cmc.cpp +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/cmc.h +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/converter.cpp +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/converter.h +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/core.cpp +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/core.h +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/crossref.cpp +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/crossref.h +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/database.cpp +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/database.h +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/logging.cpp +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/logging.h +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/losses.cpp +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/losses.h +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/module.cpp +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/plotting.cpp +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/plotting.h +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/settings.cpp +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/settings.h +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/simulation.cpp +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/simulation.h +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/utils.cpp +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/utils.h +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/winding.cpp +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/winding.h +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/wire.cpp +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/src/wire.h +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/test.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/tests/__init__.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/tests/conftest.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/tests/test_converter_endpoints.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/tests/test_core.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/tests/test_core_adviser.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/tests/test_examples_integration.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/tests/test_inputs.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/tests/test_logging.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/tests/test_magnetic_adviser.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/tests/test_magnetics_catalogue_load.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/tests/test_plotting.py +0 -0
- {pyopenmagnetics-1.7.15 → pyopenmagnetics-1.7.16}/tests/test_winding.py +0 -0
|
@@ -479,6 +479,11 @@ target_link_libraries(PyOpenMagnetics PUBLIC data::data)
|
|
|
479
479
|
cmrc_add_resource_library(core_losses_data ALIAS data::core_losses_data NAMESPACE coreLossesData ${MKF_DIR}/src/data/core_losses/ciGSE_coefficients.json)
|
|
480
480
|
target_link_libraries(PyOpenMagnetics PUBLIC data::core_losses_data)
|
|
481
481
|
|
|
482
|
+
# ABT #1177 (MKF WP8): the design-for-manufacturing rule numbers and their sources. MKF opens it
|
|
483
|
+
# as "src/data/dfm_rules.json", hence WHENCE the MKF root (as for the insulation standards).
|
|
484
|
+
cmrc_add_resource_library(dfm_rules ALIAS data::dfm_rules NAMESPACE dfmData WHENCE ${MKF_DIR}/ ${MKF_DIR}/src/data/dfm_rules.json)
|
|
485
|
+
target_link_libraries(PyOpenMagnetics PUBLIC data::dfm_rules)
|
|
486
|
+
|
|
482
487
|
include_directories("${CMAKE_BINARY_DIR}/_deps/json-src/include/nlohmann/")
|
|
483
488
|
include_directories("${CMAKE_BINARY_DIR}/_deps/pybind11-src/include/")
|
|
484
489
|
include_directories("${CMAKE_BINARY_DIR}/_deps/pybind11_json-src/include/pybind11_json/")
|
|
@@ -267,6 +267,15 @@ json calculate_advised_magnetics_from_cache(json inputsJson, json filterFlowJson
|
|
|
267
267
|
return results;
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
+
json calculate_manufacturability_report(json masJson) {
|
|
271
|
+
OpenMagnetics::Mas mas(masJson);
|
|
272
|
+
OpenMagnetics::Manufacturability manufacturability;
|
|
273
|
+
auto report = manufacturability.calculate_report(mas);
|
|
274
|
+
json result;
|
|
275
|
+
OpenMagnetics::to_json(result, report);
|
|
276
|
+
return result;
|
|
277
|
+
}
|
|
278
|
+
|
|
270
279
|
json calculate_advised_sections(json masJson, json patternJson, int repetitions) {
|
|
271
280
|
OpenMagnetics::Mas mas(masJson);
|
|
272
281
|
std::vector<size_t> pattern;
|
|
@@ -514,6 +523,38 @@ void register_adviser_bindings(py::module& m) {
|
|
|
514
523
|
py::arg("inputs_json"), py::arg("filter_flow_json"), py::arg("max_results"),
|
|
515
524
|
py::call_guard<py::gil_scoped_release>());
|
|
516
525
|
|
|
526
|
+
m.def("calculate_manufacturability_report", &calculate_manufacturability_report,
|
|
527
|
+
R"pbdoc(
|
|
528
|
+
Run the design-for-manufacturing rule pack over a MAS design.
|
|
529
|
+
|
|
530
|
+
Encodes as checks the public Wuerth Elektronik DFM guidance (ABT #1177, WP8). The rule
|
|
531
|
+
numbers and the source that states each of them live in MKF's src/data/dfm_rules.json.
|
|
532
|
+
Nothing in the design is changed; this is a report.
|
|
533
|
+
|
|
534
|
+
Args:
|
|
535
|
+
mas: A full MAS object (inputs + magnetic).
|
|
536
|
+
|
|
537
|
+
Returns:
|
|
538
|
+
JSON object with:
|
|
539
|
+
- "findings": one entry per rule R1..R17, each with "ruleId", "title", "status",
|
|
540
|
+
"message", "source", and where they exist "measuredValue", "thresholdValue",
|
|
541
|
+
"unit", "scope", "reason".
|
|
542
|
+
- "numberPass" / "numberWarnings" / "numberFails" / "numberNotEvaluated" /
|
|
543
|
+
"numberNotApplicable" / "numberInformational".
|
|
544
|
+
|
|
545
|
+
"status" is one of PASS, WARNING, FAIL, INFORMATIONAL, NOT_APPLICABLE,
|
|
546
|
+
NOT_EVALUATED. NOT_EVALUATED always carries a "reason": a rule that cannot be
|
|
547
|
+
evaluated says so rather than defaulting to a pass. Rules R2, R3, R4, R10, R11,
|
|
548
|
+
R14 and R16 are owned by other work packages and report NOT_EVALUATED with the
|
|
549
|
+
owning work package as the reason.
|
|
550
|
+
|
|
551
|
+
Example:
|
|
552
|
+
>>> report = PyMKF.calculate_manufacturability_report(mas)
|
|
553
|
+
>>> [f["ruleId"] for f in report["findings"] if f["status"] == "WARNING"]
|
|
554
|
+
)pbdoc",
|
|
555
|
+
py::arg("mas"),
|
|
556
|
+
py::call_guard<py::gil_scoped_release>());
|
|
557
|
+
|
|
517
558
|
m.def("calculate_advised_sections", &calculate_advised_sections,
|
|
518
559
|
"Get advised coil sections.",
|
|
519
560
|
py::arg("mas"), py::arg("pattern"), py::arg("repetitions"),
|
|
@@ -14,6 +14,9 @@ json calculate_advised_magnetics_fast(json inputsJson, int maximumNumberResults,
|
|
|
14
14
|
json calculate_advised_magnetics_from_catalog(json inputsJson, json catalogJson, int maximumNumberResults);
|
|
15
15
|
json calculate_advised_magnetics_from_cache(json inputsJson, json filterFlowJson, int maximumNumberResults);
|
|
16
16
|
|
|
17
|
+
// Design-for-manufacturing rule pack (ABT #1177, WP8)
|
|
18
|
+
json calculate_manufacturability_report(json masJson);
|
|
19
|
+
|
|
17
20
|
void register_adviser_bindings(py::module& m);
|
|
18
21
|
|
|
19
22
|
} // namespace PyMKF
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|