DOCS // PYRO 0.4.1

The spec file

A spec is a TOML file ending in .pyro.toml with the sections [meta], [domain], [[emitters]], [[forces]], [[obstacles]], [solver], [look], [[views]] and [export]. Units are meters, seconds and kelvin.

Layout

The origin is the center of the box floor, and +Y is up. Every field you leave out takes its default, and an unknown key is an error. Here is the shipped fireball example in full:

fireball.pyro.toml
# A ground burst that swells, rolls and rises. One-shot.
[meta]
name = "fireball"
notes = "Ground burst that swells, rolls and rises"

[domain]
size_m = [12, 16, 12]
voxel_m = 0.08
duration_s = 4.0

[[emitters]]
shape = "sphere"
position_m = [0, 0.7, 0]
size_m = 1.2
start_s = 0.0
end_s = 0.18
fuel = 5
temperature_k = 1900
smoke = 1.5
velocity_mps = 7

[solver]
# Burning needs air, so the ball burns at its rolling surface instead of all at once.
air_limit = 0.88
burn_rate = 10
smoke_fade = 1.1

[look]
exposure = 1.2

[export]
pacing = "front"

Sections

SectionHolds
[meta]name, seed (for every random choice) and free-text notes.
[domain]The simulated box: size_m, voxel_m (cell edge at final; draft doubles it), duration_s, sim_fps, substeps, open_faces, ground, ambient_k. The largest grid is 256 x 384 x 256 cells.
[[emitters]]One or more sources: see Emitters.
[[forces]]Optional placed forces: see Forces.
[[obstacles]]Optional solids: see Obstacles.
[solver]One per element: burning, buoyancy, cooling, fade, swirl, turbulence, wind and drag, shared by every emitter.
[look]One per element: exposure, smoke density and the smoke and dust colors (linear light, so 0.2 already shows as mid grey).
[[views]]Cameras. The default view is side-on (pitch_deg = 0) and frames itself (fit = "auto"); each view writes its own sheet set.
[export]Sheet grid and tile size, channels, format (png8, png16 or exr), pack, pacing and the loop settings.

Solver precision

solver.precision, new in 0.4.1, sets the size of the numbers that hold the gas velocity.

ValueMeans
"half" (default)16 bit numbers, the faster choice. Rounding puts back a little of the divergence the pressure solve removed, and the report's stored_divergence says how much.
"full"32 bit numbers, which keep what the solve reached, at the cost of more simulation time and 24 bytes more GPU memory a cell.

solver.pressure_accuracy (default 0.01, from 0.00001 to 0.5) is the leftover divergence the solve aims for. The solve runs as many cycles as that takes and stops early only when two cycles in a row no longer help; PRESSURE_LOOSE then reports it. Ask for "full" when you set an accuracy finer than the default.

[solver]
precision = "full"
pressure_accuracy = 0.001

Loops

A loop sets [export] loop = true, loop_blend_frames and warmup_s (time simulated before the first frame, long enough to reach the steady state). domain.duration_s is the loop length, and the emitter runs for ever (end_s = 1000).

Fields that change over time are covered in Values over time.