Description
This dataset contains a set of example simulations using diffSPH. A dataloader and further information is available as part of diffSPH.
Simulation Setup
The general simulation setup:
- Domain Size: $1[m]\times 1[m]$ ($[-0.5, 0.5]^2$)
- Particle Count: $128 \times 128 = 16384$
- Particle size: $1/ (128\times 128) = 0.000061035[m^2]$
- Neighborhood Size: $45.228$ neighbors per particle
- Rest Density: $1 [kg/m^2]$
- Timestepping: Fixed $\Delta t = 1 [ms]$
- Integration Scheme: Symplectic Euler for WCSPH, RK2 for compressible SPH
- SPH Formulation: $\delta^+$-SPH for WCSPH, CRKSPH for compressible SPH
- Shifting Scheme: $\delta^+$-SPH for WCSPH only
- Boundary Handling Scheme: MDBC
- Viscosity: $\delta^+$-SPH, $\operatorname{Re}=2000$
Data Layout:
Each simulation is stored as a single hdf5 file with meta information available about the simulation configuration and parameters. Each timestep is a seperate group under the simulationData group. For more information on how to process the data, see diffSPH. To load the data using diffSPH you can simply:
import torch
import matplotlib.pyplot as plt
import warnings
from tqdm import TqdmExperimentalWarning
warnings.filterwarnings("ignore", category=TqdmExperimentalWarning)
from tqdm.autonotebook import tqdm
from diffSPH.plotting import visualizeParticles, updatePlot
from diffSPH.operations import sph_op
from diffSPH.kernels import getSPHKernelv2
from diffSPH.dataLoader import *
from BasisConvolution.convLayerv3 import BasisConvLayer
configuration = DataConfiguration(
frameDistance=1,
frameSpacing=1,
maxRollout=1,
historyLength=1,
skipInitialFrames=0,
cutoff=0
)
folder = './data/compressible/circleCase'
processed = processFolder(folder, configuration)
for file in processed:
print(f'File: {file["fileName"]}, FrameCount: {len(file["frames"])}, Samples: {len(file["samples"])}, Style: {file["style"]}, Number of samples: {len(processed[0]["samples"])}, first sample: {processed[0]["samples"][0]}, last sample: {processed[0]["samples"][-1]}')
dataset, datasetLoader = getDataLoader(processed, 4, shuffle = True)
datasetIter = iter(datasetLoader)
nextData = next(datasetIter)
priorStates, currentState, trajectoryStates, domains, rotMats, configs, neighborhoods = loadAugmentedBatch(
dataset, nextData, configuration, device = 'cuda', dtype = torch.float32,
augmentAngle = False,
)
fig, axis = plt.subplots(1, len(nextData), figsize=(len(nextData) * 4, 5), squeeze = False)
plots = []
axes = axis.flatten()
for b in range(len(domains)):
plot = visualizeParticles(fig, axes[b],
particles = currentState,
domain = domains[b],
quantity = currentState.densities,
which = 'both',
mapping = 'L2',
cmap = 'viridis',
visualizeBoth=True,
kernel = kernelNameToKernel(configs[b]['kernel']),
plotDomain = True,
gridVisualization=False, markerSize=2,
batch = b, streamLines = False)
axes[b].set_title(f'Batch {b} {nextData[b]} - t={currentState.time[b]:.2f}s,')
plots.append(plot)
fig.tight_layout()
diffSPH contains more examples on how to then use this data for training with both CConv networks and GNNs.
Dataset Overview
Compressible SPH
All simulations have 12 initial conditions available to them. For region cases the density and pressure are randomized per region, for the other cases there is a uniform octave noise across the domain to sample the density and pressure field, and the velocity field as divergence free
Circular Regions
Dual Regions
Quad Regions
Density Pressure Noise
Random Velocity Field
Weakly Compressible SPH
Each simulaiton has 16 initial conditions available, except for the Taylor Green Vortex like initial conditions which are initialized for 2 and 4 vortices only.
Periodic Domains
With an Obstacle
Bounded Domain
Both
Taylor Green Vortex
- Downloads last month
- 506







































