In this guide, we will walk you through setting up and running SPlisHSPlasH, a Smoothed-Particle Hydrodynamics (SPH) simulator available via the Inductiva API.
We will cover:
Configuring SPlisHSPlasH simulations using the Inductiva API.
Example code to help you get started with simulations.
Available benchmarks to test SPlisHSPlasH’s performance.
SPlisHSPlasH#
SPlisHSPlasH is a Smoothed-Particle Hydrodynamics (SPH) simulator that
is widely used for simulating fluid dynamics across a variety of applications.
Simulations are typically configured using a single .json
file, which
defines the geometry, fluid properties, boundary conditions, numerical
parameters, and output settings. Additional geometry files may also be
required in some cases.
Example Code#
Below is an example of running a simple SPlisHSPlasH simulation via the Inductiva API:
"""SPlisHSPlasH example."""
import inductiva
# Instantiate machine group
machine_group = inductiva.resources.MachineGroup("c2-standard-4")
machine_group.start()
input_dir = inductiva.utils.download_from_url(
"https://storage.googleapis.com/inductiva-api-demo-files/"
"splishsplash-input-example.zip",
unzip=True)
# Set simulation input directory
splishsplash = inductiva.simulators.SplishSplash()
task = splishsplash.run(input_dir=input_dir,
sim_config_filename="config.json",
on=machine_group)
task.wait()
task.download_outputs()
machine_group.terminate()
Available Benchmarks for SPlisHSPlasH#
The following benchmarks are available to test SPlisHSPlasH’s performance:
Fluid Cube S: This benchmark replicates the example in this tutorial, using the deafult values.
Fluid Cube L: This benchmark mirrors the benchmark Fluid Cube S in all aspects except for the particle radius, which has been decreased to 0.0045 and the fluid model, that was doubled in all axis.
Fluid Cube M: This benchmark mirrors the Fluid Cube S benchmark in all aspects except for the particle radius, which has been decreased to 0.0045.
What to Read Next#
You may want to explore the following tutorial, where we demonstrate how to generate synthetic data for training Physics-ML models using SPlisHSPlasH: