As far as it comes to refraction, the only thing it matters is the the angle. Raytracing engines do this on polygon level. Things considered in calculation are material (with it's refraction index) angle of entrance and polygon normal, after that exit angle of the ray itself is calculated. No raytracer, to my knowledge, checks to see if surface is open or closed. The thing which really matters in getting more accurate and natural look in your final render is MaximumRayDepth and Caustics setting in your render room