A three-body potential model for the static simulation of defects in ionic crystals