The Major Hazard Assessment Unit of the Health and Safety Executive (HSE) provides advice to local planning authorities on land use planning in the vicinity of major hazard sites. For sites with the potential for large scale releases of toxic heavy gases such as chlorine this advice is based on risk levels and is informed by use of the computerised risk assessment tool RISKAT [C. Nussey, M. Pantony, R. Smallwood, HSE's risk assessment tool RISKAT, Major Hazards: Onshore and Offshore, October, 1992]. At present RISKAT uses consequence models for heavy gas dispersion that assume flat terrain. This paper is the first part of a three part paper. Part 1 describes the mathematical basis of TWODEE, the Health and Safety Laboratory's shallow layer model for heavy gas dispersion. The shallow layer approach used by TWODEE is a compromise between the complexity of CFD models and the simpler integral models. Motivated by the low aspect ratio of typical heavy gas clouds, shallow layer models use depth-averaged variables to describe the flow behaviour. This approach is particularly well suited to assess the effect of complex terrain because the downslope buoyancy force is easily included. Entrainment may be incorporated into a shallow layer model by the use of empirical formulae. Part 2 of this paper presents the numerical scheme used to solve the TWODEE mathematical model, and validated against theoretical results. Part 3 compares the results of the TWODEE model with the experimental results taken at Thorney Island [J. McQuaid, B. Roebuck, The dispersion of heavier-than-air gas from a fenced enclosure. Final report to the US Coast Guard on contract with the Health and Safety Executive, Technical Report RPG 1185, Safety Engineering Laboratory, Research and Laboratory Services Division, Broad Lane, Sheffield S3 7HQ, UK, 1985]. Crown Copyright (C) 1999 Published by Elsevier Science B.V. All rights reserved.