  Monte Carlo simulations are used to study the translocation of a polymer into
a cavity. Modeling the polymer as a hard-sphere chain with a length up to N=601
monomers, we use a multiple-histogram method to measure the variation of the
conformational free energy of the polymer with respect to the number of
translocated monomers. The resulting free-energy functions are then used to
obtain the confinement free energy for the translocated portion of the polymer.
We characterize the confinement free energy for a flexible polymer in cavities
with constant cross-sectional area A for various cavity shapes (cylindrical,
rectangular and triangular) as well as for tapered cavities with pyramidal and
conical shape. The scaling of the free energy with cavity volume and
translocated polymer subchain length is generally consistent with predictions
from simple scaling arguments, with small deviations in the scaling exponents
likely due to finite-size effects. The confinement free energy depends strongly
on cavity shape anisometry and is a minimum for an isometric cavity shape with
a length/width ratio of unity. For translocation into infinitely long cones,
the scaling of the free energy with taper angle is consistent with a
theoretical prediction employing the blob model. We also examine the effects of
polymer bending rigidity on the translocation free energy for cylindrical
cavities. For isometric cavities, the observed scaling behaviour is in partial
agreement with theoretical predictions. In addition, translocation into highly
anisometric cylindrical cavities leads to a multi-stage folding process for
stiff polymers. Finally, we examine the effects of crowding agents inside the
cavity. We find that the confinement free energy increases with crowder
density. At constant packing fraction the magnitude of this effect lessens with
increasing crowder size for crowder/monomer size ratio$\geq$ 1.
