Git Product home page Git Product logo

stardem's Introduction

This is the code corresponding to the article "StarDEM: efficient discrete element method for star-shaped particles".

https://github.com/schreckc

*************************

Dependency:
Eigen3
qt5

**************

Compilation:
$ cd QGLViewer
$ qmake
$ make
$ sudo make install
$ cd ..
$ qmake dem2d.pro
$ make

Change the number of threads used by OpenMP:
$ export OMP_NUM_THREADS=1

**************

Script to reproduce the examples of the article: 
(to display the timings add the option -verbose)

Packing:
  * random shapes
    $ ./packing.sh
  * spheres
    $ ./packing.sh 1
  * crosses
    $ ./packing.sh 2
  * butterflies
    $ ./packing.sh 3
  * bats
    $ ./packing.sh 4
Bridge:
  * random shapes
    $ ./bridge.sh    
  * flowers
    $ ./bridge.sh 1
  * blobs
    $ ./bridge.sh 2
  * blobs + visualization of the force network
    $ ./bridge.sh 3
  * moths
    $ ./bridge.sh 4
  * cogs
    $ ./bridge.sh 5	
Drum:
   * random shapes
    $ ./drum.sh
   * flowers
    $ ./drum.sh 1
   * peanuts
    $ ./drum.sh 2
   * rocks
    $ ./drum.sh 3
Column collapsing
   * random shapes
    $ ./rest_angle.sh
   * pears
    $ ./rest_angle.sh 1
   * dragonflies
    $ ./rest_angle.sh 2
   * rocks
    $ ./rest_angle.sh 3


********************************
    
Usage:
$ ./dem2d -c <config file> -s <scene file>

To get all the option
$ ./dem -h 

Keyboard shortcut and displacements: see help window (Keyboard tab).

************

Work in progress:
  - import/export to replay a simulation
  - dynamic obstacle
  - svg export

********************

No-graphics mode:
The simulation runs without displaying the results on the viewer. The results have to be recorded using the -export option.
The results can then be replayed using -import in the graphics mode. Each frame is recorded in a custom format based on the obj format:

# comment
ns <number of smarticles> <radius>
v x0 y0 # coordinates of each smarticles
v x1 y1
... 
v xn yn
r a0 # rotation of each smarticles
r a1
...
r an

To use the no-graphics mode:
$ qmake dem2d_nographics.pro
$ make
$ ./dem_ng <options>


**************

Toogle light/dark mode with the _WHITE macro (or just uncomment the line in dem_conf_hpp)

***********

Examples of configuration files and scene files are in examples_article


stardem's People

Contributors

schreckc avatar

Stargazers

XuWANG avatar  avatar

Watchers

 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.