SPHSystem class

Smoothed-particle hydrodynamics system @todo Make parameters customizable in the constructor

Constructors

SPHSystem()

Properties

densities Map<int, double>
getter/setter pair
density double
Density of the system (kg/m3). @default 1
getter/setter pair
eps double
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
neighbors List<List<Body>>
getter/setter pair
particles List<Body>
The particles array.
getter/setter pair
pressures Map<int, double>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
smoothingRadius double
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
getter/setter pair
speedOfSound double
getter/setter pair
viscosity double
Viscosity of the system. @default 0.01
getter/setter pair

Methods

add(Body particle) → void
Add a particle to the system.
getNeighbors(Body particle, List<Body> neighbors) → void
Get neighbors within smoothing volume, save in the array neighbors
gradw(Vec3 rVec, Vec3 resultVec) → void
nablaw(double r) double
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(Body particle) → void
Remove a particle from the system.
toString() String
A string representation of this object.
inherited
update() → void
w(double r) double

Operators

operator ==(Object other) bool
The equality operator.
inherited