Combustion and explosions
Skill ferret-physics-combustion-explosions · download all skills · SKILL.md
When to use#
A gun, a rocket, an engine, a boiler that can burst, a grenade, a crater, danger rings for a charge.
The model#
combustion models burning in a closed space and using the pressure: chambers, guns (fireGun), rockets (nozzle), engines, jets, boilers. explosions turns energy into blast: overpressure and impulse by scaled distance (blastAt, radiusFor), shielding by bodies, fragments and spall from a Casing, armour that stops them, craters (craterRadius, CraterLaw per soil), and vessels that burst (vesselTnt). Bodies get impulse I · A.
Steps#
- Enable
explosion(andstrengthif bodies must break;terrainfor craters). detonate({ at, tnt })or{ vessel: { pressure, volume, gamma }, burst, casing, seed }.- Shield by putting a body between; set
transmission; walls break byrupture. - Guns and rockets: build the spec, fire, read
peakPressure,muzzleVelocity; hand a burst's pressure and volume todetonate. - Commands:
explosion.detonate|info|preview,chamber.ignite,gun.fire,engine.start.
Check afterwards#
Eight times the charge gives twice the radius; rocket thrust rises with altitude by Δp_a · A_e; a barrel rated below peak pressure bursts.
What usually goes wrong#
- Nothing moves: below
minPressureat that distance, or shielded. - Nothing breaks:
ruptureisInfinityby default. - Wrong crater: no terrain, an
airburst, or soil missing fromcraters. ignite()false: outside flammability limits, no oxygen or fuel.- Different fragments each time: pass a
seed.
Files#
reference/combustion.md— Burning in a closed space and using the pressure: guns, rockets, petrol and diesel engines, jets, boilers and gas cylinders that burst.reference/explosions.md— Blast waves, shielding, craters, casings that throw fragments, armour that stops them, and vessels that burst.reference/api-physics-combustion.md— every export of@ferret/physics-combustionwith signature and doc commentreference/api-physics-explosions.md— every export of@ferret/physics-explosionswith signature and doc commentreference/commands.md— 11 commands of these packages with their argumentsrecipes/blasts-and-ground.md— Seven recipes: danger rings, a crater in sand and in rock, a charge buried too deep, a crater in a real terrain, a wall that shields, an underwater burst, a trench that holds or slumps.recipes/tank-fire.md— A fire heats a sealed tank, the gas inside warms and its pressure climbs, the shell gives way and the tank becomes a blast with fragments that push a crate. Heat, links, gas, explosions and bodies in one loop.