The increasing energy demands in the building sector is considered as a main issue and has result both in the energy shortage and also environmental impact such as climate change and global warming. This demand is always increasing due to the high-rise level and also the need of thermal comfort. This paper aims to describe a passive approach to reduce the energy demand for a building through an improvement of the design of the thermal envelope. Within this work, we utilized the thermophysical properties of four building materials: three local materials (compressed earth, lateritic, and raw material) and one modern (Hollow cement) and an energy analysis of the building has been carried out. The numerical optimization of the building design has been performed dynamically by COMSOL Multiphysics software: case study of Ouagadougou and surface is 100m2. Also, the temporal variations in the inside of the room as well as the temperature of the walls and the ceiling with four different materials have been determined. The result shows that, for BLT, the maximum obtained around 22H is 308K, for Adobe it is 309K around 18H30, for BTC it was 309.2K at 20H and finally for cement block it is 310K around 18H. The mean average temperature of the building is low when we use local materials instead of modern one. Then, we conclude that, the use of local materials in the building design is an option for reducing the heat transfer into the room and at the energy consumption.