{"id":47071840,"url":"https://github.com/dukesmith0/pytherm","last_synced_at":"2026-04-08T09:01:05.719Z","repository":{"id":342160028,"uuid":"1172357214","full_name":"dukesmith0/pytherm","owner":"dukesmith0","description":"Interactive 2D heat conduction simulator. Paint materials onto a grid and watch Fourier's law in action. PyQt6 desktop app with a real-time FDM solver.","archived":false,"fork":false,"pushed_at":"2026-03-12T04:01:28.000Z","size":2232,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-12T10:24:16.611Z","etag":null,"topics":["desktop-app","engineering","fdm","heat-transfer","numpy","physics-simulation","pyqt6","python","simulation","thermal"],"latest_commit_sha":null,"homepage":"https://dukesmith0.github.io/pytherm/","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/dukesmith0.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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-03-04T08:06:58.000Z","updated_at":"2026-03-12T04:01:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dukesmith0/pytherm","commit_stats":null,"previous_names":["dukesmith0/pytherm"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/dukesmith0/pytherm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dukesmith0%2Fpytherm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dukesmith0%2Fpytherm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dukesmith0%2Fpytherm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dukesmith0%2Fpytherm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dukesmith0","download_url":"https://codeload.github.com/dukesmith0/pytherm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dukesmith0%2Fpytherm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31547845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"online","status_checked_at":"2026-04-08T02:00:06.127Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["desktop-app","engineering","fdm","heat-transfer","numpy","physics-simulation","pyqt6","python","simulation","thermal"],"created_at":"2026-03-12T06:00:26.296Z","updated_at":"2026-04-08T09:01:05.711Z","avatar_url":"https://github.com/dukesmith0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![PyTherm](docs/media/banner.svg)\n\n[![version](https://img.shields.io/badge/version-1.1.0-blue)](https://github.com/dukesmith0/pytherm/releases)\n[![build](https://img.shields.io/github/actions/workflow/status/dukesmith0/pytherm/build.yml?label=build)](https://github.com/dukesmith0/pytherm/actions)\n[![license](https://img.shields.io/badge/license-MIT-green)](LICENSE)\n[![python](https://img.shields.io/badge/python-3.10+-yellow)](https://python.org)\n[![tests](https://img.shields.io/badge/tests-161%20passed-brightgreen)]()\n\n**PyTherm** is a 2D heat conduction simulator I built to explore how heat moves through different materials. Paint a grid of real engineering materials, set up heat sources and boundary conditions, and watch Fourier conduction happen in real time.\n\nUnder the hood it's an explicit finite-difference solver with per-cell CFL sub-stepping, harmonic-mean conductivity at material interfaces, and a library of 196 built-in materials. The whole thing runs on Python, PyQt6, and NumPy.\n\n![Example](docs/media/example.gif)\n\n## Quick Start\n\n### Standalone executable (no install)\n\nGrab the latest build from the [Releases page](https://github.com/dukesmith0/pytherm/releases):\n\n| Platform | File |\n|----------|------|\n| Windows | `PyTherm-Windows.exe` |\n| macOS | `PyTherm-macOS` |\n| Linux | `PyTherm-Linux` |\n\n\u003e **Windows:** The exe is unsigned. SmartScreen will warn on first launch -- click \"More info\" then \"Run anyway.\"\n\n### From source\n\n```sh\ngit clone https://github.com/dukesmith0/pytherm.git\ncd pytherm\npip install -r requirements.txt\npython main.py\n```\n\nRequires Python 3.10+ with PyQt6 and NumPy.\n\n## What it does\n\n### Physics engine\n\n- Solves the 2D transient heat equation using explicit FDM\n- Harmonic mean of k at material interfaces (correct for thermal series)\n- Per-cell CFL sub-stepping -- up to 2000x more efficient than a global CFL bound on mixed grids\n- Fixed-temperature sources, constant heat flux (W/m^2 or W/m^3), and per-edge boundary conditions\n- Real-time energy conservation tracking\n\n### Materials\n\n- 196 built-in materials across 26+ subcategories (metals, ceramics, polymers, gases, liquids, electronics, etc.)\n- Custom material editor with import/export\n\n### Visualization\n\n- Material view, temperature heatmap, and heat flow rate -- three view modes\n- Heat flow vector arrows with auto-decimation\n- Isotherm contour lines and hotspot highlighting\n- 4 color palettes (Classic, Viridis, Plasma, Grayscale) with reverse option\n- Floating color legend, convergence graph, temperature-vs-time plots\n- Light and dark themes\n\n### Tools\n\n- Draw, fill, select, copy/paste, undo/redo\n- Thermal resistance report (R_th = dT/Q)\n- Step history navigation, smooth step animation\n- Command palette (Ctrl+Shift+P), 30+ keyboard shortcuts\n- Save/load `.pytherm` files, export PNG and CSV\n- 15 example templates\n\n## How the solver works\n\n```\n1. Compute harmonic-mean interface conductances (k_r, k_l, k_u, k_d)\n2. Per-cell CFL: dt_safe = 0.9 * min(rho_cp / k_sum) * dx^2\n3. Sub-step: T_new = T + dt * flux * inv_rho_cp\n4. Inject heat flux: dT += flux_q * dt / rho_cp\n5. Re-pin fixed-T cells\n```\n\n| Decision | Why |\n|----------|-----|\n| Harmonic mean of k | Correct for materials in series -- arithmetic mean over-predicts by ~4000x |\n| Center-cell rho*Cp | Each cell stores its own energy; interface-averaging violates conservation |\n| Per-cell CFL | Global bound is ~2000x too conservative on mixed-material grids |\n| Explicit Euler | CFL guarantees stability; simple, vectorizable, good enough for interactive use |\n| Kelvin internally | No negative-temperature edge cases; unit conversion only at display layer |\n\n## Scope and limitations\n\nPyTherm models 2D transient conduction through heterogeneous isotropic materials with constant properties. It does **not** model convection, radiation, phase change, 3D geometry, contact resistance, or temperature-dependent material properties.\n\nThis makes it good for thermal layout studies, teaching, and first-order engineering estimates. For anything that needs certification or high accuracy, use a proper FEA/CFD tool.\n\n## Keyboard shortcuts\n\n| Key | Action |\n|-----|--------|\n| Space | Play / Pause |\n| R | Reset |\n| D / S / W | Draw / Select / Fill |\n| Q | Cycle view (Material / Heatmap / Heat Flow) |\n| F | Fit to window |\n| G | Grid lines |\n| P | Protect cells |\n| [ / ] | Step history back / forward |\n| Ctrl+Shift+P | Command palette |\n| Ctrl+/ | Full shortcuts list |\n\n## References\n\nMaterial properties sourced from:\n\n\u003e Incropera, F.P. et al. (2011). *Fundamentals of Heat and Mass Transfer*, 7th ed. Wiley.\n\n## License\n\nMIT -- Craig \"Duke\" Smith, 2026. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdukesmith0%2Fpytherm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdukesmith0%2Fpytherm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdukesmith0%2Fpytherm/lists"}