DOCS // PYRO 0.4.1

Forces

[[forces]] push on the gas inside a sphere, a box or everywhere while they are on: push, point, vortex, turbulence, drag and expand, the last a blast that shoves everything outward. A spec may have any number.

Kinds

KindWhat it does
pushPushes along direction, like a fan.
pointPushes away from the center, or toward it with a negative strength; it acts on the gas only.
vortexSpins the gas around direction as the axis, by the right-hand rule: a fire whirl.
turbulenceRandom gusts in one place.
dragSlows the gas: a still pocket behind a wall.
expandAdds volume, so everything around is pushed outward: a blast. Give it a short window, such as a tenth of a second.

Example

The fire whirl example spins a ground fire into a column and draws air in at its foot:

fire_whirl.pyro.toml (excerpt)
# The spin: around the vertical axis, up the whole column, on air and gas alike.
[[forces]]
kind = "vortex"
shape = "box"
position_m = [0, 4, 0]
size_m = [1.3, 4, 1.3]
direction = [0, 1, 0]
strength = 14
max_speed_mps = 4
falloff = 0.4

# Air drawn in at the foot, which is what keeps a real whirl narrow.
[[forces]]
kind = "point"
position_m = [0, 1.2, 0]
size_m = 2.0
strength = -6
falloff = 0.6

Fields

FieldMeaningDefault
kindpush, point, vortex, turbulence, drag or expandpush
shapesphere, box or everywheresphere
position_mCenter of the region, of a point force and of a vortex (t)[0, 1, 0]
size_mRadius of a sphere; half-extents of a box (t)1.0
rotation_degTurns the region and its direction (t)[0, 0, 0]
falloffShare of the way to the edge over which the force fades (t); 0 is a hard edge0.5
strengthMeters per second gained each second (t); for drag and expand a rate per second. Negative reverses push, point, vortex and expand.10
directionWhich way a push pushes, or the axis of a vortex (t)[0, 1, 0]
max_speed_mpsStops adding speed to gas already this fast (t); 0 never stops0
acts_onall (air and gas, like a fan) or gas (clear air is left alone)all
start_s, end_sWhen it is on; end_s = 0 never stops0, 0

The pressure solve runs after the forces, so a push that would pile gas up against a wall is cancelled, as it would be in air. expand keeps its effect because it is part of the pressure solve.