In nozzles and diffusers the cross-section area follows the one defined by the pressure gradient. In a nozzle it decreases to keep mass flow rate constant. In a diffuser the opposite happens.
But say you had a regular pipe with air, constant area, and the pressure was greater on one end. In my mind the velocity would have to increase because of the pressure gradient and this would mean one of two things happens:
The density decreases a lot to keep mass flow rate constant. This seems unlikely because density doesn't change much for subsonic flow.
The density drops a little but mainly the flow pulls away from the walls, forcing an area constriction to keep mass flow rate constant. This also seems unlikely because there would be a vacuum where it pulls away.
So, my question is what really happens in this scenario?