Closed kbruning closed 1 year ago
The issue was that sets.numNodes did not update when being matched to a connected set across a subDomain. I added a numGlobalNodes attribute to the set class and modified the removeSmallSets function to be dependent on numGlobalNodes. This ran and seems correct. Let me know if anything seems off.
I ran a number of things and this is looking correct for me as well, thank you!
I have created a morphological opening function (calcOpenSW) under equilibriumFluidDistribution.pyx in the KB_morphtools branch that allows for removing any wetting phase components that are smaller than a specified number of voxels (minSetSize) to produce more stable initializations for LBM. The python script testOpen.py can run this successfully.
I am getting failures at line 396, collectSets, that seem to come more frequently at lower saturation targets. They do not appear at all when disabling the removal of small wetting phase components. This error can be reproduced by changing the saturation target in testOpen to 0.75.
I could use help figuring this out. I think that the error is propagating from removeSmallSets because I am not updating the halos after altering the fluid distribution, but wasn't able to confirm that. I will try again.