calculate *INITIAL CONDITIONS, Type=encrichment

I am trying to understand how to calculate First and Second signed distance function without CAE  for xfem fracture mechanics problem . is there any formula to calculate manually or can be derived manually ?