Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SPHSystem

Smoothed-particle hydrodynamics system

todo

Make parameters customizable in the constructor

Hierarchy

  • SPHSystem

Index

Constructors

constructor

Properties

density

density: number

Density of the system (kg/m3).

default

1

particles

particles: Body[]

The particles array.

smoothingRadius

smoothingRadius: number

Distance below which two particles are considered to be neighbors. It should be adjusted so there are about 15-20 neighbor particles within this radius.

default

1

viscosity

viscosity: number

Viscosity of the system.

default

0.01

Methods

add

  • add(particle: Body): void

getNeighbors

  • getNeighbors(particle: Body, neighbors: Body[]): void
  • Get neighbors within smoothing volume, save in the array neighbors

    Parameters

    Returns void

remove

  • remove(particle: Body): void