| | ---
|
| | license: mit
|
| | viewer: false
|
| | ---
|
| |
|
| | # Description
|
| |
|
| | This dataset contains a set of example simulations using [diffSPH](https://github.com/tum-pbs/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:
|
| |
|
| | ```py
|
| | 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
|
| |
|
| | Initial | Final
|
| | ---|---
|
| | |
|
| | |
|
| |
|
| |
|
| | ## Dual Regions
|
| |
|
| | Initial | Final
|
| | ---|---
|
| | |
|
| | |
|
| |
|
| | ## Quad Regions
|
| |
|
| | Initial | Final
|
| | ---|---
|
| | |
|
| | |
|
| |
|
| | ## Density Pressure Noise
|
| |
|
| | Initial | Final
|
| | ---|---
|
| | |
|
| | |
|
| |
|
| | ## Random Velocity Field
|
| |
|
| | Initial | Final
|
| | ---|---
|
| | |
|
| | |
|
| |
|
| | ## 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
|
| |
|
| | BC | Initial | Final
|
| | ---|---|---
|
| | NoSlip |  | 
|
| | FreeSlip |  | 
|
| |
|
| | ### With an Obstacle
|
| |
|
| | BC | Initial | Final
|
| | ---|---|---
|
| | NoSlip |  | 
|
| | FreeSlip |  | 
|
| |
|
| | ### Bounded Domain
|
| |
|
| | BC | Initial | Final
|
| | ---|---|---
|
| | NoSlip |  | 
|
| | FreeSlip |  | 
|
| |
|
| | ### Both
|
| |
|
| | BC | Initial | Final
|
| | ---|---|---
|
| | NoSlip |  | 
|
| | FreeSlip |  | 
|
| |
|
| |
|
| | ### Taylor Green Vortex
|
| |
|
| | x | Obstacle ? | Domain ?
|
| | ---|---|---
|
| | -| | 
|
| | -||
|
| |
|