  We have studied the statics and dynamics of flux lines in a model for YBCO,
using both Monte Carlo simulations and Langevin dynamics. For a clean system,
both approaches yield the same melting curve, which is found to be weakly first
order with a heat of fusion of about $0.02 k_BT_m$ per vortex pancake at a
field of $50 {\rm kG}.$ The time averaged magnetic field distribution
experienced by a fixed spin is found to undergo a qualitative change at
freezing, in agreement with NMR and $\mu {\rm SR}$ experiments. Melting in the
clean system is accompanied by a proliferation of free disclinations which show
a clear B-dependent 3D-2D crossover from long disclination lines parallel to
the c-axis at low fields, to 2D ``pancake'' disclinations at higher fields.
Strong point pins produce a logarithmical $\ln t$ relaxation which results from
slow annealing out of disclinations in disordered samples.
