  A variational calculation for vortex penetration is presented. Variational
trial functions for the Meissner state are combined with variational functions
for a vortex near the surface. The latter is based on Clem's trial solutions
for a vortex in bulk, which were adapted to include surface effects through
consideration of an image vortex. Three variational parameters are considered,
corresponding to the effective coherence length of the vortex, the effective
penetration length for the Meissner currents, and the value of the order
parameter at the surface. The results show that the last two variational
parameters are independent of vortex position. Explicit calculations are
presented for several $\kappa$ values. The energy barrier for vortex
penetration is shown to be in good agreement with full numerical calculations
of the Ginzburg--Landau equations. We consider the variation of the magnetic
flux carried by a vortex as it gets inside the superconductor and agreement
with known experimental and theoretical results is obtained. The model was
extended to calculate the force between two vortices, and the results show that
the force goes to zero as the pair comes close to the surface. This result can
be of interest for the study of the melting of the vortex lattice and for
vortices confined in mesoscopic superconductors. The variational approach can
be very helpful for intermediate $\kappa$ values when numerical calculations
become computationally demanding because it provides manageable expressions for
all physically relevant quantities.
