We present a model to simulate the increase in sludge temperature during batch-type thermal pretreatment of sewage sludge. The semi-theoretical model is based on energy balance as a function of operating conditions, including non-ideal factors determined by fitting. The model was verified by comparison with the results of bench-scale runs. It predicted the relationship between the operating conditions and steam input with sufficient accuracy. The test plant needed more energy input than the ideal during operation owing to the influence of the heat capacity of the apparatus. To optimize the scale of the apparatus, we simulated the treatment of 10 t of sludge. The energy input was minimized with 10 runs of a 1-t apparatus if the heat capacity of the ancillary apparatus exceeds a certain threshold, and 5 runs with a 2-t apparatus if the heat capacity is below the threshold. The influence of the boiler's performance on energy input is small, but its effect on the heat-up rate of the sludge is large. A boiler with sufficient equivalent evaporation and rated pressure will shorten the operating time.