{"id":19280247,"url":"https://github.com/jwwtc/mpiheatequation","last_synced_at":"2025-10-05T16:45:33.250Z","repository":{"id":191067731,"uuid":"582807999","full_name":"jwwtc/mpiHeatEquation","owner":"jwwtc","description":"A Parallelized Solution of the 2D Heat Conduction Equation on a Square Plate Using MPI.","archived":false,"fork":false,"pushed_at":"2025-06-17T01:06:11.000Z","size":24442,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-17T02:20:05.191Z","etag":null,"topics":["heat-transfer","mpi-parallelization","numerical-methods"],"latest_commit_sha":null,"homepage":"","language":"C","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/jwwtc.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}},"created_at":"2022-12-27T23:28:31.000Z","updated_at":"2025-06-17T01:06:15.000Z","dependencies_parsed_at":"2023-08-28T00:36:12.331Z","dependency_job_id":null,"html_url":"https://github.com/jwwtc/mpiHeatEquation","commit_stats":null,"previous_names":["jwwtc/mpiheatequation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jwwtc/mpiHeatEquation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwwtc%2FmpiHeatEquation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwwtc%2FmpiHeatEquation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwwtc%2FmpiHeatEquation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwwtc%2FmpiHeatEquation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwwtc","download_url":"https://codeload.github.com/jwwtc/mpiHeatEquation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwwtc%2FmpiHeatEquation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278486267,"owners_count":25994941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","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":["heat-transfer","mpi-parallelization","numerical-methods"],"created_at":"2024-11-09T21:17:29.422Z","updated_at":"2025-10-05T16:45:33.244Z","avatar_url":"https://github.com/jwwtc.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mpiHeatEquation\n\n## Abstract\nOverall, MPI parallelization is a powerful tool for improving the efficiency and accuracy of heat conduction simulations, and it has numerous applications in various fields of engineering and science. Here, we are presenting the parallelized solution of the two-dimensional heat conduction equation on a square plate. We leverage collective communications and certain MPI functions to achieve convergence to the analytical solution. Metrics of scalability are widely used to illustrate the ability of both hardware and software to deliver greater compute with more hardware. Thus, we will also perform a weak and a strong scaling analysis of our program.\n\n### Theory\nFor the numerical solution, we time-match:\n\n$\\frac{\\partial \\theta}{\\partial t}=\\kappa\\left(\\frac{\\partial^2 \\theta}{\\partial x^2}+\\frac{\\partial^2 \\theta}{\\partial y^2}\\right)$\n\nto a steady-state solution on a uniform mesh, with the following finite difference approximation:\n\n$\\frac{\\theta_{i, j}^{t+1}-\\theta_{i, j}^t}{\\delta \\mathrm{t}}=\\left(\\frac{\\theta_{i+1, j}^t-2 \\theta_{i, j}^t+\\theta_{i-1, j}^t}{\\delta x^2}+\\frac{\\theta_{i, j+1}^t-2 \\theta_{i, j}^t+\\theta_{i, j-1}^t}{\\delta \\mathrm{y}^2}\\right)$\n\nAs for the analytical solution, this is given by the Fourier series:\n\n$\\theta(x, y)=\\sum_{n=1,3,5, \\ldots}^{\\infty} \\frac{4 \\theta_N}{n \\pi} \\sin \\left(\\frac{n \\pi x}{L}\\right) \\sinh \\left(\\frac{n \\pi y}{L}\\right) / \\sinh (n \\pi)$,\n\nwhich is asymptotically correct. $L$ is the length of the plate’s edge and $\\theta_{N}$ is the constant temperature on the plate’s top side. Regarding time-stepping and numerical stability, we made sure that $\\mathrm{dt}\u003c0.25 \\mathrm{dx}^2 / \\kappa$.\n\n## Sample Results\n\n### Numerical and Analytical Solutions Comparison\n\nSurface Plot            |  Contour Plot\n:-------------------------:|:-------------------------:\n\u003cimg src=\"figures/numerical-temp-surf.png\" style=\"width:600px;\"/\u003e  |  \u003cimg src=\"figures/comparison_temp.png\" style=\"width:600px;\"/\u003e\n\n\n### Strong Scaling\n\nSpeedup            |  Time\n:-------------------------:|:-------------------------:\n\u003cimg src=\"figures/strong-scaling_speedup.png\" style=\"width:600px;\"/\u003e  |  \u003cimg src=\"figures/strong-scaling_time.png\" style=\"width:600px;\"/\u003e\n\n#### To compile\n```\nmake\n```\n\n#### To run\n```\nmpiexec -n \u003cnumber of processes\u003e ./main.exe\n```\n\nThe provided `Makefile` assumes `mpicc` is available in your `PATH`. Feel free to\nadjust the `CC` variable if your MPI compiler uses a different name.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwwtc%2Fmpiheatequation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwwtc%2Fmpiheatequation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwwtc%2Fmpiheatequation/lists"}