porespy
                                
                                 porespy copied to clipboard
                                
                                    porespy copied to clipboard
                            
                            
                            
                        find_trapped_regions behaves badly when residual nwp blocks inlets and outlets
If enough blobs of nwp are present, then it is possible that there is not path between the inlets and outlets for the wp to move. In this case is seems that the find_trapped_regions function does not work as expected.  One solution might be to check for percolation between inlets and outlets with nwp set to solid.  If percolation does not exist, then the function can just say that the entire image is trapped.