Skip to content

A fluid simulation environment in Unity. Allows for configuration of physical properties of liquids, external forces that act on the liquid, obstacles and simulation parameters.

Notifications You must be signed in to change notification settings

EternalColor/SPH-Simulation-Environment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPH-Simulation-Environment

Description

The main part of this work was the evaluation and implementation of a user interface that allows the various parameters of the simulation, such as viscosity, density, particle count, external forces (gravity and wind), obstacles, or color selection, to be controlled in real time. This allows users to observe the behavior of liquids in a wide variety of scenarios. In addition, presets for fluid types such as water, lava, honey, alcohol, and oil were created so that users can quickly switch between simulation scenarios.

The underlying SPH-Algorithm was optimized with a spatial grid. This allowed the time complexity to be optimized from O(n²) to O(n). Additional functionalities such as saving and loading the simulation configuration as JSON files, validation of user input, and free camera movement are also available. Unit and integration tests for the core functionalities were created to confirm the physically correct behavior of the simulation.

Most Important Features

Change fluid parameters

UI Element Particles
FluidParameterUIElement.mp4
FluidParameterParticles.mp4

Change external forces

UI Element Particles
Gravity.webm
GravityParticles.webm

Choose from different fluid presets

UI Element Particles
FluidPresetUIElement.mp4
FluidPresetParticlesForGithub.mp4

Add obstacles to the simulation

UI Element Particles
ObstaclesUIElement.webm
ObstaclesParticles.webm

Control the simulation

UI Element Particles
StartStopUIElement.webm
StartStopResetParticles.webm

Change fluid colors

UI Element Particles
FarbeUIElement.webm
FarbeParticles.webm

Screenshots

Simulation of wave patterns in water inside a narrow container Simulation of water reacting with wind and obstacles

About

A fluid simulation environment in Unity. Allows for configuration of physical properties of liquids, external forces that act on the liquid, obstacles and simulation parameters.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published