DUST FORMATION IN WINDS OF LONG-PERIOD VARIABLES.IV. ATMOSPHERIC DYNAMICS AND MASS LOSS