This repository contains two MATLAB projects demonstrating the application of finite difference methods:
-
Laplace's Equation Solver: Implements the finite difference method (FDM) to solve Laplace's equation in a 2D grid. This simulation is used to determine the potential distribution in a rectangular domain with specified boundary conditions.
-
Finite Difference Time Domain (FDTD) Simulation: Implements the FDTD method to solve Maxwell's equations in a one-dimensional domain. This simulation includes Mur's absorbing boundary conditions to model wave propagation and absorption.
Both projects are designed to provide a practical understanding of these numerical methods and their applications in computational physics.
- Implement the Finite Difference Method to solve Poisson's and Laplace's equations.
- Apply the Finite Difference Time Domain method to simulate electromagnetic wave propagation.
- Develop MATLAB scripts for solving differential equations and simulating time-domain behavior.
The repository contains the following files:
Laplace.m
- MATLAB script to solve Laplace's equation using the finite difference method.TimeDomain.m
- MATLAB script to solve Maxwell's equations using the finite difference time domain method.
- Solves Laplace's equation using a grid-based finite difference method.
- Allows user-defined boundary conditions for potential on the edges of the grid.
- Provides visualization of the potential distribution using a 3D surface plot.
- Solves Maxwell's equations in a 1D domain using the FDTD method with leap-frog scheme.
- Implements Mur's absorbing boundary conditions to model wave absorption.
- Plots the electric and magnetic field intensities over time to visualize wave propagation.
- MATLAB: The primary programming environment for implementing the finite difference methods and simulations.
- MATLAB Plotting Functions: For visualization of results and field distributions.
- Ensure that MATLAB is properly installed and configured to run the provided scripts.
- The grid resolution and simulation parameters can be adjusted in the scripts to suit different problem sizes and resolutions.
- For theory and detailed explanation of the methods, refer to the Documentation provided.
- Clone the repository or download the project files.
- Open MATLAB and navigate to the directory containing the scripts.
- Run the scripts
Laplace.m
orTimeDomain.m
to execute the simulations.
- Laplace's Equation Solver: Modify boundary conditions and iteration parameters as needed in the script before running.
- FDTD Simulation: Adjust the spatial step, time step, source position, and other parameters according to your simulation needs.
My name is Vikas Prajapati, and I am currently pursuing a BTech in Computer Science and Engineering from IIT Jammu. This project aims to strengthen my understanding of numerical methods by implementing and analyzing the finite difference techniques for solving Laplace's equation and Maxwell's equations.