Chemistry · const

SHAPE_SLAB

A parcel's depth, as nested shells of equal mass.

Explained in Chemistry.

const SHAPE_SLAB = 0
import { SHAPE_SLAB } from '@driftengine/chemistry';

In depth

Without this a fire model cannot be right, and §4 is the argument. The time for a heat front to reach depth d goes as ρ·c·d²/k. For wood that is about six seconds at one millimetre and four hours at fifty, so a parcel with a single temperature is wrong by that whole factor — in the direction that flashes every log in the world over at once. Thin things ignite and thick things do not, and nothing else in the model produces that.

Equal mass rather than equal thickness, which for a cylinder or a sphere puts the resolution where the gradient is: the outer shell of a large object is thin and the core is fat. For a slab the two are the same thing, because a slab's cross-section does not shrink inward.

Shell 0 is the surface and shell count - 1 is the core.

The fractions here are pure functions of a shape and a count, so they are computed once per substance at registration and multiplied by a parcel's own depth at use. That is not tidiness: Math.cbrt is not exactly specified by ECMAScript, and §15 keeps every operation the specification declines to pin down off the simulation path.