To simulate heat transfer processes through periodic devices with nonuniform wall temperature distributions, we propose to decompose the regular temperature into two parts: namely the transient part and the equilibrium part. These two parts can be solved independently under their individual wall and inlet/outlet conditions. By calculating the flow field and the two component functions in one periodic module, one can easily generate the distributions of regular temperature in one or multiple modules. The algorithm and implementation are described in details, and the method is discussed thoroughly from mathematical, physical, and numerical aspects. Sample simulations are also presented to demonstrate the capacity and usefulness of this method for future simulations of thermal periodic flows using various numerical schemes.