Conditions for the appearance of discharges during the gravitational compaction of powders