quadcopter_with_PID_controller
Quadcopter dynamics simulation with two proportional–integral–derivative (PID) controllers that adjust the motor speeds…
C++ SPH/N-body library and standalone GUI application, mainly designed for astrophysical simulations
git clone https://github.com/pavelsevecek/OpenSPH.gitpavelsevecek/OpenSPHSee also the render gallery.
OpenSPH is a library and a GUI application for hydrodynamic and N-body simulations. It uses SPH discretization in space and currently is specialized for simulations of asteroid impacts. The code is being developed on Astronomical Institute of Charles University. It aims to provide a fast, versatile and easily extensible SPH solver utilizing modern CPU features (SSE/AVX instruction sets).
OpenSPH can be easily installed using the MSI installer.
The latest version can be downloaded as a Debian buster package. Install it via:
sudo dpkg -i opensph_0.4.1-1.deb
The package contains three executables:
opensph - main program with graphical interfaceopensph-cli - command-line utility allowing to run simulations set up by opensphopensph-info - command-line utility for quick inspection of metadata of OpenSPH output filesOpenSPH package can be build from AUR, using e.g. trizen:
trizen -S opensph
The code is in the FreeBSD ports collection (big thanks to Yuri) and can be installed using:
pkg install OpenSPH
The code can be downloaded from GitLab repository. Using git, you can clone the code with
git clone https://gitlab.com/sevecekp/sph.git cd sph
To get the latest (experimental) version, switch to develomnent branch using
git checkout devel
The code uses many c++14 features, so a reasonably new version of a C++ compiler is necessary. The compilation has been tested on gcc 6.3.1 and clang 4.0.0. Prerequisities of the code are:
Another optional dependencies of the code are:
-DWITH_TBB=ON)-DWITH_EIGEN=ON)-DWITH_CHAISCRIPT=ON)-DWITH_VDB=ON)The compilation should be as easy as
mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. make
By default, OpenSPH uses a custom thread pool for parallelization. It is possible to use Intel TBB library instead, using:
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_TBB=ON ..
Alternatively, the code can be compiled using qmake build system.
Simulations can be easily set up in the graphical application opensph, using a node-based editor.
To use one of the simulation templates, click 'Project -> New session' and select
one of the presets. Alternatively, see the category 'presets' on the right side of the
editor.
To start a simulation, either select 'Start run' from the 'Simulation' menu, or right-click
any node and select 'Evaluate'.
For simulations of asteroid impacts, select the 'collision' or the 'fragmentation and reaccumulation' preset. The default simulation uses the following:
OpenSPH contains useful tools for visualization of particles. It allows rendering
individual spherical particles as well as rendering of isosurface, reconstructed
from particles. The color palette can be specified from arbitrary state quantities,
making it easy to visualize particle velocities, internal energy, etc.
The surface of bodies can be also textured with an arbitrary bitmap image.
Besides the orthographic and perspective projection, a fisheye
camera for fulldome animations and a spherical 360° camera can be used.
It is certainly possible to use to library without the GUI executable and use the SPH or N-body solvers in other applications. There examples explain how to do that.
See documentation
See changelog
Feel free to contact me at sevecek@sirrah.troja.mff.cuni.cz. Any feedback is highly appreciated.
more like this
Quadcopter dynamics simulation with two proportional–integral–derivative (PID) controllers that adjust the motor speeds…
A sandbox game created in C using raylib, featuring various types of falling pixels, such as sand or water. (more in th…
A crowd simulation and visualization demo implemented in Unity using Dijkstra Distance Field and simplified version of…
search projects, people, and tags