Mechanical prediction of fracture aperture in layered rocks