  There is growing evidence that some long gamma-ray bursts (GRBs) arise from
the core collapse of massive stars, and thus it is inevitable that the
environments of these GRBs are preburst stellar winds or dense media. We
studied, for the first time, the wind model for afterglows based on the
Blandford-McKee self-similar solution of a relativistic shock, and suggested
that GRB 970616 is an interactor with a stellar wind. We also proposed a dense
medium model for some afterglows, e.g., the steepening in the light curve of
the R-band afterglow of GRB 990123 may be caused by the adiabatic shock which
has evolved from an ultrarelativistic phase to a nonrelativistic phase in a
dense medium. We further discussed the dense medium model in more details, and
investigated the effects of synchrotron self absorption and energy injection. A
shock in a dense medium becomes nonrelativistic rapidly after a short
relativistic phase. The afterglow from the shock at the nonrelativistic stage
decays more rapidly than at the relativistic stage. Since some models for GRB
energy sources predicted that a strongly magnetic millisecond pulsar may be
born during GRB formation, we discussed the effect of such a pulsar on the
evolution of the nonrelativistic shock through magnetic dipole radiation. We
found that in the pulsar energy injection case, the dense medium model fits
very well all the observational data of GRB 980519. Recently, we combined the
dense medium model with the pulsar energy injection effect to provide a good
fit to the optical afterglow data of GRB 000301C.
