We present results of a simulation study of a fluid of hard spherocylinders
with a length-to-diameter ratio of 15 in contact with a planar hard wall a
nd confined by two parallel hard walls. A Monte Carlo method is del;eloped
for simulating fluids in contact with a single wall. Using this method, we
find a transition from a uniaxial to a biaxial surface phase, followed, at
larger bulk densities, by the formation of a thick nematic film, with the d
irector parallel to the wall, at the wall-isotropic fluid interface. As the
density far from the wall c(b) approaches the value at bulk isotropic-nema
tic coexistence cl, the thickness of the nematic him appears to increase as
-ln(c(1)-c(b)). For a fluid confined by two parallel hard walls, a first-o
rder capillary nematization transition is found. The phase equilibria are d
etermined by Gibbs ensemble Monte Carlo simulations for several wall separa
tions. The difference in the coexisting densities of the capillary condense
d nematic and isotropic phases becomes smaller upon decreasing the wall sep
aration, and no capillary nematization transition is found when the wall se
paration is smaller than about twice the length of the spherocylinders. The
se features imply that the capillary nematization transition ends in a capi
llary critical point at a critical wall separation. Our simulation results
are fully consistent with the findings of our recent theoretical study of t
he Zwanzig model for a hard-rod fluid.