A numerical technique is presented for the thermal force exerted on a solid
particle by a gaseous medium between two flat plates at different temperat
ures, in the free molecular or transition flow. This is a two-dimensional m
olecular-dynamics simulation of hard disks in a inhomogeneous thermal envir
onment. All steady state features exhibited by the compressible hard-disk g
as are shown to be consistent with the expected behaviors. Moreover the the
rmal force experienced by a large solid disk is investigated, and compared
to the analytical case of cylinders moving perpendicularly to the constant
temperature gradient for an infinite Knudsen number and in an infinite medi
um. We show precise examples of how this technique can be used simply to in
vestigate more difficult practical problems, in particular the influence of
nonlinear gradients for large applied differences of temperature, of proxi
mity of the walls, and of smaller Knudsen numbers.