OpenPNM
OpenPNM copied to clipboard
Conduit lengths should throw warning if negative
I was using spheres_and_cylinders
model and got negative conduit lengths. There was no error thrown until it was noticed that I had nans in my conductance. I had to trace that error all the way back to find a problem with conduit lengths. And in my exact case, the conduit lengths were negative because of overlapping pores where the pore center of the one pore was inside the other. I think this should be caught when conduit lengths are calculated. Just do a quick check for any negative conduit lengths and throw a warning at least.