Modeling of lithium-sulfur batteries incorporating the effect of Li2S precipitation