#

API Docs for: 0.6.1
Show: Inherited Protected Private Deprecated

# SPHSystem Class

Defined in: `src/objects/SPHSystem.js:10`

Smoothed-particle hydrodynamics system

## Constructor

### `SPHSystem`

()

Defined in `src/objects/SPHSystem.js:10`

- Index
- Methods
- Properties

## Item Index

### Methods

- add
- getNeighbors
- remove

### Properties

- density
- smoothingRadius
- viscosity

## Methods

### `add`

(

- `particle`

)

Defined in `src/objects/SPHSystem.js:45`

Add a particle to the system.

#### Parameters:

- `particle` Body

### `getNeighbors`

(

- `particle`
- `neighbors`

)

Defined in `src/objects/SPHSystem.js:72`

Get neighbors within smoothing volume, save in the array neighbors

#### Parameters:

- `particle` Body
- `neighbors` Array

### `remove`

(

- `particle`

)

Defined in `src/objects/SPHSystem.js:57`

Remove a particle from the system.

#### Parameters:

- `particle` Body

## Properties

### `density`

Number

Defined in `src/objects/SPHSystem.js:18`

Density of the system (kg/m3).

### `smoothingRadius`

Number

Defined in `src/objects/SPHSystem.js:24`

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.

### `viscosity`

Number

Defined in `src/objects/SPHSystem.js:32`

Viscosity of the system.