THAT: Scaled Temperature Simulation
published 2026-05-07
by Christopher Howard
Something I've mostly avoided so far is how to do scaling. Of course, one can assign arbitrary ratios between the machine unit and physical quantities, but how to work through an actual circuit and model, and make everything consistent?
The guide I have handy is the EAI Handbook of Analog Computation, 2nd Ed. (1967) which can be downloaded for free from the Internet, which goes three a detailed treatise on this in chapter 3. I'm think I'm not quite understanding and doing everything correctly, but I applied it with my ideal gas and temperature model, and the end result seems sane.
Simulation Summary
Temperature of an ideal gas in a container of fixed volume. Accounts for heating based on an internal heating element as well as heat transfer to the environment.
Assumptions
Assumes a fixed specific heat capacity of the gas at 10³ J kg⁻¹ K⁻¹, a rough number used for air at normal pressure and temperature. Actually, the specific heat capacity changes some with temperature and pressure but we will ignore that.
Differential equation
d Ti / d t = (Q - A × U × (Ti - To)) / (m × c)
where
- Q is the power of the heating element in watts
- A is the surface area for environmental heat transfer in m²
- U is the heat transfer coefficient of the gas in W m⁻² K⁻¹
- Ti and To are internal and environmental temperature in kelvins
My arbitrary minimum and maximum values
- Q maximum is 1000 watts
- A maximum is 50 m²
- U maximum is 0.1 W m⁻² K⁻¹
- Ti minimum is 250 K and maximum is 500 K
- To minimum is 250 K and maximum is 300 K
- mass minimum is 1 kg
We define substitution variables
Ti₁ = Ti - 250 K with maximum value 250 K.
To₁ = To - 250 K with maximum value 50 K.
My maximum value for U, the heat transfer coefficient, was based on working out the total heat transfer coefficients for various metals and other materials that my container might be made out of, assuming normal air on both sides of the metal. I lost my notes on that, but I think there was some variant of steel which, at moderate thickness, came out to around 0.066 W m⁻² K⁻¹
Scaling coefficients
With reference to the reference unit (Machine Unit), we have
- Q: 1/1000 watts
- Ti₁: 1/250 K
- To₁: 1/50 K
- A x U: 1/5 W K⁻¹
I'm not sure how to state this as a coefficient, but m is 1 kg if 1 / (m×c) potentiometer is set to 1.0.
Scaled Diagram
scaled diagram circuit
List of potentiometers:
- 1: turn right to increase power of heating element
- 2: turn right to increase the starting temperature of the gas inside the container
- 3: turn right to increase the temperature of the environment, i.e., the air outside the container
- 4: turn left to make the container a better heat insulator
- 5: turn left to increase the mass of gas that was initially pumped into the container
- 6, 7, and 8 are scaling potentiometers
A challenge I faced is that at a mass of even 1 kg, and a scaling on the output of the power summing output of 1250 W, then I need to divide that power value by 1000, and also multiply by five to match up the 1⁄1250 scaling with the 1⁄250 scaling for the integrator, i.e., 1⁄200. That is a very low value for a potentiometer, or chain two scaling pots together at a still low value of √ 1⁄200 each. Instead, I saw that the math works out if I just increase the rate of the simulation by 100x, while using just a single scaling potentiometer set to ½.
Example Simulation Curves
For a sanity check: I know that if the heating element is set to 1000 watts, the mass is 1 kg, and the container is a perfect heat insulator, then we should have a temperature increase of Q / (m × c) = 1 kelvin per second.
curve with 1000 W heater power and no heat loss
In that curve, we see internal temperature starting at Ti₁ = 0 K (Ti = 250 K) and rising to 0.4 MU after 1 millisecond. Per the scaling, Ti₁ = 0.4 × 250 = 100 K (Ti = 350 K). Our machine time unit is 1 ms, i.e., 1 second of real time equals 1 ms simulation time. But we are multiplying that by 100. In summary, the temperature rises 100 K in 100 seconds, or 1 kelvin per second, as expected.
Here is another example curve with the heater turned all the way up, as before, but the container is no longer a good insulator. The curve starts to level out because, as the temperature difference between internal and external temperature increases, there is more rapid heat loss to the environment.
curve with 1000 W heater power and some heat loss to environment
And here is an example cooling curve where the heater is turned off, but the gas in the container starts with a higher temperature than the environment.
curve with heater turned off and internal temperature initially higher than the environment
These curves are similar in shape to what I have shown in my earlier post, but it is satisfying now to have learned some more about scaling, and to have simulation results which numerically represent something plausible in the real world.
Copyright
This work © 2026 by Christopher Howard is licensed under Attribution-ShareAlike 4.0 International.
CC BY-SA 4.0 Deed