C and MATLAB code to compute the numerical solution of the 1D Diffusion equation using Crank-Nicolson differencing on a periodic domain.
- Change directory into the /C folder and run the Makefile
cd ./C
make
running make
creates an executable called diff
.
- Run the executable for default parameters (these can be manually changed in the C/diffusion.c file)
./diff
this will run the code and save the solution data in Data/C-Data
directory
You can analyse the solution data by running the plot.py script in the parent directory
python3 plot.py
this script computes the