Skip to main content

Python wrapper for MMM module

Project description

PyMMM - Würth Elektronik Magnetic Modeling Module

Python wrapper over OpenMagnetics for flyback transformer and current transformer selection from Würth's catalog.

Features

  • Energy-based magnetic filtering - Quickly filter catalog by storable energy
  • Virtual magnetics - Generate winding combinations from real products
  • Flyback/CT design - Process design inputs for flyback and current transformers
  • Full simulation - Core losses, winding losses, temperature rise calculations
  • Visualization - SVG plots of cores, windings, and magnetic fields

Installation

pip install wheelhouse/pymmm-*.whl

Quick Start

import PyMMM

# Load catalog
PyMMM.load_magnetics_from_file("flybacks.ndjson", expand=True)

# Define requirements
inputs = {
    "inputVoltage": {"minimum": 85, "maximum": 265},
    "operatingPoints": [{
        "outputVoltages": [12],
        "outputCurrents": [1],
        "switchingFrequency": 100000,
        "mode": "Discontinuous Conduction Mode"
    }]
}

# Filter by energy
PyMMM.compute_energy_cache(100, inputs)
min_energy = PyMMM.calculate_flyback_required_magnetic_energy(inputs)
refs = PyMMM.filter_magnetics_by_energy(min_energy, min_energy * 2)

# Get virtual magnetics
for ref in refs:
    result = PyMMM.calculate_virtual_magnetics_by_reference(ref, inputs, True)
    print(result["virtualMagnetics"])

Building from Source

# Build wheel
python3 -m pipx run build

# Or with cibuildwheel for manylinux
cibuildwheel

Documentation

See llms.txt for detailed API documentation and usage patterns.

API Reference

Run help(PyMMM) or help(PyMMM.function_name) for function documentation.

Key Functions

Function Description
load_magnetics_from_file Load catalog from NDJSON
compute_energy_cache Precompute storable energy
filter_magnetics_by_energy Filter by energy range
calculate_virtual_magnetics_by_reference Generate winding combinations
filter_magnetics_by_flow Score and rank magnetics
devirtualize_mas_by_reference Map virtual to real product
calculate_saturation_current Calculate saturation current

License

Proprietary - Würth Elektronik

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pymmm-0.7.12-cp312-cp312-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.12Windows x86-64

pymmm-0.7.12-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pymmm-0.7.12-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pymmm-0.7.12-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file pymmm-0.7.12-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pymmm-0.7.12-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for pymmm-0.7.12-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e06305eb8c82198c64003faba0de58fa4d19cbdf9a8775c11d6a8ea90e051d6e
MD5 dab71ee1853564ee5dcf308364eaaaea
BLAKE2b-256 bab3cf96bd49f3aa396c15c645f84e30df17514f7d603974a6a4a8ea0d5f0801

See more details on using hashes here.

File details

Details for the file pymmm-0.7.12-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pymmm-0.7.12-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4da77a16448d5af38623d0750dbd2c01b8d6c7d195e1910912a1d263f31f5f45
MD5 490d67a622e1b681b1b769c74bbca1bc
BLAKE2b-256 11fc004227168226436f7c8436717cf1283dc4c3cbd103508f03ac0b90bf511d

See more details on using hashes here.

File details

Details for the file pymmm-0.7.12-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pymmm-0.7.12-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 18d474b212f1dd9949a92895eab40699c1ea583cb1b2f8e8e71016d671678ecc
MD5 50b13af3f737d099011bd11a3f909923
BLAKE2b-256 6f2cfa28da88e0074a0dd3197efff0ab471e1c24a88ce5fe4d4899f053b9e3dd

See more details on using hashes here.

File details

Details for the file pymmm-0.7.12-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pymmm-0.7.12-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 96fc9aa71e5da776605054e6c5571215d41d8a5c7c1a5068174a2b1329783c6d
MD5 b3cc3e3dbfc2a8465e3092758879c173
BLAKE2b-256 2c95ddf98905db169a08876986177aff86870888166db1b35e66b88449574cbf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page