| Schedule | LabAssignments | LabInstructions |
Lab Eight
Particle Class
Properties
- Mass
- Position
- Velocity
- Drag coefficient
Methods
- Update (increments position and velocity)
Simulation Class
Inputs
- Wind vector
- List of particles with initial positions and velocities
- Time step
Methods
- Step
- Evolve
- Write data
Output
Rather than CSV formatted output, we're going to create VTK files, so that we can make a movie of our work. For each time step, write out a data set that contains all of the particle positions (and optionally the velocities).
Example of how to write out VTK polydata.
Initial Conditions
Let's assume we have 7 spheres with equal drag coefficients, but unequal masses. The particles are aligned along x = z = 0, starting from the origin, and separated by two meters each. At the start of the simulation, the particles are all launched with the same initial velocity.
- Wind
- ( -10, 2, 0 )
- Drag coefficient
- 1
- Initial velocities
- ( 10, 0, 10 )
- Masses
- ( 0.1, 0.2, 0.5, 1, 2, 5, 10 )
- Positions
-
x = z = 0
y = ( 0, 2, 4, 6,..., 12 )
Visualization
Using ParaView or VTK, make a series of images from your simulation. Embed the first and last steps in your wiki page write up, and tar up the rest, in a file named FirstnameLastname.tar. Place the tar file in this folder in my home directory: /home/rpwagner/dropbox.
Attachments
- points.tar.gz (1.8 KB) - added by rpwagner 2 years ago.
- points.pvd (0.8 KB) - added by rpwagner 2 years ago.
