When the magnetic field applied to a type-II superconductor exceeds Hc1, the total free energy of the system is lowered by allowing partial flux penetration in the form of vortices. Since the core of a vortex line is essentially normal, there is a gain in energy equivalent to the condensation energy per unit length for each vortex formed--assuming that .However, this energy gain is more than compensated for by the decrease in magnetic energy per unit length due to the region around the vortex which is no longer diamagnetic. The vortex line can lower its own energy by interacting with a nearby nonsuperconducting inhomogeneity, so as to become ``pinned''. Spatial inhomogeneities in the superconducting order parameter arising from impurities or other structural defects, chemical vacancies, grain boundaries, twin boundaries, etc., exert an attractive force on the vortex. The effective range rp of the pinning force must be at least of the order of the coherence length (vortex core radius), since this is the smallest length scale resolveable by the vortex core . Pinning from inhomogeneities smaller than this is much less effective. For weakly interacting vortices, the energy saved by the vortex line passing through a point defect of range and length d along the vortex axis is (Ref. ). The elementary pinning force fp acting on the vortex core is given by . To depin, the vortex line must move over the distance , so that .Modelling extended defects, such as grain boundaries, is generally more complicated since one must integrate over the entire inhomogeneity. To obtain the bulk pinning force per unit volume of the superconductor, one must sum over all the contributions from the various pinning inhomogeneities. In general this summation is non-trivial.
In magnetic fields where the repulsive interaction between vortex lines becomes significant, the pinning of vortices to fixed positions in the superconductor can deform the vortex lattice from its ideal configuration. The deformation of the vortex lattice in response to the force exerted by a pinning center is determined by its elastic properties, namely the shear and tilt moduli c66 and c44 [54,55,56,57,58]. Deformations will increase the elastic energy of the vortex lattice. According to the ``collective pinning'' theory of Larkin and Ovchinnikov , the equilibrium configuration is achieved by minimizing the sum of the vortex line energy and the elastic energy of the vortex lattice. At low magnetic fields the interaction energy between vortex lines is weak, so that random pinning centers will cause only a small increase in the elastic energy of the vortex lattice. This implies that random pinning of the vortex lines will be most prominent at low magnetic fields. At high magnetic fields, weak pinning centers cannot compete with the increased strength of the vortex-vortex interactions. In this case, only strong pinning sites will hold individual vortex lines in place independently of the repulsive interaction with neighboring vortices.
In the high-Tc cuprates, the vortex lines are particularly susceptible to pinning because the vortex lattice is ``soft''. In particular, they have a small line tension due to the weak coupling between the CuO2 planes which gives way to highly flexible vortices . Due to this flexibility, the vortices can become twisted, distorted or entangled . Pinning effects will be stronger in these short coherence length superconductors. According to Brandt , randomly positioned stiff vortex lines will always broaden the SR line shape, whereas the pinning of segments of highly flexible vortex lines will sharpen the measured magnetic-field distribution. In YBa2Cu3O, rough surfaces, oxygen vacancies and twin boundaries are the dominant sources of pinning. In powdered samples or thin films, pinning by rough surfaces can dominate the vortex-lattice configuration in the bulk. Oxygen vacancies appear to be the dominant ``point-like'' defect in single crystals . Twin planes occur naturally in YBa2Cu3Oalong the (110) and (10) directions, because of the orthorhombic crystal structure. The depression of the order parameter at a twin boundary attracts vortices, and can result in the creation of multivortex chains oriented along the boundary. If the twin plane spacing is not commensurate, this can produce distortions in the vortex-lattice geometry. In YBa2Cu3O, changes in the vortex-lattice geometry can stem from a combination of twin-boundary pinning and in-plane mass anisotropy. This will be discussed more fully below.
At low temperatures the vortices are essentially frozen into their distorted configuration. As the temperature is raised, however, thermal fluctuation of the vortex-line positions become important. Thermal fluctutations in the high-Tc materials are considerably stronger than in conventional superconductors. This is partly due to: (1) the small value of the in-plane coherence length , (2) the high Tc which allows for high thermal energies to be reached in the superconducting state, and (3) the layered nature of these compounds. Strong thermal fluctuations greatly reduce the pinning strength. According to Feigel'man et al. , because of thermal motion of the vortex lines, the vortex core will experience a defect potential averaged over the increased effective range , where is the root-mean-square (RMS) average of the vortex-line thermal displacements from their equilibrium positions . The pinning strength is reduced by this smoothing of the effective pinning potential accompanied by a reduction in the collective pinning force. Thermal depinning will occur at a temperature Tp (H) at which .The depinning of vortices results in a region of reversibility in the phase diagram. Below the so-called ``irreversibility line'', the vortices are pinned by defects, whereas above this line the vortices are free to move in response to an external force. As noted earlier, the presence of the reversible region complicates measurements of Hc2 (T). In particular, the resistive transition between the superconducting and normal states is no longer sharp due to the motion of vortices (which experience a Lorentz force from the applied current). The energy which keeps the vortices moving is removed from the current--so that the resistance of the material is not zero above the irreversibility line. Thus, it is the irreversibility line which is usually measured, since Hc2 (T) no longer exists as a phase boundary.
If the vortex fluctuations are sufficiently large, the vortex lattice will undergo a melting transition at a temperature Tm (H) (<Tc) into a vortex-liquid phase. In the liquid phase, the vortex lines are not pinned and the interaction force between vortices is weak. As a result, there is generally no long range order in the lattice. It is currently a matter of debate whether or not the melting temperature Tm coincides with the thermal depinning temperature Tp. Since pinning is sample dependent, so is the irreversibility line. Thus, only some experiments suggest that .
Vortex-lattice melting has been observed at high temperatures and/or magnetic fields in nearly-optimally doped, untwinned and high-quality twinned YBa2Cu3O single crystals, from magnetization measurements using a mechanical torsional oscillator [63,64], from sharp drops in resistivity measured at high magnetic fields [65,66,67,68,69,70,71,72], from discontinuous jumps in magnetization measured using a SQUID magnetometer [73,74,75,76], from jumps in ac susceptibility measured using a Hall probe  and from measured steps in specific heat [78,79,80,81]. Many of these experiments also support a first-order melting transition of the 3D vortex lattice in YBa2Cu3O.
It should be noted that the melting of the vortex lattice is a phenomenon which is not unique to the high-Tc materials. Melting behaviour has been observed at high magnetic fields in Nb-Ti and Nb3Sn wires , polycrystalline Nb foils and NbSe2 single crystals  and Nb thin films  and Nb single crystals . It should be noted that there are other more likely interpretations  of the measurements in Ref.  and other experiments  show no evidence for melting in Nb over the field range claimed. Recently, Ghosh et al.  performed AC susceptibility measurements on single crystals of NbSe2 at low magnetic fields in the vortex state. They observed a re-entrant ``peak effect'' at low fields, which may be a signature of vortex-lattice melting. The peak effect refers to an abrupt and nonmonatonic increase in the critical current density, which shows up as a negative peak in the AC susceptibility. A narrow melted-vortex region between the solid vortex state and the Meissner state was originally proposed by Nelson . Figure 4.4 shows a simplified magnetic phase diagram, which roughly illustrates the vortex-solid and vortex-liquid regions.
Theoretical predictions for the shape of the melting line in the H-T phase diagram [62,90,91,92] are usually based on the Lindemann criterion . In this picture the vortex lattice is expected to melt when exceeds some small fraction cL of the intervortex spacing L. Typically the Lindemann number cL is of the order 0.1, although experimentally, some variation in this number is expected since the Lindemann criterion does not account for the effects of pinning. Pinning is expected to modify the first order melting transition, to perhaps a ``vortex-glass'' transition , where the lattice freezes into a state in which the vortices form an irregular disordered pattern or into a highly disordered state in which the vortex lines are ``entangled'' [95,96]. The melting transition in the H-T phase diagram is reasonably described by the power-law relation in moderate magnetic fields .Brandt  and Houghton et al.  considered a nonlocal elastic theory for the vortex lattice to arrive at a power-law exponent . Blatter and Ivlev [97,98] later argued that this result is really only valid in YBa2Cu3O close to Tc. They performed a more rigorous calculation which takes into account the suppression of the order parameter near Hc2(T), as well as quantum fluctuations, to yield a melting line which is better described with a smaller value of n. This prediction is supported by several experiments on YBa2Cu3O which report exponents of [65,68,70,73,75,76,77,99]. Some of these experiments [75,76,77] report power-law dependences for the melting line in which , the critical exponent expected within the 3D XY critical regime .
Although YBa2Cu3O is a layered material, near optimal doping the vortex lattice behaves in an essentially three-dimensional manner over most of the H-T phase diagram. This is not the case for the highly anisotropic compound Bi2Sr2CaCu2O, where the coupling between planes is very weak even well below Tc. For this material it is useful to consider the 3D vortex line as being composed of a stack of aligned 2D vortex ``pancakes'', where the pancakes exist within the superconducting layers (i.e. CuO2 planes) . The Lawrence-Doniach (LD) model  is a reasonable starting point for a theoretical treatment of this problem. In this model adjacent superconducting layers are separated by an insulating layer of thickness s. The vortex pancakes in neighboring layers are connected by Josephson vortices which exist within the Josephson junctions between the superconducting layers. The vortex pancakes in adjacent CuO2 planes thus couple through both magnetic interactions and Josephson tunneling. A third coupling mechanism, namely the indirect effect of the Coulomb interaction, has been suggested by Duan . The relevant parameter in the LD model is the ratio of the -axis coherence length to s. When there is no phase difference in the order parameter between neighboring layers, so that in the absence of pinning the vortex lattice exhibits 3D behaviour--equivalent to the anisotropic London and GL models. On the other hand, when there may be a phase difference and the LD theory describes a quasi-2D vortex structure. The LD model will not be completely satisfactory in a superconductor in which the material between the superconducting layers is not completely insulating. In this case the proximity effect may become important.
At low temperatures vortex pancakes between neighboring layers are aligned. However, in a superconductor with random inhomogeneities, pinning will displace some of the pancakes and cause a suppression of the phase coherence between layers . The effects of random pinning-induced misalignment of the vortex pancakes on the measured SR field distribution has been the focus of several studies [61,104,105,106,107,108,109]. The effects include a reduction in both the line shape width and the line shape asymmetry. When the magnetic field is increased, the interaction between pancake vortices within a layer will eventually exceed the coupling strength between the pancake vortices in neighboring layers. In this case random pinning in the layers will lead to a misalignment of the pancake vortices between layers. Thus, in a highly anisotropic system with inhomogeneities, a dimensional crossover from a 3D to a 2D vortex structure can be induced by magnetic field. Harshman et al.  observed a narrowing and a loss of asymmetry in the SR line shape for Bi2Sr2CaCu2Oat low temperatures and high magnetic fields, which they attributed to pinning-induced misalignment of the pancake vortices. In the same study, the SR line shape for YBa2Cu3O under similar conditions was found to be in agreement with a 3D vortex lattice. Other SR studies on Bi2Sr2CaCu2O[107,108] provide additional support for a field-induced dimensional crossover.
Clem  has shown that the thermal energy required to misalign 2D pancake vortices is extremely small. The effect of thermal fluctutations on the vortex lattice is very different between the regions of weak and strong magnetic fields . In low magnetic fields the displacement amplitude of the pancake vortices due to thermal fluctuations is much larger than the relative displacement of the vortices between layers. On the other hand, as just noted, in strong magnetic fields the vortex-vortex interactions within a layer are stronger than those between layers. In this case thermal fluctutations act in a quasi-2D manner.
The effects of thermal fluctuations on the measured internal field distribution have been previously studied by SR in Bi2Sr2CaCu2O [107,111]. Rapid fluctutation of a vortex about its average position can increase the apparent core radius and smear the magnetic field out over an effective radius of . The smearing effect reduces the average of the field distribution in the vortex-core region. The muon detects the field averaged over the fluctutations, since the typical time scale for thermal fluctuations of the vortices ( s ) is much shorter than , where is the muon gyromagnetic ratio and is the range of the field fluctuation at the muon site. The result is a premature truncation of the high-field tail in the measured SR line shape. A proper analysis of the corresponding muon precession signal would lead to an overestimate of the vortex-core radius r0. The effect of thermal fluctuations on the high-field tail was nicely demonstrated in Ref. . The melting transition in Bi2Sr2CaCu2O was determined by Lee et al. [107,111] by observing additional changes in the SR line shape--namely, a reduction in the line width and in the asymmetry of the line shape as a function of temperature and magnetic field. Numerical simulations of the magnetic field distribution were later provided by Schneider et al. , for both a vortex liquid phase and a disorder-induced 2D phase. Good agreement was reported between these theoretical line shapes and those measured in the experiments by Lee et al.
Although the coupling strength between CuO2 planes in fully oxygenated YBa2Cu3O is sufficient to yield a vortex structure which exhibits 3D behaviour over the majority of the H-T phase diagram, such is not the case in the underdoped material. Magnetization measurements performed on YBa2Cu3O6.60 are consistent with quasi-2D fluctutation behaviour . As I will show later, due to this reduced dimensionality, SR measurements of the internal magnetic field distribution in YBa2Cu3O6.60 yield a rich phase diagram which is comparable to that for Bi2Sr2CaCu2O.