Why is my flat heating up even after sunset?

02 Sep 2026 - tsp
Last update 02 Sep 2026
Reading time 19 mins

Why is my flat heating up even after the sun set?

I just got asked this question so I thought it would be a nice idea to write it up.

At first the effect might look strange: The strongest solar illumination may occur at around 16:00, the sun may disappear below the horizon at around 20:00, and yet the temperature inside the flat continues to increase until 03:00 or 04:00 in the morning. At first glance this appears rather strange (if you are not a physicist or engineer). Once the external heat source has disappeared, should the building not immediately begin to cool?

The answer is that sunset only removes one of the heat inputs at the outside of the building. It does not remove the energy that has already been absorbed by the walls, roof, floors, furniture and other parts of the building. In a building made from let’s say two layers of brick, a considerable amount of energy can be stored in the masonry. This energy does not immediately appear at the inner wall surface. Instead, it slowly diffuses through the material and may reach the interior many hours after the outside of the wall was heated.

This behaviour is usually described as thermal diffusion, thermal phase lag or in building physics as the time shift of a periodic temperature wave. “Heat creep” gives a reasonable intuitive picture, but it is not the usual physical term.

The temperature maximum is not the heat-input maximum

The first important point is that the indoor temperature does not reach its maximum when the external heating power reaches its maximum. The temperature continues to rise for as long as more heat enters the room than leaves it.

A simplified energy balance for the room can be written as

[ C_{\mathrm{room}}\frac{\mathrm dT_{\mathrm{room}}}{\mathrm dt} = \partial_t Q_{\mathrm{walls}} + \partial_t Q_{\mathrm{windows}} + \partial_t Q_{\mathrm{roof}} + \partial_t Q_{\mathrm{internal}} - \partial_t Q_{\mathrm{loss}} ]

Here, $C_{\mathrm{room}}$ is the effective heat capacity of the room, including not only the air but also the floor, ceiling, internal walls, furniture and other objects that exchange heat with the air. The individual $\partial_t Q$ terms describe the different heat flows.

The temperature rises whenever

[ \partial_t Q_{\mathrm{walls}} + \partial_t Q_{\mathrm{windows}} + \partial_t Q_{\mathrm{roof}} + \partial_t Q_{\mathrm{internal}} > \partial_t Q_{\mathrm{loss}}. ]

The temperature maximum is reached only when both sides become equal:

[ \partial_t Q_{\mathrm{in}}=\partial_t Q_{\mathrm{out}}. ]

There is therefore no reason for the indoor maximum to coincide with sunset. The sun may already have disappeared while the walls are still releasing the energy that was absorbed during the afternoon.

The same effect can be seen in many simpler systems:

In each case, energy has first been stored in a massive object and is subsequently redistributed. A house is simply a more complicated version of the same system.

Heat does not pass through the wall instantaneously …

… and it enters and leaves at different surfaces when passing through walls. Heat conduction in a homogeneous material is described by the heat equation

[ \frac{\partial T}{\partial t} = \alpha\nabla^2 T ]

where

[ \alpha=\frac{\lambda}{\rho c_p} ]

is the thermal diffusivity of the material. In this expression

Thermal conductivity describes how readily heat flows through the material. Heat capacity describes how much energy has to be supplied to change its temperature. Thermal diffusivity combines both effects and describes how quickly a temperature disturbance propagates through the material.

A material can therefore conduct heat reasonably well while still responding slowly if its volumetric heat capacity $\rho c_p$ is large. Brick and concrete are important examples. They are not particularly good thermal insulators when compared with dedicated insulation materials, but they can store a substantial amount of energy.

This distinction between thermal resistance and thermal mass is important. Thermal insulation limits the amount of heat passing through a wall. Thermal mass delays and smooths temperature changes. A wall can have a large thermal mass without having an especially good insulation value.

The daily temperature cycle behaves like a damped wave

The outside temperature and solar heating approximately repeat with a period of one day. They can therefore be approximated by a periodic boundary condition. Suppose the outside surface temperature of a wall varies as

[ T(0,t) = T_0+A_0\cos(\omega t) ]

where $T_0$ is the average temperature, $A_0$ is the amplitude of the daily variation and

[ \omega=\frac{2\pi}{P} ]

is the angular frequency. For the daily cycle,

[ P=24\ \mathrm{h}=86400\ \mathrm{s}. ]

For a sufficiently thick homogeneous wall, the corresponding solution of the one-dimensional heat equation has the approximate form

[ T(x,t) = T_0+A_0 \exp\left(-\frac{x}{\delta}\right) \cos\left(\omega t-\frac{x}{\delta}\right) ]

The quantity

[ \begin{aligned} \delta &= \sqrt{\frac{2\alpha}{\omega}} \\ &= \sqrt{\frac{\alpha P}{\pi}} \end{aligned} ]

is the thermal penetration depth.

This equation shows two effects. First, the amplitude decreases exponentially with depth:

[ A(x)=A_0\exp\left(-\frac{x}{\delta}\right) ]

Second, the oscillation is delayed by the phase

[ \varphi(x)=\frac{x}{\delta} ]

The corresponding time delay is

[ \begin{aligned} \Delta t &= \frac{\varphi}{\omega} \\ &= \frac{x}{\delta\omega} \end{aligned} ]

Thus, the deeper the heat wave travels into the wall, the weaker and more delayed it becomes.

Strictly speaking, heat is not transported as a wave in the same way as sound or light. There is no defined thermal pulse travelling through the wall at a fixed velocity. The process remains diffusive. Nevertheless, for periodically varying temperatures, the mathematical solution looks like a strongly damped and phase-shifted wave.

An example for a massive brick wall

As an illustrative value, a thermal diffusivity of

[ \alpha=4\times10^{-7}\ \mathrm{m^2\,s^{-1}} ]

may be assumed for the masonry (this has been taken our of my personal experience). The exact value depends considerably on the type of brick, its porosity, moisture content, mortar joints and the complete wall construction.

For a 24-hour cycle, the thermal penetration depth then becomes

[ \delta = \sqrt{\frac{\left(4\times10^{-7}\ \mathrm{m^2\,s^{-1}}\right)\left(86400\ \mathrm{s}\right)}{\pi}} \approx 0.105\ \mathrm{m} ]

The penetration depth is therefore about $10.5\ \mathrm{cm}$

The associated phase delay can now be estimated for different wall depths:

[ \Delta t = \frac{x}{\delta\omega} ]

Since

[ \frac{1}{\omega} = \frac{P}{2\pi} \approx 3.82\ \mathrm{h} ]

each thermal penetration depth corresponds to a delay of approximately $3.82$ hours.

For a depth of $20\ \mathrm{cm}$

[ \frac{x}{\delta} \approx \frac{0.20}{0.105} \approx 1.90 ]

and therefore

[ \Delta t \approx 1.90\cdot3.82\ \mathrm{h} \approx 7.3\ \mathrm{h} ]

For $30\ \mathrm{cm}$

[ \Delta t\approx10.9\ \mathrm{h} ]

and for $35\ \mathrm{cm}$,

[ \Delta t\approx12.7\ \mathrm{h} ]

A thermal excitation occurring at the outside of the wall at around 15:00 or 16:00 can therefore influence the inside surface most strongly sometime during the night. A delay into the range between approximately 02:00 and 05:00 is quite plausible for a massive wall system.

These numbers should not be interpreted as an exact prediction for a particular house. A real wall is not a homogeneous semi-infinite slab. It may contain different types of brick, mortar, plaster, air cavities, insulation, anchors and various thermal bridges. Convective heat transfer occurs at both surfaces, and the indoor temperature itself changes during the process.

Nevertheless, the calculation demonstrates that a delay of many hours is not unusual. It follows naturally from the heat equation.

The outside wall may become much hotter than the outside air

The external air temperature is only one of the boundary conditions. A sunlit wall can become substantially warmer than the surrounding air because it directly absorbs solar radiation. A simplified energy balance at the outer surface can be written as

[ q_{\mathrm{solar}} + q_{\mathrm{conv,out}} + q_{\mathrm{rad,out}} = q_{\mathrm{conducted\ into\ wall}}. ]

The absorbed solar heat flux is approximately

[ q_{\mathrm{solar}} = a_{\mathrm{s}}G ]

where $G$ is the incident solar irradiance and $a_{\mathrm{s}}$ is the solar absorptivity of the surface.

A dark façade absorbs a larger fraction of the incoming radiation than a light façade. Wind cools the surface by convection. Long-wave radiation is exchanged with the sky and the surroundings. The wall surface temperature consequently results from several competing effects.

The time of maximum solar irradiation does not necessarily coincide with the maximum outside surface temperature. The outermost layers of the wall have their own heat capacity, so their temperature can continue to increase for a while after the irradiation begins to decrease. The complete delay between maximum sunlight and maximum indoor temperature is therefore composed of several stages:

[ \text{solar irradiation} \rightarrow \text{outside surface temperature} \rightarrow \text{temperature inside the wall} \rightarrow \text{inside surface temperature} \rightarrow \text{room temperature} ]

Each stage adds some amount of delay and attenuation.

Why the room can still heat up at 04:00

Assume that the strongest solar input occurs at around 16:00 and that the sun sets at around 20:00. During the afternoon, the external layers of the masonry are heated. Some energy is immediately transferred back to the outside air, some is radiated away, and some diffuses deeper into the wall.

At sunset, the outer surface begins to cool. However, the temperature inside the wall is not uniform. A temperature gradient remains:

[ \nabla T\ne0 ]

The intermediate layers can still be warmer than the inner layers, so heat continues flowing towards the interior according to Fouriers law

[ \vec q=-\lambda\nabla T ]

At the same time, floors, ceilings, internal walls and furniture may also have been heated during the day. They continue exchanging energy with the room air. Warm air may also be entering from other parts of the building, particularly from an attic, stairwell or neighbouring flat.

The indoor temperature continues to rise as long as the combined delayed heat release exceeds the heat lost through ventilation, conduction and radiation.

In my personal measured case at approximately 04:00, several things may finally have changed sufficiently:

At that moment

[ \partial_t T_\mathrm{room} = 0 ]

and the indoor temperature reaches its maximum. It then begins to decrease.

The maximum temperature therefore marks the point at which the net heat flow changes sign.

Is the heat flow isotropic?

In an approximately homogeneous brick, heat conduction may be treated as locally isotropic. Fouriers law then uses a scalar thermal conductivity:

[ \vec q=-\lambda\nabla T ]

This means that there is no intrinsic preferred direction in the material. Heat flows in whichever direction the temperature decreases most rapidly.

The geometry of a wall, however, strongly restricts the macroscopic problem. A wall may be several metres high and wide but only a few tens of centimetres thick. Far away from corners, windows and other discontinuities, the dominant temperature gradient is perpendicular to the wall.

The system can therefore often be approximated as one-dimensional:

[ \partial_t T = \alpha\frac{\partial^2T}{\partial x^2}. ]

Heat does spread sideways as well, especially around windows, balconies, corners, beams and wall connections. For a sufficiently large uninterrupted section of wall, however, the through-thickness component dominates.

Thus, the effect is caused by diffusive heat spreading in the masonry, but describing the complete wall as an isotropically expanding heat cloud would be misleading. The relevant macroscopic behaviour is mostly one-dimensional heat conduction with a large phase delay.

A thermal RC model of the building

The heat equation provides the detailed distributed description. For analysing an entire house, it is often useful to replace the structure by a network of thermal resistances and heat capacities (in analogy to electrodynamics).

A simple wall model might contain an outside surface node, an outer masonry node, an inner masonry node and an inside surface node:

[ T_{\mathrm{out}} \longleftrightarrow T_{\mathrm{wall,out}} \longleftrightarrow T_{\mathrm{wall,in}} \longleftrightarrow T_{\mathrm{room}}. ]

Each connection is represented by a thermal resistance $R$, while each massive region is represented by a thermal capacity $C$. For one node

[ C_i \partial_t \mathrm T_i = \sum_j\frac{T_j-T_i}{R_{ij}} + P_i(t) ]

This is mathematically similar to an electrical RC network. Temperature corresponds to voltage, heat flow corresponds to electric current, thermal resistance corresponds to electrical resistance and heat capacity corresponds to electrical capacitance.

A massive building is therefore a large, distributed thermal low-pass filter. Rapid external temperature changes are strongly suppressed. Slow changes pass through more readily. The daily cycle is delayed and attenuated, while seasonal changes penetrate much farther into the building.

This filtering behaviour explains why massive buildings often remain pleasantly cool during the first hot day. The heat has not yet penetrated deeply into the structure. After several consecutive hot days, however, the entire thermal mass gradually becomes warmer. Once this happens, the same mass that previously kept the interior cool can keep releasing heat during the night.

Thermal mass is therefore not a heat sink of unlimited capacity. It is temporary energy storage.

Why one hot day and one hot week behave differently

The thermal penetration depth depends on the period of the excitation:

[ \delta=\sqrt{\frac{\alpha P}{\pi}} ]

Longer period variations penetrate more deeply. For a one-day cycle, only the outer portion of a thick wall participates strongly in the oscillation. For a weather pattern lasting several days, the penetration depth is larger. For the seasonal cycle, it becomes much larger still.

If the period increases from one day to seven days, the penetration depth increases by

[ \sqrt{7}\approx2.65 ]

The corresponding thermal disturbance can therefore reach much deeper into the building fabric. During a prolonged heat wave, the average temperature of the whole wall gradually increases. The night may no longer be sufficiently cool or sufficiently long to remove the stored energy.

This is why a massive brick building can behave extremely well during short temperature peaks and considerably less well after a week of hot weather. During the first days, the masonry absorbs heat while its interior remains relatively cool. Later, the available thermal storage has already been charged.

At that point, opening the windows during the day may make the situation worse, but Even a short period of ventilation during the night may only primarily cool the room air and immediate surfaces, while considerably more energy remains stored deeper in the structure. Sustained night ventilation can gradually remove this energy as it diffuses back towards the surfaces..

The wall may not be the only source

A delayed heat flux through massive exterior walls is a plausible explanation for a temperature maximum around 04:00, but it should not automatically be assumed to be the only explanation. Several other parts of the building can produce similar or even larger effects.

A roof or attic can reach high temperatures during the day and release heat downwards for many hours. Reinforced-concrete floors and ceilings can store more energy than the room air by several orders of magnitude. Direct sunlight entering through a window can heat the floor and furniture. Appliances, computers, refrigerators and people continuously add internal heat. Warm air can enter from stairwells or neighbouring rooms. Ventilation may also become ineffective when the outside air remains warm during the evening.

For a room with large sunlit windows, direct solar transmission through the glazing is often more important than heat conducted through an opaque wall. The sunlight passes through the glass and is absorbed by internal surfaces. The energy is therefore deposited directly inside the thermal envelope instead of first having to diffuse through the wall.

The same thermal-mass argument still applies, but the relevant storage object may then be the floor, the interior wall or the furniture rather than the external brick wall.

A simple experiment

The mechanism can be investigated with a few temperature sensors. Ideally, the following quantities would be recorded every five or ten minutes:

[ \begin{aligned} T_{\mathrm{air,out}}(t) \\ T_{\mathrm{surface,out}}(t) \\ T_{\mathrm{surface,in}}(t) \\ T_{\mathrm{air,in}}(t) \end{aligned} ]

Solar irradiance or at least a binary indication of direct sunlight would also be useful. Wind, open windows and active ventilation should be noted because they can substantially change the surface heat transfer.

The four temperature curves should not peak simultaneously. A likely sequence would be

[ t_{\mathrm{sun}} < t_{\mathrm{surface,out}} < t_{\mathrm{surface,in}} < t_{\mathrm{air,in}} ]

The exact order of the last two may vary because the indoor air is influenced by multiple surfaces and internal heat sources. For an approximately sinusoidal signal, the time shift can be determined from the phase difference. If the outside and inside surface temperatures are fitted

[ T_{\mathrm{out}}(t) = \bar T_{\mathrm{out}} + A_{\mathrm{out}}\cos(\omega t-\varphi_{\mathrm{out}}) ]

and

[ T_{\mathrm{in}}(t) = \bar T_{\mathrm{in}} + A_{\mathrm{in}}\cos(\omega t-\varphi_{\mathrm{in}}) ]

the measured delay is

[ \Delta t = \frac{ \varphi_{\mathrm{in}}-\varphi_{\mathrm{out}}}{\omega} ]

The attenuation of the daily oscillation is

[ f=\frac{A_{\mathrm{in}}}{A_{\mathrm{out}}} ]

For the ideal homogeneous model

[ f=\exp\left(-\frac{x}{\delta}\right). ]

The measured delay and attenuation could therefore be used to estimate an effective thermal diffusivity. From the delay,

[ \alpha \approx \frac{x^2P}{4\pi(\Delta t)^2}. ]

This result would represent the complete effective wall construction rather than a pure material property of one brick. Plaster, mortar, cavities, insulation and surface heat transfer would all influence the measurement. Even so, it would provide a useful experimental description of the walls dynamic behaviour.

The followin graph shows a few measurement points inside a facility - showing clear peaking of the temperature at around 01:30 at night. It also shows how the peak shifts with respect to different locations inside the facility.

Cooling the room requires cooling the thermal mass

This analysis also explains why briefly opening a window may produce only temporary relief. The heat capacity of the room air is surprisingly small. For a room volume $V$, the heat capacity of the air is approximately

[ C_{\mathrm{air}} = \rho_{\mathrm{air}}c_{p,\mathrm{air}}V ]

For a $50\ \mathrm{m^3}$ room, using

[ \rho_{\mathrm{air}}\approx1.2\ \mathrm{kg\,m^{-3}} ]

and

[ c_{p,\mathrm{air}}\approx1000\ \mathrm{J\,kg^{-1}K^{-1}}, ]

one obtains

[ C_{\mathrm{air}} \approx 60\,000\ \mathrm{J\,K^{-1}}. ]

Only about $60\ \mathrm{kJ}$ is therefore required to change the air temperature by one kelvin.

A few tonnes of brick, concrete, plaster and furniture have an enormously larger effective heat capacity. After cool outside air has replaced the warm room air, the warmer surfaces can therefore heat the new air again within a relatively short time.

Effective night cooling has to remove energy from the building fabric, not merely exchange the air once. This generally requires sustained ventilation or for longer heatwaves air conditioning. Airflow should pass across the warm surfaces, and cross-ventilation is much more effective than a single slightly opened window.

External shading is even better because it prevents solar energy from entering the system in the first place. Once energy has been absorbed by the building, it has to leave again through ventilation, radiation or conduction.

Conclusion

Solar radiation heats the external surfaces during the daytime. Heat then diffuses through the masonry and is stored in the wall. The daily temperature variation is attenuated and phase-shifted as it travels through the material. For several tens of centimetres of massive masonry, delays on the order of eight to fourteen hours are physically plausible.

The room temperature continues to rise until the delayed heat released by walls, ceilings, floors and furniture becomes smaller than the heat leaving the room. Sunset removes the original external source, but the building continues processing the energy that it received earlier.

Thus, the effect may be described intuitively as heat slowly creeping through the structure. Physically, however, it is a combination of thermal diffusion, heat storage and the phase lag of a massive building acting as a distributed thermal low-pass filter.

References

This article is tagged: Basics, Tutorial, Physics, School math, How stuff works


Data protection policy

Dipl.-Ing. Thomas Spielauer, Wien (webcomplainsQu98equt9ewh@tspi.at)

This webpage is also available via TOR at http://rh6v563nt2dnxd5h2vhhqkudmyvjaevgiv77c62xflas52d5omtkxuid.onion/

Valid HTML 4.01 Strict Powered by FreeBSD IPv6 support