A multiscale model for the oxide ion conducting and proton conducting solid oxide cells