Motivated by rock-fluid interactions occurring in a geothermal reservoir, we present a two-dimensional pore scale model of a periodic porous medium consisting of void space and grains, with fluid flow through the void space. Ions in the fluid are allowed to precipitate onto the grains, while minerals in the grains are allowed to dissolve into the fluid, and we take into account the possible change in pore geometry that these two processes cause, resulting in a problem with a free boundary at the pore scale. We include temperature dependence and possible effects of the temperature in both fluid properties and in the mineral precipitation and dissolution reactions. For the pore scale model equations, we perform a formal homogenization procedure to obtain upscaled equations. A pore scale model consisting of circular grains is presented as a special case of the porous medium.