GithubHelp home page GithubHelp logo

2d-smoothed-particle-hydrodynamics's Introduction

Author:         Austin Brennan
University:     Clemson University
Course:         2D Fluid Simulation
Professor:      Dr. Jerry Tessendorf
Due Date:       3/8/2016


Purpose:

The purpose of this assignment is to get a better understanding of how
smoothed particle hydrodynmics (SPH) approach to fluid simulation / particle
dynamics works. This program simulates SPH in two dimensions for the


Extra Features:

I have included several extra features on top of the project requirements.
These include a party mode that can be activated with the command line flag
-party_mode. It can also be toggled on and off with the 'p' key.

I also made the w/a/s/d keys switch the direction of gravity to
up/left/down/right respectively.

Another feature I added is a dampening factor on particle bounces. This is
a scalar multiplier, which reduces or increases the output velocity of a
particle after it collides with a boundary. Try increasing and decreasing
the percentage of energy retained on a bounce with the ,/. keys.

I encourage you to try playing with this features, and see how they effect
the simulation.


Usage:
./sph_fluid_simulator [-update_method (LF or S for leap frog or sixth)] [-output_path output_path]
                      [-write_on_start 0 or 1 for off or on]  [-party_mode (0 or 1 for off or on)]

The flags can be set in any order. And have default values of:
-update_method: S
-output_path: ./output_path
-output
-party_mode: 0 (off)


sph_fluid_simulator keyboard choices
./,      increase/decrease % of energy retained after bounce
p        turn on party mode. Randomizes particle color on collison
w/a/s/d  switches gravity to point up/left/down/right
spacebar paused the simulation. pressing it again un-pauses the simulation
o        toggle writing to output_path
q        exits the program

2d-smoothed-particle-hydrodynamics's People

Contributors

awbrenn avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.