Simulations: Levels of Consciousness

In a recent post I showed these results of simulations for our heat pump system:

I focused on the technical details – this post will be more philosophical.

What is a ‘simulation’ – opposed to simplified calculations of monthly or yearly average temperatures or energies? The latter are provided by tools used by governmental agencies or standardization bodies – allowing for a comparison of different systems.

In a true simulation the time intervals so small that you catch all ‘relevant’ changes of a system. If a heating system is turned on for one hour, then turned off again, he time slot needs to be smaller than one hour. I argued before that calculating meaningful monthly numbers requires to incorporate data that had been obtained before by measurements – or by true simulations.

For our system, the heat flow between ground and the water/ice tank is important. In our simplified sizing tool – which is not a simulation – I use average numbers. I validated them by comparing with measurements: The contribution of ground can be determined indirectly; by tallying all the other energies involved. In the detailed simulation I calculate the temperature in ground as a function of time and of distance from the tank, by solving the Heat Equation numerically. Energy flow is then proportional to the temperature gradient at the walls of the tank. You need to make assumptions about the thermal properties of ground, and a simplified geometry of the tank is considered.

Engineering / applied physics in my opinion is about applying a good-enough-approach in order to solve one specific problem. It’s about knowing your numbers and their limits. It is tempting to get carried away by nerdy physics details, and focus on simulating what you know exactly – forgetting that there are huge error bars because of unknowns.

This is the hierarchy I keep in mind:

On the lowest level is the simulation physics, that is: about modelling how ‘nature’ and system’s components react – to changes in the previous time slot. Temperatures change because energies flows, and energy flows because of temperature differences. The heat pump’s output power depends on heating water temperature and brine temperature. Energy of the building is ‘lost’ to the environment via heat conduction; heat exchangers immersed in tanks deposit energy there or retrieve it. I found that getting the serial connection of heat exchangers right in the model was crucial, and it required a self-consistent calculation for three temperatures at the same point of time, rather than trying to ‘follow round the brine’. I used the information on average brine temperatures obtained by these method to run a simplified version of the simulation using daily averages only – for estimating the maximum volume of ice for two decades.

So this means you need to model your exact hydraulic setup, or at least you need to know which features of your setup are critical and worthy to model in detail. But the same also holds for the second level, the simulation of control logic. I try to mirror production control logic as far as possible: This code determines how pumps and valves will react, depending on the system’s prior status before. Both in real life and in the simulation threshold values and ‘hystereses’ are critical: You start to heat if some temperature falls below X, but you only stop heating if it has risen above X plus some Delta. Typical brine-water heat pumps always provide approximately the same output power, so you control operations time and buffer heating energy. If Delta for heating the hot water buffer tank is too large, the heat pump’s performance will suffer. The Coefficient of Performance of the heat pump decreases with increasing heating water temperature. Changing an innocuous parameter will change results a lot, and the ‘control model’ should be given the same vigilance as the ‘physics model’.

Control units can be tweaked at different levels: ‘Experts’ can change the logic, but end users can change non-critical parameters, such as set point temperatures.We don’t restrict expert access in systems we provide the control unit for. But it make sense to require extra input for the expert level though – to prevent accidental changes.

And here we enter level 3 – users’ behavior. We humans are bad at trying to outsmart the controller.

[Life-form in my home] always sets the controller to ‘Sun’. [little sun icon indicating manually set parameters]. Can’t you program something so that nothing actually changes when you pick ‘Sun’?

With heat pumps utilizing ground or water sources – ‘built’ storage repositories with limited capacity – unexpected and irregular system changes are critical: You have to size your source in advance. You cannot simply order one more lorry load of wood pellets or oil if you ‘run out of fuel’. If the source of ambient energy is depleted, the heat pump finally will refuse to work below a certain source temperature. The heat pump’s rated power has match the heating demands and the size of the source exactly. It also must not be oversized in order to avoid turning on and off the compressor too often.

Thus you need good estimates for peak heat load and yearly energy needs, and models should include extreme weather (‘physics’) but also erratic users’ behaviour. The more modern the building, the more important spikes in hot tap water usage get in relation to space heating. A vendor of wood pellet stoves told me that delivering peak energy for hot water – used in private bathrooms that match spas – is a greater challenge today than delivering space heating energy. Energy certificates of modern buildings take into account huge estimated solar and internal energy gains – calculated according to standards. But the true heating power needed on a certain day will depend on the strategy or automation home owners use when managing their shades.

Typical gas boilers are oversized (in terms of kW rated power) by a factor of 2 or more in Germany, but with heat pumps you need to be more careful. However, this also means that heat pump systems cannot and should not be planned for rare peak demands, such as: 10 overnight guests want to shower in the morning one after the other, on an extremely cold day, or for heating up the building quickly after temperature had been decreased during a leave of absence.

The nerdy answer is that a smart home would know when your vacation ends and start heating up well in advance. Not sure what to do about the showering guests as in this case ‘missing’ power cannot be compensated by more time. Perhaps a gamified approach will work: An app will do something funny / provide incentives and notifications so that people wait for the water to heat up again. But what about planning for renting a part of the house out someday? Maybe a very good AI will predict what your grandchildren are likely to do, based on automated genetics monitoring.

The challenge of simulating human behaviour is ultimately governed by constraints on resources – such as the size of the heat source: Future heating demands and energy usage is unknown but the heat source has to be sized today. If the system is ‘open’ and connected to a ‘grid’ in a convenient way problems seem to go away: You order whatever you need, including energy, any time. The opposite is planning for true self-sufficiency: I once developed a simulation for an off-grid system using photovoltaic generators and wind power – for a mountain shelter. They had to meet tough regulations and hygienic standards like any other restaurant, e.g.: to use ‘industry-grade’ dishwashers needing 10kW of power. In order to provide that by solar power (plus battery) you needed to make an estimate on the number of guests likely to visit … and thus on how many people would go hiking on a specific day … and thus maybe on the weather forecast. I tried to factor in the ‘visiting probability’ based on the current weather.

I think many of these problem can be ‘resolved’ by recognizing that they are first world problems. It takes tremendous efforts – in terms of energy use or systems’ complexity – to obtain 100% availability and to cover all exceptional use cases. You would need the design heat load only for a few days every decade. On most winter days a properly sized heat pump is operating for only 12 hours. The simple, low tech solution would be to accept the very very rare intermittent 18,5°C room temperature mitigated by proper clothing. Accepting a 20-minute delay of your shower solves the hot water issue. An economical analysis can reveal the (most likely very small) trade-off of providing exceptional peak energy by a ‘backup’ electrical heating element – or by using that wood stove that you installed ‘as a backup’ but mostly for ornamental reasons because it is dreadful to fetch the wood logs when it is really cold.

But our ‘modern’ expectations and convenience needs are also reflected in regulations. Contractors are afraid of being sued by malicious clients who (quote) sit next their heat pump and count its operating cycles – to compare the numbers with the ones to be ‘guaranteed. In a weather-challenged region at more than 2.000 meters altitude people need to steam clean dishes and use stainless steel instead of wood – where wooden plates have been used for centuries. I believe that regulators are as prone as anybody else to fall into the nerdy trap described above: You monitor, measure, calculate, and regulate the things in detail that you can measure and because you can measure them – not because these things were top priorities or had the most profound impact.