A numerical model for solid oxide fuel cells