Fluid Visualization - The code compilation is only tested on Arch Linux x86_64

Fluid Visualization

The code compilation is only tested on Arch Linux x86_64, Linux kernel 5.15.13-arch1, with gcc 11.1.0, CMake 3.22.1, Xorg X server 21.1.3, currently it does not support MSVC ver. CLI.

Build with

mkdir build
cmake -G Ninja -B ./build
cmake --build ./build -j

The binaries are in build/bin.

Run the example by

cd ./build/bin
./SPHInterface -s data/TwoCubes.json

Since cache needs to be warmed up, FPS will rise after a few seconds in, ideally 30 with iterate=5, NParticles=13k on AMD 5900X.

You can find the first scene settings in data/TwoCubes.json, all of which are very self-explanatory.

Almost all code is in src/ directory for convenience, if one intends to add a solver, follow these steps:

  • Check Solver.hpp and Solver.cpp for the definition of base class.
  • Create new files in the src/ directory, e.g. NewSolver.hpp and NewSolver.cpp, be sure to add makeNewSolver() in your source code.
  • Add your solver to src/IncludeSolvers.h, then set your index of solver in scene settings. (Until of the date of writing the report, this feature has not been completed yet).

This project has two implementations of NSearch, one is in our code and the other one is imported by etc/Ext_NSearch.cmake. You can switch between them by changing makeNSearch to or from makeNSearchExt.

This interface contains several navigation features:

  • Drag with middle mouse button to rotate orbitally.
  • Drag with right mouse button to zoom in and out.
  • Press to pause the simulation, you can still navigate around when the simulation is paused.
  • Press to take the snapshot for particle positions, which is saved in the working directory.

In order to use the mesher in build/bin/VDBMesher, two parameters are required, the filename, i.e. particles_1920.txt, and the scale factor. Due to the limit of kernel size, which can be very small, our simulation is not performed on physical based measurement, therefore the particles might be scaled down by a factor scale so the final mesh output can be limited to an acceptable range. Generally, with simulation kernel radius of $3$, the scale is set to be approximately $0.6$, which exports a reasonable mesh.

The output file is always named fluid.obj, which is exported to the working directory.

Owner
krr
CS Student | 2F8E 583D EBD3 7A22
krr
Similar Resources

This is the source code for Mirai. The compilation method has been simplified a little and some modifications have been made.

Mirai BotNet to Tashiro(未来砲) Leaked Linux.Mirai Source Code for Research/IoT Development Purposes Uploaded for research purposes and so we can develop

Jul 30, 2022

Linux x86_64 Process Injection Utility | Manipulate Processes With Customized Payloads (beta)

Linux x86_64 Process Injection Utility | Manipulate Processes With Customized Payloads (beta)

K55 - Linux x86_64 Process Injection Utility (C++11) About K55 (pronounced: "kay fifty-five") The K55 payload injection tool is used for injecting x86

Sep 5, 2022

Valve's Steam Deck kernel (5.13.10; x86_64; linux-neptune)

Linux kernel ============ There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML an

Aug 6, 2022

Visualization Library is a C++ middleware for high-performance 2D and 3D graphics applications based on OpenGL 1.x-4.x supporting Windows, Linux and Mac OS X.

Visualization Library 2.2 Gallery About Visualization Library is a C++ middleware for high-performance 2D and 3D graphics applications based on the in

Nov 8, 2022

"Zero setup" cross-compilation for a wide variety of architectures.

"Zero setup" cross-compilation for a wide variety of architectures. xcross includes compact docker images and a build utility for minimal setup C/C++ cross-compiling, inspired by rust-embedded/cross

Nov 10, 2022

Ziggified GLFW bindings with 100% API coverage, zero-fuss installation, cross compilation, and more.

mach/glfw - Ziggified GLFW bindings Ziggified GLFW bindings that Mach engine uses, with 100% API coverage, zero-fuss installation, cross compilation,

Dec 27, 2022

A collection of tools, libraries, and tests for Vulkan shader compilation.

Shaderc A collection of tools, libraries and tests for shader compilation. At the moment it includes: glslc, a command line compiler for GLSL/HLSL to

Dec 29, 2022

An x86_64 operating system

An x86_64 operating system

Vigil Vigil is a x86_64 operating system. Features Booted by Limine using the stivale2 protocol Physical memory manager Virtual memory manager "Slab"

Aug 17, 2022

x86_64, PE32+, FAT32 bootloader

x86_64, PE32+, FAT32 bootloader

carboot This project is a small x86_64 bootloader capable of reading FAT32 and mapping PE32+ images. It is the bootloader for carbon and is designed t

Jun 3, 2022
Optimized Linux kernel for Arch / Arch-based distros

Linux kernel ============ There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML an

Oct 5, 2022
A simple wrapper for 'pacman' with a syntax similar to 'apt' to help people transitioning to Arch and Arch based distributions like Manjaro.

aptpac aptpac is a program which helps with the transition to Arch Linux and Arch based distros like Manjaro. It simplifies using pacman as it works l

Dec 4, 2022
Offline fluid simulation solver adopted from https://github.com/doyubkim/fluid-engine-dev.
Offline fluid simulation solver adopted from https://github.com/doyubkim/fluid-engine-dev.

FluidEngine This is a fluid simulation engine for computer graphics applications. I adopt it from Doyub Kim's fluid-engine-dev. It's built on C++11 an

Oct 26, 2022
A PIC/FLIP fluid simulation based on the methods found in Robert Bridson's "Fluid Simulation for Computer Graphics"
A PIC/FLIP fluid simulation based on the methods found in Robert Bridson's

GridFluidSim3d This program is an implementation of a PIC/FLIP liquid fluid simulation written in C++11 based on methods described in Robert Bridson's

Dec 8, 2022
Real-time 2D fluid simulator with lots of visualization options.
Real-time 2D fluid simulator with lots of visualization options.

Fluid Simulator Building Start by cloning the program and all submodules using the following command: git clone --recursive https://github.com/linusmo

Dec 14, 2022
learning how to use arch and linux in general
learning how to use arch and linux in general

dotfilesPEROEPICO what I use distro: arch wm: dwm launchers: sxhkd & dmenu, j4-dmenu-desktop browser: firefox (sponsorskip, privacy badger, ublock ori

Nov 12, 2021
This is a compilation of the code and images for all Arduino code in the Robotics 11 class.
This is a compilation of the code and images for all Arduino code in the Robotics 11 class.

Robotics 11 - Arduino This is a compilation of the code and images for all Arduino code in the Robotics 11 class. All code can be viewed in each proje

Oct 29, 2021
EVA3: using hellsgate in EVA to get the syscalls [tested with cobalt strike 4.3]
 EVA3: using hellsgate in EVA to get the syscalls [tested with cobalt strike 4.3]

EVA3: using hellsgate in EVA to get the syscalls [tested with cobalt strike 4.3] note that i dont claim that the idea is mine, this repo is probably

Oct 29, 2022
Some extensions for windows explorer, tested on windows 10+

WindowsExplorerExtension Extensions for windows explorer, tested on windows 10 & windows 11. New Folder Extension What's This A Gnome nautilus inspire

Jan 13, 2022
A cross platform shader language with multi-threaded offline compilation or platform shader source code generation
A cross platform shader language with multi-threaded offline compilation or platform shader source code generation

A cross platform shader language with multi-threaded offline compilation or platform shader source code generation. Output json reflection info and c++ header with your shaders structs, fx-like techniques and compile time branch evaluation via (uber-shader) "permutations".

Dec 14, 2022