A model for the thermo-hydro-mechanical analysis of multiphase porous media in dynamics