OpenPNM
OpenPNM copied to clipboard
Add ability to specify residual invading phase in drainge, imbibition, and ip
I had to remove this capability during the recent refactor since the handling of trapping was quite tricky in the presence of residual invading phase. I basically declared this as a future feature we'll add, which is why I'm creating this issue. Below are a few points:
- [ ] The ability/desire to specify results pores AND throats complicates things. The percolation algorithms assume that invasion/filling happens in certain order, like "invaded throat, filled attached pore", but specifying the residual could contradtict this and break some logical assumptions.
- [ ] In IP, the residual pores need to be noted separately and IF/WHEN they get reconnected, THEN their throats need to be added to the queue. If residual throats are specified, then I'm not quite sure how to deal with them...are the attached pores set to invaded immediately?
- [ ] In drainage, the residual pore are included in the percolation without any extra thought. Trapping is tricky though...what if 2 pores are filled with invaded phase, but their shared throat is not? This throat would be trapped, but this is not how the trapping check works.
Basically, including residual seems like it will require a long list of special cases/checks to properly catch trapping, which seems like a bad design. We need to find a more universal/robust way.