This repository delves into the numerical solution of the Heat Equation using the innovative Deep Galerkin Method (DGM) and the DeepXDE library. As a benchmark, the solutions obtained using DGM are compared with those derived from the traditional Finite Difference Method (FDM).
The Heat Equation is a fundamental partial differential equation (PDE) that describes how temperature changes over space and time. While traditional methods like the Finite Difference Method have been employed for decades to solve it, recent advances in deep learning present alternative methodologies, like the Deep Galerkin Method, offering potentially faster and more accurate solutions.
In this repository, we explore how the Deep Galerkin Method, in tandem with the DeepXDE library, can be employed to solve the Heat Equation and how these solutions stand in comparison to those obtained from the FDM.
Prerequisites: Ensure you have Python 3.x installed.
-
Clone the repository:
git clone https://github.com/shadzzz90/Heat-Equation-using-Deep-Galerkin-Method.git
-
Navigate into the directory:
cd Heat-Equation-using-Deep-Galerkin-Method
-
(Optional) Create a virtual environment:
python -m venv env source env/bin/activate # On Windows, use `env\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
Each method (DGM and FDM) is encapsulated in separate Python scripts. To run any of the scripts:
python [script_name].py
Replace [script_name]
with the desired script, e.g., dgmModel.py
.
-
Deep Galerkin Method: A contemporary approach leveraging deep learning to solve the Heat Equation.
-
Finite Difference Method: Traditional numerical technique used as a benchmark for comparison.
-
DeepXDE Integration: Utilizing the DeepXDE library to facilitate and streamline the solution process using DGM.
This project is under the MIT License. See the LICENSE.md file for details.
Of course! I'll integrate a references section into the README for the specified resources.
-
Deep Galerkin Method (DGM):
- Sirignano, J., & Spiliopoulos, K. (2018). DGM: A deep learning algorithm for solving partial differential equations. Journal of Computational Physics, 375, 1339-1364.
-
DeepXDE Library:
- Lu, L., Meng, X., Mao, Z., & Karniadakis, G. E. (2019). DeepXDE: A deep learning library for solving differential equations. arXiv preprint arXiv:1907.04502. ...
Happy computing!