Education and Outreach Blog

« Back

HPC UNIVERSITY BI-WEEKLY CHALLENGE – Bouncing Particles

SUMMARY:
This problem challenges you to create a program in C or Fortran that simulates the described phenomenon.

QUESTION:
Particles in a 2-D environment move in single directions and bounce off walls and each other. Particles move diagonally (Northeast, Southeast, Northwest, or Southwest), one square per time step, with no change in velocity. 20 particles are initially placed in an environment in random positions, moving in random initial directions (Northeast, Southeast, Northwest, or Southwest). The particles move for 5 time steps, and the environment is 11 squares wide by 12 squares high.

To help with validation and verification of your program, you must include a simple text-based or other kind of visualization that shows each time step of the simulation, e.g. using "o"s to represent particles, "|"s to represent vertical walls, "-"s to represent horizontal walls, and " "s to represent empty spaces.

SOLUTION:
Will be posted July 28, 2014

LINK:
http://hpcuniversity.org/students/weeklyChallenge/79

Comments
Trackback URL: