Abstract. The companion paper by Zou et al. shows that the annual and semiannual variations in the peak F2-layer electron density (NmF2) at midlatitudes can be reproduced by a coupled thermosphere-ionosphere computational model (CTIP), without recourse to external influences such as the solar wind, or waves and tides originating in the lower atmosphere. The present work discusses the physics in greater detail. It shows that noon NmF2 is closely related to the ambient atomic/molecular concentration ratio, and suggests that the variations of NmF2 with geographic and magnetic longitude are largely due to the geometry of the auroral ovals. It also concludes that electric fields play no important part in the dynamics of the midlatitude thermosphere. Our modelling leads to the following picture of the global three-dimensional thermospheric circulation which, as envisaged by Duncan, is the key to explaining the F2-layer variations. At solstice, the almost continuous solar input at high summer latitudes drives a prevailing summer-to-winter wind, with upwelling at low latitudes and throughout most of the summer hemisphere, and a zone of downwelling in the winter hemisphere, just equatorward of the auroral oval. These motions affect thermospheric composition more than do the alternating day/night (up-and-down) motions at equinox. As a result, the thermosphere as a whole is more molecular at solstice than at equinox. Taken in conjunction with the well-known relation of F2-layer electron density to the atomic/molecular ratio in the neutral air, this explains the F2-layer semiannual effect in NmF2 that prevails at low and middle latitudes. At higher midlatitudes, the seasonal behaviour depends on the geographic latitude of the winter downwelling zone, though the effect of the composition changes is modified by the large solar zenith angle at midwinter. The zenith angle effect is especially important in longitudes far from the magnetic poles. Here, the downwelling occurs at high geographic latitudes, where the zenith angle effect becomes overwhelming and causes a midwinter depression of electron density, despite the enhanced atomic/molecular ratio. This leads to a semiannual variation of NmF2. A different situation exists in winter at longitudes near the magnetic poles, where the downwelling occurs at relatively low geographic latitudes so that solar radiation is strong enough to produce large values of NmF2. This circulation-driven mechanism provides a reasonably complete explanation of the observed pattern of F2 layer annual and semiannual quiet-day variations. Key words: Atmospheric composition and structure (thermosphere-composition and chemistry) - Ionosphere (mid-latitude ionosphere; modelling and forecasting)