We develop continuum theory of self-assembly and pattern formation in metallic microparticles immersed in a poorly conducting liquid in DC electric field. The theory is formulated in terms of two conservation laws for the densities of immobile particles (precipitate) and bouncing particles (gas) coupled to the Navier-Stokes equation for the liquid. This theory successfully reproduces correct topology of the phase diagram and primary patterns observed in the experiment [Sapozhnikov et al, Phys. Rev. Lett. v. 90, 114301 (2003)]: static crystals and honeycombs and dynamic pulsating rings and rotating multi-petal vortices.