FERRETGame engine over Babylon.js
Ferret

Heat

Skill ferret-physics-heat · download all skills · SKILL.md

When to use#

Anything that warms, cools, melts, boils or weakens: pots, beams, walls, brakes, tanks.

The model#

A HeatNetwork of parts (mass, material, temperature T, optional power, area, h) joined by links. Phase change holds the temperature (273.15 K, 373.15 K) until the latent heat is paid. strengthFactor(material, T) gives what is left of the cold strength (about 40 % at 873 K for steel). There is no pressure model here: use GasVolume and a link.

Steps#

  1. net.addPart({ name, mass, material, T, power?, area?, h? }); materials from HeatLibrary.
  2. Join parts (net.join, wallConductance); give area and h for loss to the ambient.
  3. net.step(dt) (2–10 Hz is enough for steel parts).
  4. React to heat:phase, heat:over, heat:ignite.
  5. Heat from friction: attach a part to a body (attach); more in ferret-physics-links.

Check afterwards#

Boiling 1 kg on 2 kW takes about 170 s to the boil and 1130 s to boil off; energy closes unless you set T by hand.

What usually goes wrong#

  • Temperature never changes: no source, no link, no area and h.
  • Phase never changes: the material has no melt or boil, or the plateau is still being paid.
  • Energy does not close: setTemperature by hand, or a held part exchanging with the boundary.
  • A held bar never breaks: no sigmaMax, or the rise is below σ/(E α).

Files#

  • reference/heat.md — Temperature of parts, conduction, convection and radiation, phase change with latent heat, thermal expansion and stress, heat from friction, and strength that falls as steel gets hot.
  • reference/api-physics-heat.md — every export of @ferret/physics-heat with signature and doc comment
  • reference/commands.md — 7 commands of these packages with their arguments
  • recipes/fire-and-heat.md — Eight recipes: boil a pot, a beam in a fire, a pressure cooker, a kettle on a breaker, a cold pack, thermal runaway, an overloaded wire, a glowing brake disc.
  • recipes/boiler-house.md — A fire heats a boiler, steam drives an engine, a generator on the shaft lights a lamp. Four capabilities, three links, one energy account that must add up.