1 / 24

Lukasz Grzegorz Maciak Micheal Alexis

Simulation of Long-Term Interaction of Spiral Waves in Excitable Media Modeled by Cellular Automata using a 20-CPU Linux Cluster. Lukasz Grzegorz Maciak Micheal Alexis. Faculty Supervisor: Dr. Roman Zaritski CMPT 680-01 Parallel Architectures and Algorithms. Excitable Media.

marinel
Download Presentation

Lukasz Grzegorz Maciak Micheal Alexis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Simulation of Long-Term Interaction of Spiral Waves in Excitable Media Modeled by Cellular Automata using a 20-CPU Linux Cluster Lukasz Grzegorz Maciak Micheal Alexis Faculty Supervisor: Dr. Roman Zaritski CMPT 680-01 Parallel Architectures and Algorithms

  2. Excitable Media • Definition of Excitable Media: • An excitable medium is a nonlinear dynamical system which has the following properties: • The capacity to propagate a wave of some description • Inability to support the passing of another wave until a certain amount of refractory time has passed • Examples of Excitable Media in Nature: • Forest Fire • Cardiac Muscle Tissue Excited Wave Propagating Outwards Refractory Area – cannot be excited

  3. Cellular Automaton • Excitable media can be modeled using the Cellular Automaton Theory: • Cells on a grid are assigned discrete values • Values are updated based on the state of the neighboring cells according to some rules. • Example: • Conway’s Game of Life: Dead Cell Live Cell

  4. Cellular Automata Rules for Excitable Media • The state of each cell is described by 2 values: Excitation (U) and Refraction (V) • The cell is Excited if U≥1 • The cell stops being excited (U=0) if 0<V<0.6 • Rules: • If the value of U>0.3 then U=V=1 • If the value of V<0.6 then U=0 • While V>0 decrement V by 0.01

  5. Cellular Automata Rules for Excitable Media • Rules Continued: • The current value of U is determined based on the state of either 4 or 8 neighboring cells using rules for diffusion (discretization of Laplace Operator) Based on the U value of U in the neighboring cells U value of CELL is updated in small increments.

  6. Cellular Automata Rules for Excitable Media Unexcited Cell (U diffuses) Excited Cell Unexcited Cell Value of U Value of V Excited Cell (V decreases) Unexcited Cell (Refractory State)

  7. Implementing Computer Simulation • Implementation in C++ • 20 CPU Linux Cluster (located in RI 109) • MPI library (parallel communication) • OpenGL library (data visualization) • LPThread library (the graphical display functions)

  8. Implementation Details • 1000 x 2000 Rectangular Grid • Cells on the edges of the grid are always unexcited (u:0v:0) • Using Vertical Domain Slicing to divide workload among the 20 CPU’s • Using MPI Send and Receive Functions to exchange cell values on borders between each “chunk” …

  9. Parallelization Issues – Domain Slicing Problem CPU A CPU B CELL1 depends on points 1,2,3,5,7,8, 9 and CELL2 but 3, 9 and CELL2 values belong to CPUB

  10. Work Distribution Master Node (Control) OpenGL Graphical Thread 1st Chunk 2nd Chunk … 19th Chunk

  11. Diffusion Coefficient Cellular Automaton Rules - Implementation Diffusion of U: (*uu)(i,j) =U+2.76*D*dt/dx/dx*((*u)(i+1,j)+(*u)(i-1,j)+(*u)(i,j+1)+(*u)(i,j-1)-4*U); Change of V: if (V>0) { V=V-0.01; if (V<0.6) (*uu)(i,j)=0; } else { if(((*uu)(i,j)>0.3)&&((*uu)(i,j)<1)) { (*uu)(i,j)=1.0; V=1.0; } } (*uu)(i,j) =U+2.76*D*dt/dx/dx*((*u)(i+1,j)+(*u)(i-1,j)+(*u)(i,j+1)+(*u)(i,j-1) +(*u)(i-1,j-1) +(*u)(i-1,j+1) +(*u)(i+1,j-1) +(*u)(i+1,j+1)-8*U); V decrement Refraction Threshold Ignition Threshold

  12. Parallel Communication • MPI Library functions MPI_Send and MPI_Recv are used for communication • The U and V values on the “chunk” border need to be swapped among CPU’s MPI Code Samples: MPI_Send((void*)uu->GetColumnPtr(L_min_2), N_plus_1, MPIFPTYPE, right, 11+DiscrTime, MPI::COMM_WORLD); MPI_Recv((void*)u->GetColumnPtr((k-1)*(L-2)), L*(N+1), MPIFPTYPE, ltor[k], k, MPI::COMM_WORLD, status);

  13. Excited Cells Refractory Cells Initiating Spiral Waves Intersecting squares of Excited and Refractory cells produce 2 Spiral Waves Spiral Wave is a unique configuration of Excited and Refractory cells – it will spin forever, and it cannot be destroyed by collisions with other waves

  14. Spiral Wave Rotation • The Size of the • Rotation Core Depends on: • Ignition threshold • Refraction threshold • V decrement size • U diffusion coefficient Rotation Core Spiral Wave Tip Spiral Wave rotates around a core – this makes it move around on the grid and makes it collide with other waves – which alters the direction of the spin.

  15. Computer Simulation Initial Setup – Randomly placed intersecting squares. This picture represents the state several generations old.

  16. Computer Simulation Spiral Waves are Forming (4 neighbor diffusion)

  17. Computer Simulation Runtime 5-10 minutes (4 neighbor diffusion)

  18. Speedup Analysis Using 8 neighbors we get much smoother waves.

  19. Computer Simulation Formation of Spiral Wave Pairs (8 neighbors)

  20. Computer Simulation Multiple Spiral Wave Clusters forming

  21. Computer Simulation Spiral Wave Pair becomes the dominant feature

  22. Computer Simulation Runtime 5-6 hours: single Spiral Wave dominates the grid

  23. Speedup Analysis

  24. FUTURE DIRECTIONS • Using different boundary conditions • Continuous Domain (Cylinder, Taurus) • Reflective Boundaries • Discovering effective ways to eliminate spiral ways • Long term statistical analysis of Spiral Wave behavior: • What are the optimal conditions for forming pairs and triplets? • What is the least time needed for a triplet to form? • Is there a time period after which we can safely say, that if no pairs have formed, it is unlikely that they will form at all?

More Related