In this work we present a brief derivation of the periodic orbit expan
sion for simple dynamical systems, and then we apply it to the study o
f a classical statistical mechanical model, the Lorentz gas, both at e
quilibrium and in a nonequilibrium steady state. The results are compa
red with those obtained through standard molecular dynamics simulation
s, and they are found to be in good agreement. The form of the average
using the periodic orbit expansion suggests the definition of a new d
ynamical partition function, which we test numerically. An analytic fo
rmula is obtained for the Lyapunov numbers of periodic orbits for the
nonequilibrium Lorentz gas. Using this formula and other numerical tec
hniques we study the nonequilibrium Lorentz gas as a dynamical system
and obtain an estimate of the upper bound on the external field for wh
ich the system remains ergodic.