Pore-scale simulation of heat and mass transfer in deformable porous media