Modeling and design of semi-solid flow batteries