Self-consistent fluid model for a quantum electron gas