A thermal study of the formation of oceanic crust