{"id":50663740,"url":"https://github.com/314arhaam/heat-pinn","last_synced_at":"2026-06-08T04:31:36.783Z","repository":{"id":201299250,"uuid":"427419422","full_name":"314arhaam/heat-pinn","owner":"314arhaam","description":"A Physics-Informed Neural Network to solve 2D steady-state heat equations.","archived":false,"fork":false,"pushed_at":"2026-05-25T01:56:58.000Z","size":2340,"stargazers_count":182,"open_issues_count":1,"forks_count":25,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-05-25T03:25:01.740Z","etag":null,"topics":["chemical-engineering","deep-learning","finite-difference","heat-equation","heat-transfer","machine-learning","partial-differential-equations","physics","physics-informed-ml","physics-informed-neural-networks","process-engineering","python3"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/314arhaam.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2021-11-12T16:06:33.000Z","updated_at":"2026-05-23T14:06:15.000Z","dependencies_parsed_at":"2024-05-22T18:41:01.977Z","dependency_job_id":"8f78ffac-4f28-4831-9361-e4cd96108d54","html_url":"https://github.com/314arhaam/heat-pinn","commit_stats":{"total_commits":64,"total_committers":1,"mean_commits":64.0,"dds":0.0,"last_synced_commit":"57c77361f8190202458e0bb979adb3fda0e6df86"},"previous_names":["314arhaam/heat-pinn"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/314arhaam/heat-pinn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/314arhaam%2Fheat-pinn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/314arhaam%2Fheat-pinn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/314arhaam%2Fheat-pinn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/314arhaam%2Fheat-pinn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/314arhaam","download_url":"https://codeload.github.com/314arhaam/heat-pinn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/314arhaam%2Fheat-pinn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34048681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"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":["chemical-engineering","deep-learning","finite-difference","heat-equation","heat-transfer","machine-learning","partial-differential-equations","physics","physics-informed-ml","physics-informed-neural-networks","process-engineering","python3"],"created_at":"2026-06-08T04:31:36.038Z","updated_at":"2026-06-08T04:31:36.778Z","avatar_url":"https://github.com/314arhaam.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/314arhaam/heat-pinn/blob/main/assets/2023-11-08-19-09-09_EDIT.org.png\" width=\"360\" title=\"Heat-PINN; made by EDIT.org\"\u003e\n\u003c/p\u003e  \n\n[![CI](https://github.com/314arhaam/heat-pinn/actions/workflows/ci.yml/badge.svg)](https://github.com/314arhaam/heat-pinn/actions/workflows/ci.yml)\n\n[![Validation-CPU](https://github.com/314arhaam/heat-pinn/actions/workflows/validation.yml/badge.svg)](https://github.com/314arhaam/heat-pinn/actions/workflows/validation.yml)\n\n# Heat-PINN\n\n\u003cp\u003e A Physics-Informed Neural Network, to solve 2D steady-state heat equation based on the methodology, introduced in: \u003ca href=\"https://arxiv.org/abs/1711.10561\"\u003ePhysics Informed Deep Learning (Part I): Data-driven Solutions of Nonlinear Partial Differential Equations. \u003c/a\u003e\u003c/p\u003e  \n\n## **Table of Contents**\n - [Introduction](#intro)\n - [Results](#res)\n\n\n## Introduction \u003ca name=\"intro\"\u003e\u003c/a\u003e\nIn this project, a PINN is trained to solve a 2D heat equation and the final results is compared to a solution based on FDM method. \nFor more detailts about the project read [this](https://github.com/314arhaam/burger-pinn).\n### Problem\nThe governing equation:  \n\n$$\n\\Theta = \\frac{T - T_{\\textbf{min}}}{T_{\\textbf{max}}-T_{\\textbf{min}}}\n$$   \n\n$$ \n\\nabla^2{\\Theta} = (\\partial_{xx}+\\partial_{yy})\\Theta=0\n$$  \n\nin the following domain:  \n  \n\n$$  \nD = \\\\{ (x, y)|-1\\le x \\le +1 \\land -1\\le y \\le +1 \\\\}\n$$  \n\nWith the following boundary conditions:\n  \n\n$$\n\\begin{equation}\n  \\begin{cases}\n    T(-1, y) = 75.0 \\degree{C}\\\\\n    T(+1, y) = 0.0 \\degree{C}\\\\\n    T(x, -1) = 50.0 \\degree{C}\\\\  \n    T(x, +1) = 0.0 \\degree{C}\\\\\n  \\end{cases}\n\\end{equation}\n$$  \n  \nWhen normalized:  \n\n$$\n\\begin{equation}\n  \\begin{cases}\n    \\Theta(-1, y) = 1\\\\\n    \\Theta(+1, y) = 0\\\\\n    \\Theta(x, -1) = \\frac{2}{3}\\\\  \n    \\Theta(x, +1) = 0\\\\\n  \\end{cases}\n\\end{equation}\n$$\n\n## Heat-PINN CLI\n\n### Installation\n\n### Build\n\n```\n.-----------------------------------------------------------------------.\n|.##.....#.#######....###...#######........########.###.##....#.##....##|\n|.##.....#.##........##.##.....##..........##.....#..##.###...#.###...##|\n|.##.....#.##.......##...##....##..........##.....#..##.####..#.####..##|\n|.########.######..##.....#....##...######.########..##.##.##.#.##.##.##|\n|.##.....#.##......########....##..........##........##.##..###.##..####|\n|.##.....#.##......##.....#....##..........##........##.##...##.##...###|\n|.##.....#.#######.##.....#....##..........##.......###.##....#.##....##|\n'-----------------------------------------------------------------------'\n\nusage: heat build [-h] [--in-shape IN_SHAPE] [--out-shape OUT_SHAPE]\n                  [--n-hidden-layers N_HIDDEN_LAYERS]\n                  [--neuron-per-layer NEURON_PER_LAYER] [--actfun ACTFUN]\n                  [--name NAME]\n\noptions:\n  -h, --help            show this help message and exit\n  --in-shape IN_SHAPE   Shape of the input tensor to feed into NN. Equal to\n                        the number of independent variables of PDE.\n  --out-shape OUT_SHAPE\n                        Shape of the output tensor of NN. For heat transfer\n                        it's T (equal to 1)\n  --n-hidden-layers N_HIDDEN_LAYERS\n                        Number of hidden layers in the NN\n  --neuron-per-layer NEURON_PER_LAYER\n                        Number of neurons in each hidden layer\n  --actfun ACTFUN       Activation function\n  --name NAME           Name of the model.\n```\n### Train\n```\n.-----------------------------------------------------------------------.\n|.##.....#.#######....###...#######........########.###.##....#.##....##|\n|.##.....#.##........##.##.....##..........##.....#..##.###...#.###...##|\n|.##.....#.##.......##...##....##..........##.....#..##.####..#.####..##|\n|.########.######..##.....#....##...######.########..##.##.##.#.##.##.##|\n|.##.....#.##......########....##..........##........##.##..###.##..####|\n|.##.....#.##......##.....#....##..........##........##.##...##.##...###|\n|.##.....#.#######.##.....#....##..........##.......###.##....#.##....##|\n'-----------------------------------------------------------------------'\n\nusage: heat train [-h] [--domain DOMAIN] [--boundary BOUNDARY] [--model MODEL]\n                  [-l LR] [--epochs EPOCHS] [--every EVERY]\n\noptions:\n  -h, --help            show this help message and exit\n  --domain DOMAIN       Path of domain data file\n  --boundary BOUNDARY   Path of boundary data file\n  --model MODEL         Path of model file\n  -l LR, --lr LR, --learning-rate LR\n                        Learning rate for the optimizer\n  --epochs EPOCHS       Number of training epochs\n  --every EVERY         Print result for every n epochs\n```\n### Inference\n```\n.-----------------------------------------------------------------------.\n|.##.....#.#######....###...#######........########.###.##....#.##....##|\n|.##.....#.##........##.##.....##..........##.....#..##.###...#.###...##|\n|.##.....#.##.......##...##....##..........##.....#..##.####..#.####..##|\n|.########.######..##.....#....##...######.########..##.##.##.#.##.##.##|\n|.##.....#.##......########....##..........##........##.##..###.##..####|\n|.##.....#.##......##.....#....##..........##........##.##...##.##...###|\n|.##.....#.#######.##.....#....##..........##.......###.##....#.##....##|\n'-----------------------------------------------------------------------'\n\nusage: heat infer [-h] [--data DATA] [--model MODEL] [--output OUTPUT]\n\noptions:\n  -h, --help       show this help message and exit\n  --data DATA      Path of data file to perform inference\n  --model MODEL    Path of model file\n  --output OUTPUT  Path of output data file\n```\n\n## Validation \u003ca name=\"res\"\u003e\u003c/a\u003e\n  \n### Square geometry \n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/314arhaam/heat-pinn/blob/main/assets/results_compare.png\" title=\"pinn-vs-fdm\"\u003e\n\u003c/p\u003e \n\nTemperature profiles:  \n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/314arhaam/heat-pinn/blob/main/assets/profiles.png\" title=\"profiles\"\u003e\n\u003c/p\u003e\n\n## Results \u003ca name=\"res\"\u003e\u003c/a\u003e\n\n### Doughnut geometry\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/314arhaam/heat-pinn/blob/main/assets/heat_pinn_doughnotts.png\" title=\"doughnotts\"\u003e\n\u003c/p\u003e\n\n### Screw \n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/314arhaam/heat-pinn/blob/main/assets/screw.png\" title=\"screw\"\u003e\n\u003c/p\u003e\n\n### Connecting Rod\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/314arhaam/heat-pinn/blob/main/assets/rod.png\" title=\"conn-rod\"\u003e\n\u003c/p\u003e\n\n### Gear geometry\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/314arhaam/heat-pinn/blob/main/assets/symgear.png\" title=\"symgear\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/314arhaam/heat-pinn/blob/main/assets/asymgear.png\" title=\"asymgear\"\u003e\n\u003c/p\u003e\n\n\n## Performance Comparison\nResults obtained from a [9 layered DNN](https://github.com/314arhaam/heat-pinn/blob/main/assets/model_plot.png) (1000 epochs) and FDM code on a 100×100 grid. The FDM code is written in Python.\n|**Method**|**Computation time (s)**|\n|-|-|\n|PINN|66.35|\n|FDM|77.60|\n\n\n## Note\nThis implementation is based on [Tensorflow 2.0](https://www.tensorflow.org/guide/effective_tf2) package and made possible by [Google Colabratory](https://colab.research.google.com) GPU.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F314arhaam%2Fheat-pinn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F314arhaam%2Fheat-pinn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F314arhaam%2Fheat-pinn/lists"}