So, I tried “decomposing brep”, “boundary surface” and “brep join”, and i can get two total volume values, although the volumes for some of the open breps are not calculated:
Thank you very much, @HS_Kim, for your advice. I learnt a lot from the solution you suggested.
You solution is to find those object containing “open brep” and then filter out the surfaces in them that are facing upward and downward, and then use the caps component to reconstruct each fully enclosed object which is composed of closed breps only.
So, following your method, I provided an alternative approach which just removes the first surface within each fully enclosed object containing “open brep”, which in this case it happens to be the bottom surface (and it could be any other surface). This creates a “hole” on the object, literally, which can then be patched up by the caps component in the same way as yours.
The revised GH file including your solution is attached here.