The formal generation of models for scientific simulations