Stationary flows in the circumstellar envelopes of M giants