We have developed a combined chemical and hydrodynamical model of cometary comae. The model is described and used to follow the deuterium chemistry occurring in the coma after the sublimation of D-rich nuclear ices. It is shown that the molecular D/H ratios in parent species remain unchanged in the coma gas, confirming that observations of such molecules can be used to infer the D/H ratio in the nuclear ices. The D/H ratios in daughter molecules reflect that of their parents, and so can potentially be used to elucidate the formation mechanisms of these species. In particular, observations of DNC may be able to resolve the uncertainty surrounding the origin of HNC in cometary comae.