The delayed action of magnesium anodes in primary batteries: Part II. Theoretical studies