Hydrodynamical-Chemical Models from Prestellar Cores to Protostellar Cores