PurposeBody forces are always applied to structures in the form of the weight of materials. In some cases, they can be neglected in comparison with other applied forces. Nevertheless, there is a wide range of structures in civil and mechanical engineering in which weight or other types of body forces are the main portions of the applied loads. The optimal topology of these structures is investigated in this study.Design/methodology/approachTopology optimization plays an increasingly important role in structural design. In this study, the topological derivative under body forces is used in a level-set-based topology optimization method. Instability during the optimization process is addressed, and a heuristic solution is proposed to overcome the challenge. Moreover, body forces in combination with thermal loading are investigated in this study.FindingsBody forces are design-dependent loads that usually add complexity to the optimization process. Some problems have already been addressed in density-based topology optimization methods. In the present study, the body forces in a topological level-set approach are investigated. This paper finds that the used topological derivative is a flat field that causes some instabilities in the optimization process. The main novelty of this study is a technique used to overcome this challenge by using a weighted combination.Originality/valueThere is a lack of studies on level-set approaches that account for design-dependent body forces and the proposed method helps to understand the challenges posed in such methods. A powerful level-set-based approach is used for this purpose. Several examples are provided to illustrate the efficiency of this method. Moreover, the results show the effect of body forces and thermal loading on the optimal layout of the structures.