  We take a numerical approach to analyze the mechanisms controlling the
spacing of chimneys -- channels devoid of solid -- in two-dimensional mushy
layers formed by solidifying a binary alloy. Chimneys are the principal
conduits through which buoyancy effects transport material out of the mushy
layer and into the liquid from which it formed. Experiments show a coarsening
of chimney spacing and we pursue the hypothesis that this observation is a
consequence of a variational principle: the chimney spacing adjusts to optimize
material transport and hence maximize the rate of removal of potential energy
stored in the mushy layer. The optimal solute flux increases approximately
linearly with the mushy layer Rayleigh number. However, for spacings below a
critical value the chimneys collapse and solute fluxes cease, revealing a
hysteresis between chimney convection and no flow.
