Skip to content

Conversation

@tinix84
Copy link
Collaborator

@tinix84 tinix84 commented Feb 3, 2026

Summary

Implements Issue #32: OpenMagnetics Documentation with comprehensive auto-generated documentation using MkDocs + Material theme.

Features Added

  • MkDocs Setup: Complete documentation site with Material theme, mermaid diagrams, and search
  • Physical Models Documentation: 1,200+ lines documenting all physical models with:
    • Core losses (Steinmetz, iGSE, MSE, NSE, Roshen, Albach, Barg)
    • Reluctance (Zhang, Muehlethaler, Partridge, Stenglein, Balakrishnan, Classic)
    • Winding losses (skin & proximity effect models by wire type)
    • Magnetic field (Binns-Lawrenson, Dowell, Wang, Albach + fringing)
    • Inductance (reluctance-based, matrix theory, leakage)
    • Capacitance (Koch, Massarini, Albach, Duerdoth)
    • Thermal (Maniktala, Kazimierczuk, TDK, Dixon, Amidon)
  • Settings Reference: Auto-generated from Settings.h (83 settings)
  • Algorithm Flowcharts: CoreAdviser with mermaid diagrams
  • Getting Started Guide: Installation, quick start, comprehensive examples
  • Auto-extraction Scripts: Python scripts to generate docs from C++ headers
  • GitHub Actions: CI workflow for automatic deployment to GitHub Pages

Scientific Content

  • 45+ paper references with IEEE/publication links
  • Mathematical equations in LaTeX format
  • Model selection guides and design tips
  • Wire-type specific recommendations

Files Added/Modified

docs/
├── index.md                    # Landing page
├── getting-started/
│   ├── installation.md
│   ├── quick-start.md
│   └── examples.md             # Comprehensive tutorials
├── models/
│   ├── index.md
│   ├── core-losses.md
│   ├── reluctance.md
│   ├── winding-losses.md
│   ├── magnetic-field.md
│   ├── inductance.md
│   ├── capacitance.md
│   └── thermal.md
├── settings/
│   └── reference.md            # Auto-generated
├── algorithms/
│   └── core-adviser.md         # With mermaid flowcharts
├── articles/                   # Substack-ready articles
│   ├── core-losses.md
│   └── reluctance.md
└── scripts/
    ├── extract_model_docs.py
    ├── extract_settings.py
    └── generate_substack.py

mkdocs.yml                      # MkDocs configuration
.github/workflows/docs.yml      # CI deployment workflow

Test plan

  • Local MkDocs build successful
  • Documentation deployed to tinix84/MKF GitHub Pages
  • Auto-extraction scripts run without errors
  • Mermaid diagrams render correctly
  • Verify deployment on OpenMagnetics/MKF GitHub Pages

🤖 Generated with Claude Code

tinix84 and others added 3 commits February 3, 2026 10:48
Implements Issue #32: OpenMagnetics Documentation

- Add MkDocs configuration with Material theme and mermaid support
- Create documentation structure:
  - Getting Started (installation, quick-start, examples)
  - Physical Models (auto-generated from source)
  - Settings Reference (auto-generated from Settings.h)
  - Algorithm flowcharts (Core/Coil/Wire/Magnetic advisers)
  - API reference overview
- Add extraction scripts in docs/scripts/:
  - extract_model_docs.py: Extracts model info from C++ headers
  - extract_settings.py: Extracts settings from Settings.h
  - generate_substack.py: Generates standalone articles
- Add GitHub Actions workflow for auto-deployment to GitHub Pages
- Update .gitignore to allow docs/ but ignore generated output

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add more examples similar to PyOpenMagnetics including:
- Creating a core from scratch (shape, material, gapping)
- Winding a coil with interleaving options
- Core loss calculations with different models
- Winding loss calculations (DC, skin, proximity)
- Complete design adviser workflow
- Buck inductor design example
- Flyback transformer design example
- Model comparison (reluctance, core losses)
- Working with custom waveforms
- Configuration settings reference
- JSON import/export
- Python (PyMKF) examples

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Enhanced extract_model_docs.py with DETAILED_DOCS containing rich documentation
- Added comprehensive content for all physical model categories:
  - Core losses: Steinmetz, iGSE, MSE, NSE, Roshen, Albach, Barg models
  - Reluctance: Classic, Zhang, Muehlethaler, Partridge, Stenglein, Balakrishnan
  - Winding losses: Skin effect (Dowell, Wojda, Albach, Payne, Kutkut, Ferreira)
                   Proximity effect (Rossmanith, Lammeraner, Dowell, Albach, Ferreira)
  - Magnetic field: Binns-Lawrenson, Dowell, Wang, Albach with fringing models
  - Inductance: Reluctance-based, matrix theory, leakage inductance
  - Capacitance: Koch, Massarini, Albach, Duerdoth models
  - Thermal: Maniktala, Kazimierczuk, TDK, Dixon, Amidon models

- Included 45+ scientific paper references with IEEE/publication links
- Added mathematical equations in LaTeX format
- Added model selection guides and design tips
- Added usage examples and configuration settings

Total documentation: 1,200+ lines across 8 model files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@tinix84 tinix84 requested a review from AlfVII February 3, 2026 13:54
- Fix regex backtracking vulnerability in class pattern matching

- Change http to https in external references

- Move GitHub workflow permissions to job level (security best practice)

- Extract duplicated string literals to constants

- Refactor generate_enhanced_markdown() to reduce cognitive complexity

- Remove unused variable 'cat_key'

- Remove unused function parameter 'cpp_type'

- Remove unused assignment to 'anchor' variable
Copilot AI review requested due to automatic review settings February 8, 2026 00:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 8, 2026

@AlfVII AlfVII merged commit ce68304 into main Feb 8, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants