Chemistry · interface

SubstanceThermal

Explained in Chemistry.

interface SubstanceThermal
import type { SubstanceThermal } from '@driftengine/chemistry';

Properties

NameTypeDescription
idreadonlystring
compositionreadonlyCompositionWhat it is made of at the bottom of the curve, as mass fractions summing to one.
More

The rule matters and is not obvious: transitions are applied in ascending temperature order, so a substance is authored as its coldest form. Water is H2O(s) with two transitions, not H2O(l) with one in each direction. A transition whose source species is absent when it is reached is refused, naming both, rather than silently doing nothing.

densityreadonlynumberkg/m³ of the dry matter.
conductivityreadonlyoptionalConductivityW/(m·K), rising with temperature. Optional, and conduction refuses a substance without one, naming it — a thermal conductivity nobody stated is a number somebody invented, and it decides whether a log takes twenty seconds or twenty minutes.
shellsreadonlyoptionalnumberHow many nested shells of equal mass. Four by default; see §4 for why not one and why not sixteen.
shapereadonlyoptionalShapeWhat it is shaped like, which decides how those shells divide. A cylinder by default: a log.
porosityreadonlyoptionalnumberVoid fraction, 0..1. What decides how freely gas moves between this material and the air.
More

A charcoal briquette breathes and a pane of glass does not, and that is most of the difference between something that smoulders and something that does not. Zero by default, which means a substance exchanges no gas at all until somebody says how open it is.

emissivityreadonlyoptionalnumberHow readily it radiates and absorbs, 0..1. Most non-metals sit near 0.9, which is the default.
reactionsreadonlyoptionalreadonly string[]Reactions this material can undergo, by id.
More

A substance's parcels track masses for its composition species plus every species these reactions touch, so declaring one is what makes room for its products. Wood that pyrolyses holds char and steam it did not start with.

ignitionreadonlyoptionalIgnitionModelWhen this material catches and when it stops.
More

Absent means it never catches at all, which is the right default: a substance nobody described as flammable should not be, and inventing an ignition temperature for glass is worse than declining to have one.

appearancereadonlyoptionalAppearanceModelWhat it looks like, and every field is a measurable property of the material rather than a choice about how to draw it.
More

Absent means a consumer supplies their own colours, which is the right default: a substance nobody described the appearance of should not have one invented for it. present/ refuses to write an albedo it was never given rather than writing grey.