Both liquid and solid containers undergo a volume change with a change in temperature.

Liquid Expansion

Different liquids have different values for the volumetric expansion coefficient \(\gamma\), and for a temperature variation \(\Delta T\) they exhibit a volume change: $$ \Delta V = V_0 \gamma \Delta T$$ As well as in three-dimensional solids, with the exception that liquids tend to dilate more. For liquids, it makes no sense to speak of linear or surface expansion, and for the case of a liquid in a container, we have to make other considerations.
Illustration of liquid expansion in a container. As the container also dilates, care must be taken in calculating the liquid expansion. Initially, the liquid is at a certain height from the container (a). After a brief period of time in the fire, fig. (b), the vessel dilates first and the height of the liquid in the vessel descends. After some time, (c), the liquid will also expand and its height in the bottle rises.

Consider a certain amount of a given liquid that is present within a container. In order to study the liquid expansion as we vary its temperature, we take the liquid system + container to be heated by a flame (figure above). The process can be described in parts:

a) Initial State
First, before the system receives heat from the flame, both the liquid and the vessel are at room temperature. The column of liquid will occupy a certain volume of the container and its surface will mark a certain height.
b) Intermediate State
When the system receives heat from the flame, it undergoes a temperature variation and, as a result, it expands. As the vessel expansion takes place earlier, since it is in direct contact with the flame, the liquid column descends in relation to the initial height.
c) Final State (Thermal Equilibrium)
After heating the container by heat conduction, fluid begins to receive heat and expands. After the liquid and the container come into thermal equilibrium, the height of the column of liquid is above the initial, the volumetric expansion coefficient of the liquid is higher than the container.

Apparent Expansion

To calculate the apparent expansion, simply fill a container until its brim with a given liquid and then heat the system. The volume poured out will be in the amount of liquid that has apparently dilated. But as the container also dilates, allowing more liquid to be stored, then, in fact, the liquid has dilated more than the volume that has been spilled. Thus, the formula for dilating a liquid in a container needs to take into account the dilation of the container, hence:$$\Delta V_{liquid} = \Delta V_{apparent} + \Delta V_{vessel},$$ Where \(\Delta V_{liquid} = \) full expansion of the liquid, \(\Delta V_{vessel} = \) dilation of the vessel and \(\Delta V_{apparent} = \) the swelling that the liquid appears to have suffered (poured volume).

Anomalous Expansion of Water

Water behaves uncommonly, unlike most other substances. The water shrinks as it approaches the temperature of 4 °C. Still in the liquid phase, at 4 ºC it reaches the maximum density: \(1.0 g/cm^3\). Most of the substances usually have their maximum density in the solid phase. This is why ice (solid phase) floats in water (liquid phase). This behavior of water is essential to the maritime life of cold places. When a lake begins to freeze, ice floats, allowing maritime life to continue to exist beneath the surface layer of ice.