A fractal analysis of the water retention curve