This Fortran program solve the 2D homogeneous heat equation
with Dirichlet boundary conditions on a cartesian grid. It uses a cartesian parallelization to speed up the computation.
Follow these steps
- Install MPI if needed by running
sudo apt install libopenmpi-dev openmpi-bin -yin the Bash terminal in Ubuntu/Linux. - Set up the parameter file
parameters.f90. Specify the number of iterations, the domain size and the number of grid points. - Open the bash script
deploy.shand specify the number of processorsXinmpirun -np X ./heated_plate_mpi.x - Change the permissions of the bash script by running
chmod +x deploy.shin the Bash terminal in Ubuntu/Linux. - Run
./deploy.shin the Bash terminal in Ubuntu/Linux to start the computation.
The code uses an Euler explicit scheme for time integration and centred finite differences for the spatial derivatives. The integration time step is determined on the grid size to ensure numerical stability
Works for squared domains and an equal number of grid points along