HDO and the D/H ratio are essential to understand Mars past and present climate, in particular with regard to the evolution through ages of the Martian water cycle. We present here new modeling developments of the HDO cycle with the LMD Mars GCM. The present study aims at exploring the behaviour of the D/H ratio cycle and its sensitivity to the modeling of water ice clouds and the formulation of the fractionation by condensation. Our GCM simulations are compared with observations provided by the Atmospheric Chemistry Suite (ACS) on board the ESA/Roscosmos Trace Gas Orbiter, and reveal that the model quite well reproduces the temperature and water vapor fields, which offers a good basis for representing the D/H ratio cycle. The comparison also emphasizes the importance of modelling the effect of supersaturation, resulting from the microphysical processes of water ice clouds, to correctly account for the water vapor and the D/H ratio of the middle-to-upper atmosphere. This work comes jointly with a detailed comparison of the measured D/H profiles by TGO/ACS and the model outputs, conducted in the companion paper of Rossi et al. 2022 (this issue).