I am trying to write my own code, however the surface area calculated is highly inaccurate. Trying to use swak4foam, but since I am using HPC for my research, the installation will be a limitation. Enclosed is my code if anyone can suggest what's wrong or any other way to do it.