Hi Klonan,
I ran into this in the vanilla base game also (2.0.7+) playing around with infinity-pipes.
Klonan wrote: Thu Jul 24, 2025 11:38 am
I made some error in the physics or thermodynamic logic,
Sounds like you are aware that this is a bug, so I can skip the lengthy discussion trying to convince you that the current behavior doesn't really make sense.
Mostly this is just a suggested direction for a fix.
Observed behavior:
- Boiler consumes water at boiler.energy_consumption / ((boiler.target_temperature - water.current_temperature) * water.heat_capacity)
- Boiler produces steam at boiler.energy_consumption / ((boiler.target_temperature - steam.default_temperature) * steam.heat_capacity)
That is, the hotter the input water, the more of it is consumed; but the amount of steam produced is not affected by the input water temperature.
(Carried to its logical conclusion, in the extreme case with this formulation you can end up with more water consumed than steam produced.)
Expected behavior:
- Steam should be produced at a fixed ratio to the amount of water consumed (10:1, based on the heat capacity ratio of water:steam), regardless of the input water temperature.
This could be achieved by tweaking the steam production rate to be:
- Boiler produces steam at boiler.energy_consumption / ((boiler.target_temperature - water.current_temperature) * steam.heat_capacity)
The formula for water consumption remains the same as above, which results in:
- Boiler consumes water at the steam:water heat capacity ratio (1:10) times the steam production rate.
This leaves the behavior the same for the normal case with default temp water (where water.current_temperature = water.default_temperature = steam.default_temperature = 15 C); and regardless of water temp it preserves conservation of energy.
pepciorek wrote: Thu Jul 24, 2025 11:28 am
should hot water (with more energy) take less time to heat up
chrisgbk wrote: Thu Jul 24, 2025 4:05 pm
The water at 100 C already contains 85 C * 2kJ = 170kJ stored energy per unit
As pepciorek and chrisgbk correctly observe, the problem with the 2.0.7+ behavior & concept of conservation of energy is that it does not consider the energy that went into heating the water from its default temp up to the input temp for the boiler. The solution concept to consider is that hot water has already received some heat energy to raise it above the default water temp, so less energy is needed to raise it to boiler.target_temperature (including at some point a free state transition from water->steam). Thus for hot water, the same power from burner fuel (boiler.energy_consumption) will cover converting
more water to
more steam than default temp water. It's true that the steam output will then store more energy than the burner fuel consumed by the boiler; but energy is conserved because the steam output energy is equal to the boiler's burner fuel plus whatever theoretical energy went into heating the input water that gets consumed.