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

My arbitrary minimum and maximum values

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

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:

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.

This work © 2026 by Christopher Howard is licensed under Attribution-ShareAlike 4.0 International.

CC BY-SA 4.0 Deed

Proxied content from gemini://gem.librehacker.com/gemlog/starlog/20260507-0.gmi (external content)

Gemini request details:

Original URL
gemini://gem.librehacker.com/gemlog/starlog/20260507-0.gmi
Status code
Success
Meta
text/gemini
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.