Simulating the D/H ratio of water formed in the early solar nebula