Creating chemical gradients in a fluid