Title: Hydrodynamics and dust formation in the circumstellar shells of miras and long-period variables