What is time step (DT)?
The length of the small interval of time by which a simulation advances each time it recalculates the state of the system.
Time step (DT) diagram example
The time step, written DT, is how far a simulation moves forward each time it updates. At every step the model computes the rates and adjusts the stocks by rate times DT. It matters because a step that is too large gives wrong or even impossible answers, while a step that is too small wastes time without improving the result.
How it works
Inside a continuous simulation, time is chopped into equal slices. The smaller the slice, the closer the computed path follows the true smooth curve. A common guide is to make DT no more than about a quarter to a tenth of the shortest time constant in the model, which is the fastest rate of change. If something in the model happens in about 2 hours, a DT of one day will miss it.
The simple method of Euler integration is especially sensitive to DT, while the Runge-Kutta method tolerates larger steps. A practical test is to halve DT and run again. If the results barely change, the step is small enough. If they change a lot, keep halving. This test is a basic part of model validation.
Example
Say a cup of coffee starts at 90 degrees and the room is 20 degrees. The coffee loses 20 percent of its temperature gap per minute. With DT of 1 minute, the first step removes 14 degrees and gives 76. With DT of 5 minutes, the first step removes the whole gap, 70 degrees, and gives 20, which is far too cold. The true value after 5 minutes is about 46 degrees. The large step overshoots the answer. This is an illustration with round numbers.
How to model it in Machinations
Machinations advances in steps when you Play, so each step plays the role of DT. To make DT explicit, keep a Register for the step size and multiply every rate by it. Build the coffee as a Pool of temperature with a Drain proportional to the gap, chart it, and use a Lever on the step size to see accuracy fall as it grows.
See time step (DT) in a system you can Play
Build the rules in a Machinations diagram, change a value and Play it to watch how the system responds.