{"id":49246360,"url":"https://github.com/poealex/kicad_thermal_sim","last_synced_at":"2026-04-24T22:02:01.811Z","repository":{"id":333359234,"uuid":"1127339694","full_name":"PoeAlex/KiCad_Thermal_Sim","owner":"PoeAlex","description":"Fast Multi-Layer Copper Thermal Estimator for KiCad","archived":false,"fork":false,"pushed_at":"2026-03-16T20:51:03.000Z","size":2030,"stargazers_count":1,"open_issues_count":16,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-17T07:36:05.564Z","etag":null,"topics":["electronics","kicad","kicad-plugin","pcb","python","simulation","thermal","thermal-simulation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PoeAlex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-03T17:20:47.000Z","updated_at":"2026-02-24T13:28:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/PoeAlex/KiCad_Thermal_Sim","commit_stats":null,"previous_names":["poealex/kicad_thermal_sim"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/PoeAlex/KiCad_Thermal_Sim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoeAlex%2FKiCad_Thermal_Sim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoeAlex%2FKiCad_Thermal_Sim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoeAlex%2FKiCad_Thermal_Sim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoeAlex%2FKiCad_Thermal_Sim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PoeAlex","download_url":"https://codeload.github.com/PoeAlex/KiCad_Thermal_Sim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoeAlex%2FKiCad_Thermal_Sim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32242315,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["electronics","kicad","kicad-plugin","pcb","python","simulation","thermal","thermal-simulation"],"created_at":"2026-04-24T22:01:59.338Z","updated_at":"2026-04-24T22:02:01.802Z","avatar_url":"https://github.com/PoeAlex.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KiCad Thermal Sim — Fast Multi-Layer Copper Thermal Simulation for KiCad\n\n![Simulation results](docs/images/result.png \"6-layer thermal simulation results\")\n\n**KiCad Thermal Sim** is a lightweight KiCad PCB Editor plugin that performs a fast, layout-oriented **heat spreading simulation across all copper layers** (F.Cu…B.Cu including inner layers).\n\nThis is **not** a full 3D CFD/FEA solver. It is intended as a practical engineering tool to quickly answer:\n\n- Where are the **hotspots** on each copper layer?\n- How much do **copper pours/planes** and **via stitching** help?\n- Which layout variant is **better** (A/B comparison)?\n- How does heat distribute through the **stackup**?\n\n---\n\n## What it simulates (high level)\n\n- **2D in-plane conduction** on each copper layer (heat spreading within a layer)\n- **Vertical coupling** between adjacent copper layers (FR4 conduction + via enhancement)\n- **Power injection** from selected pads (constant or **time-varying PWL profiles**)\n- **Convection** to ambient on the **top and bottom** outer surfaces\n- Optional: a **Thermal Pad zone** on `User.Eco1` used as an area with stronger bottom-side heat removal\n\n---\n\n## Installation\n\n### Option A: KiCad Plugin Manager (recommended)\n\n1. Download the latest `ThermalSim-vX.Y.Z.zip` from the [Releases](https://github.com/PoeAlex/KiCad_Thermal_Sim/releases) page.\n2. In KiCad, open **Plugin and Content Manager**.\n3. Click **Install from File…** and select the downloaded ZIP.\n4. Restart KiCad.\n5. On first run, the plugin will detect missing dependencies and offer to install them automatically.\n\n### Option B: Manual copy\n\n1. Download or clone this repository.\n2. Copy the `ThermalSim` folder into KiCad's plugin directory:\n\n   - **Windows**: `%APPDATA%\\kicad\\9.0\\scripting\\plugins\\`\n   - **Linux**: `~/.local/share/kicad/9.0/scripting/plugins/`\n   - **macOS**: `~/Library/Application Support/kicad/9.0/scripting/plugins/`\n\n3. Restart KiCad.\n4. On first run, the plugin will offer to install missing packages (`numpy`, `scipy`, `matplotlib`) automatically. On supported Windows/Linux x86_64 systems, the installer also offers optional PyPardiso acceleration via a checked-by-default checkbox. Alternatively, install packages manually in the **KiCad 9.0 Command Prompt**:\n   ```\n   pip install numpy scipy matplotlib\n   ```\n   Optional for faster solves on supported Windows/Linux x86_64 systems: `pip install pypardiso` (Intel MKL sparse solver)\n\n5. In PCB Editor, run via **Tools → External Plugins → 2.5D Thermal Sim**.\n\n### Auto-Dependency Installation\n\nIf required packages are missing, the plugin automatically shows an install dialog instead of crashing. The dialog runs `pip install` in the background and streams the output. After installation, restart KiCad.\n\n---\n\n## Quick start\n\n1. Open your PCB in **KiCad PCB Editor**.\n2. Select one or multiple **pads** that represent your heat sources.\n3. Run the plugin via **Tools → External Plugins → 2.5D Thermal Sim**.\n4. Set **Power** (constant value or PWL file path), **Duration**, **Ambient**, and **Resolution**.\n5. (Optional) Switch to the **Advanced** tab for geometry filters, thermal pad, and solver settings.\n6. Click **Preview** (sanity check), then **Run**.\n\n![GUI main tab](docs/images/gui_main.png \"Simulation tab\")\n\n![GUI advanced tab](docs/images/gui_adv.png \"Advanced tab\")\n\n---\n\n## GUI settings\n\nThe dialog has two tabs: **Simulation** (main parameters) and **Advanced** (geometry filters, thermal pad, solver).\n\n### Simulation tab\n\n#### Board Info\nShows detected copper layers with thicknesses and dielectric gaps parsed from the board stackup. Selected heat-source pads are listed below.\n\n#### Power (W or PWL file path)\nPower assigned to each selected pad. The field accepts:\n\n| Entry | Meaning |\n|-------|---------|\n| `1.0` | 1 W constant on every selected pad |\n| `1.0, 0.5, 2.0` | Per-pad constant power (comma-separated) |\n| `C:\\sim\\ramp.pwl` | Same PWL profile for all pads |\n| `1.0, C:\\sim\\ramp.pwl` | Pad 1 = 1 W constant, Pad 2 = PWL file |\n\nUse the **Browse PWL...** button to pick a file. Clicking it multiple times appends paths for each pad.\n\n**PWL file format** (LTspice-compatible):\n```\n; Comment lines start with ; or *\n; Time(s)  Power(W)\n0.0        0.0\n0.001      1.0\n0.005      2.5\n0.010      2.5\n0.020      0.0\n```\n- Two whitespace-separated columns: time (seconds), power (watts)\n- Time values must be monotonically increasing\n- Linear interpolation between breakpoints; holds first/last value outside range\n\n#### Duration (sec)\nTotal simulated time. Shorter durations emphasize transient peaks; longer durations approach quasi steady-state.\n\n#### Ambient Temp (°C)\nReference temperature. All results are relative to ambient.\n\n#### Resolution (mm)\nSpatial discretization step size. Smaller (0.2–0.5 mm) gives better hotspot localization but is slower. Larger (0.8–1.5 mm) is faster but smears peaks.\n\n#### Output\n- **Show All Layers** — display results for all copper layers (stackup view)\n- **Save Snapshots** — store intermediate time-step images\n- **Snapshot Count** — number of intermediate snapshots\n- **Output Folder** — where results are saved\n\n### Advanced tab\n\n#### Geometry Filters\n- **Ignore Traces** — exclude copper traces from the conductivity map (zones/pours/pads still contribute)\n- **Limit Area to Pads** — restrict simulation domain to an area around selected pads (major speedup on large boards)\n- **Limit Distance (mm)** — radius around pads when area limiting is enabled (practical starting point: 20–40 mm)\n\n#### Thermal Pad (User.Eco1)\n- **Enable Pad Simulation** — treat `User.Eco1` geometry as a thermal interface zone with enhanced bottom-side heat removal\n- **Pad Thickness (mm)** — TIM thickness (thicker = higher resistance)\n- **Pad Cond. (W/mK)** — TIM thermal conductivity\n- **Pad Heat Cap. (J/m²K)** — additional thermal capacitance of the thermal pad\n\n#### Solver\n- **Convection h (W/m²K)** — convection coefficient for top/bottom surfaces (default: 10)\n- **PCB Thickness (mm)** — overall board thickness (auto-detected from stackup if available)\n\n#### Capabilities\nShows detected solver backend (SciPy, PyPardiso).\n\n---\n\n## Preview\n\nThe **Preview** button generates a geometry visualization showing copper distribution, pad locations, and via regions on each layer — useful for verifying the simulation setup before running.\n\n![Preview](docs/images/preview.png \"KiCad editor with geometry preview\")\n\n---\n\n## How to interpret results\n\nThis tool is most reliable for:\n- **Relative comparisons** (layout A vs layout B)\n- **Hotspot locations**\n- Trends: more copper, more vias, better spreading\n\nAbsolute temperatures are **estimates** and depend on modeling assumptions.\n\n---\n\n## Architecture\n\nThe plugin is split into focused modules:\n\n| Module | Purpose |\n|--------|---------|\n| `capabilities.py` | Runtime detection of numpy, scipy, matplotlib, pypardiso, numba |\n| `dependency_installer.py` | Auto-install dialog for missing packages via pip |\n| `stackup_parser.py` | Parse copper/dielectric layers from .kicad_pcb S-expressions |\n| `gui_dialogs.py` | wxPython dialog for simulation parameters (tabbed UI) |\n| `geometry_mapper.py` | Convert PCB geometry to discretized conductivity arrays |\n| `thermal_solver.py` | Sparse matrix assembly, BDF2 time integration |\n| `pwl_parser.py` | Parse LTspice-style PWL power profiles |\n| `visualization.py` | Generate thermal plots and preview images |\n| `thermal_report.py` | Generate HTML summary report |\n| `thermal_plugin.py` | Orchestrate workflow, KiCad ActionPlugin interface |\n\n---\n\n\n\n## Limitations\n\n- No component/package thermal model (junction → case → pad is not explicitly modeled)\n- Convection is simplified (uniform top/bottom ambient coupling; no airflow field)\n- Radiation is not modeled\n- Via coupling is an approximation (via density enhancement heuristic)\n- Results depend strongly on **Resolution (mm)** and (if used) **Limit Area/Distance**\n- Thermal Pad (User.Eco1) is a simplification of real mechanical contact pressure, interface quality, and sink temperature\n\n---\n\n## Suggested workflow\n\n1. Start with **Limit Area to Pads** enabled and a moderate **Limit Distance** (e.g., 30 mm).\n2. Tune **Resolution** until hotspots are stable (try 0.5 mm then 0.3 mm).\n3. Compare layout variants using the same settings.\n4. Only enable **Thermal Pad (User.Eco1)** if you have a real bottom-side interface in the product.\n\n---\n\n## License / Disclaimer\n\nMIT License\n\nThis plugin provides engineering estimates intended for fast iteration and comparative analysis.\nFor safety-critical or thermally constrained designs, validate with measurement and/or a full 3D thermal tool.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoealex%2Fkicad_thermal_sim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoealex%2Fkicad_thermal_sim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoealex%2Fkicad_thermal_sim/lists"}