for now we just code explicit solution for heat equation in 1D and 2.
###Table of contents Finite Diferences for heat equation in 1D
Finite Diferences for heat equation in 2D
##Finite Diferences for heat equation in 1D.
Explicit solution in 1D directory
mkdir build
cd build
cmake ../
make
./fdtd_1D < ../in
keep in mind that fdtd_1D executable receives the following parameters that you can put in file in:
- xa: init position in X
- xb: last position in X
- ta: init value in time
- tb: last value in time
- N: number of point to calculate heat value
- T: number of steps in time.
- gamma: heat difusion value in equation.
remove build directory and exec in terminal
./run.sh
the output example image is "image.jpg"
this program had been tested with these papers:
##Finite Diferences for heat equation in 2D (rectangular objects)
Explicit solution in 2D directory
###Compile and Run in 2D directory type:
./run.sh
executable file is ./build/fdtd_2d and its input file is in2d and have de following parameters:
- xa: init position in X
- xb: last postition in X
- ya: init position in y
- yb: last position in y
- ta: init time
- tb: last time
- Nx: discretization points in X
- Ny: discretization points in Y
- T: discretization points in time
- k: heat difusion value in equation
###Output output values are init state and last state of heat in object.
###Runing and ploting example
in 2D directory delete build dir (if you have it ) and run:
./run.sh
./plot_Example
this is a little example of rectangular object with a center heat source and plot in files time0.png and timeT.png the init and end heat state of object
###References two dimensional heat equation with FD