CMSC 491/691: Computer Animation

Assignment 5
Fluids II: Pressure and Gravity
Due Dec 12, 2017 at 11:59 PM

Before you start

You will be doing your work this semester in a class git repository. Before you get started on any of the assignments, you should fetch yourself a copy of your personal repository following these directions. Your personal class respoitory on the UMBC GL/Linux systems is /afs/umbc.edu/users/a/d/adamb/pub/491/your-user-name.git

The Assignment

For this assignment, you must write a C or C++ program that will compute pressure forces and gravity, completing your fluid simulation. I have put sample input files in your git repositories.

Input file format

The main input file will be in the wonderfully awesome super extensible .json format. You might want to use this format in future projects. Every since I discovered it I use it in every serious project I do. This file will specify the main simulation parameters and one particle file. Particle fils

The first line will be the number of particles. Each subsequent line will have six floating point values giving the initial position (x, y, z) and velocity (u, v, w) of the particle.

You can run my program here:

~adamb/public/Fluids/fluid input2.json output-%05d.part

More details

Add gravity in the z-direction, enforce slip boundary conditions, compute a pressure field and subtract the gradient of the pressure to enforce the divergence free condition.

Resources

Foster and Metaxas's 1996 liquids paper (PIC)
Mark Carlson's 2004 thesis. See Chapter 3
Robert Bridson's course notes

Extra Credit

For 50 extra points implement Conjugate Gradient.

For 30 extra points implement the MIC(0) precoditioner (see Bridson's course notes above).

For 30 extra points implement viscosity.

What to turn in

Turn in this assignment electronically by pushing your source code to your class git repository by 11:59 PM on the day of the deadline. Do your development in the proj1 directory so we can find it. Be sure the Makefile will build your project when we run 'make' (or edit it so it will). Also include a README.txt file telling us about your assignment. Do not forget to tell us what (if any) help did you receive from books, web sites or people other than the instructor and TA.

Check in along the way with useful checkin messages. We will be looking at your development process, so a complete and perfectly working ray tracer submitted in a single checkin one minute before the deadline will NOT get full credit. Do be sure to check in all of your source code, Makefile, README, and updated .gitignore file, but no build files, log files, generated images, zip files, libraries, or other non-code content.

To make sure you have the submission process working, you must do at least one commit and push by the friday before the deadline.