Defect engineering: design tools for solid state electrochemical devices