Upscaling of the Coupling of Hydromechanical and Thermal Processes in a Quasi-static Poroelastic Medium