The Development of a Method to Calculate Sand Failure Conditions