  The energetics of a Brownian heat engine and heat pump driven by position
dependent temperature, known as the B\"uttiker-Landauer heat engine and heat
pump, is investigated by numerical simulations of the inertial Langevin
equation. We identify parameter values for optimal performance of the heat
engine and heat pump. Our results qualitatively differ from approaches based on
the overdamped model. The behavior of the heat engine and heat pump, in the
linear response regime is examined under finite time conditions and we find
that the efficiency is lower than that of an endoreversible engine working
under the same condition. Finally, we investigate the role of different
potential and temperature profiles to enhance the efficiency of the system. Our
simulations show that optimizing the potential and temperature profile leads
only to a marginal enhancement of the system performance due to the large
entropy production via the Brownian particle's kinetic energy.
