Galaxy formation and evolution - I. The Padua tree-sph code (pd-sph)