Code Monkey home page Code Monkey logo

fastfluiddynamics's Introduction

CONTROLS:

  • q -- quit.
  • v -- show the velocity vector field.
  • s -- start/stop simulation.
  • d -- show divergence of velocity field.(red means positive, green negative)
  • left click -- drop something into the fluid.
  • right click -- set source/target of force acting on the fluid

The goal of this project was that I learn how to use ocaml. The program is supposed to implement a fast and unprecise 2d-Navier-Stokes solver from the paper

http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/GDC03.pdf

I learned how to use opengl through lablgl from the examples here:

https://github.com/youjinbou/lablgl/tree/master/LablGlut/examples/lablGL

and got some hints from (the outdated examples) here

http://www.linux-nantes.org/~fmonnier/OCaml/GL/ocaml-opengl-howto.en.html

I am working with fedora 29. In addition to installing basic ocaml stuff, I did:

dnf install ocaml-camlp4 ocaml-camlp4-devel freeglut-devel freeglut ocaml-ocamlbuild ocaml-ocamlbuild-devel ocaml-num-devel ocaml-num

Here is how I made an opam switch that works:

opam switch create opengl ocaml-system.4.07.0

(You can find out what the last argument should be with 'opam switch list') and then

opam install lablgl opam install core

then

make

should build a 'main' executable.

fastfluiddynamics's People

Contributors

felixwellen avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.