Presentation is loading. Please wait.

Presentation is loading. Please wait.

Solving the heat equation using ADI method

Similar presentations


Presentation on theme: "Solving the heat equation using ADI method"— Presentation transcript:

1 Solving the heat equation using ADI method

2 ADI Method ADI is Alternating Direction Implicit Method.
It is finite difference method to solve the parabolic ,hyperbolic, elliptical PDE’s. It splits the finite difference equations into two, one with the x-derivative taken implicitly and the next with the y-derivative taken implicitly.

3 ADI Method to Heat equation
Solve Step 1: y-direction fixed Step 2: x-direction fixed α α

4 ADI Method to Heat equation
Step 1: Step 2:

5 Step 1(Predictor) Predicted solutions are shown in red and corrected solutions are in black

6 Step 2(Corrector) Predicted solutions are shown in red and corrected solutions are in black

7 ADI Method to Heat equation
Step 1: [Ax].Ujn+1/2 = Rxi,j where Ax = I + Cx Cx = a Ujn+1/2 = Rxi,j = Uj at the time step n+1/2 is solved by the tridiagonal algorithms with the unknowns ordered by rows I = 1 to M-1.

8 ADI Method to Heat equation
Step 2: [Ay].Uin+1 = Ryi,j where Ay = I + Cy Cy = b Uin+1 = Ryi,j = Ui at the time step n+1 is solved by columns j =1 to N-1.

9 Peaceman-Rachford scheme
Splitting step 1 and 2 equations using Peaceman- Rachford scheme Where F0x=(alpha*dt)/(2*dx*dx) F0y=(alpha*dt)/(2*dy*dy)

10 By Simplifying those equations

11

12 Algorithm An outline of numerical algorithm is:
Compute Ax_m, Ax_p, Ay_m, and Ay_p. Solve Ax_m.Un+1/2 = Ay_p.Un and Ay_m.Un+1 = Ax_p. Un+1/2 . Update U for all interior grid points.

13 Sequential Implementation
Initialize variables NX, NY, dt, Time, Lx, Ly and Alpha. Calculate dx, dy, 𝑓 𝑜𝑥 , 𝑓 𝑜𝑦 Assign initial temperatures. Calculate matrices Ax_m, Ax_p, Ay_m and Ay_p. Use LU factorization for Ax_m, Ay_m matrices For each time step Solve Ax_m . 𝑈 𝑛+1/2 =Ay_p . 𝑈 𝑛 Solve Ay_m . 𝑈 𝑛+1 =Ax_p . 𝑈 𝑛+1/2 dt is time step, Time is end of time evolving, Lx,Ly are domain length and width, alpha. dx=Lx/(Nx-1),dy=Ly/(Ny-1);

14 Libraries Used Numerical libraries (Open Source)
TNT (Template Numerical Toolkit) JAMA (Java Matrix Package) Time taken for this implementation: 2 sec (appox.) including Ax_m, Ax_p, Ay_m, Ay_p calculation with Nx=100, Ny=50, Lx=1.0, Ly=1.0, alpha=0.2 and Time = with dt=0.015.

15 Results The grid size is n = 100. The top boundary has temperature of 20.0 at the ends and in the middle. The bottom, left and right boundaries have a temperature of 20.0 at the ends and 0.0 inside the room.

16 Parallel Implementation
cuSPARSE library. 3 Kernel functions Matrix calculation (Ax_m, Ax_p, Ay_m, Ay_p). Solving step 1 and step 2 equations. Update U.

17 Thank you.

18 Questions?? & Suggestions


Download ppt "Solving the heat equation using ADI method"

Similar presentations


Ads by Google