InvasionPercolation.set_outlet_BC(pores=None, mode='add')[source]#

Specifies which pores are treated as outlets for the defending phase

This must be specified if trapping is to be considered.

  • pores (ndarray) – The indices of the pores from which the defending fluid exits the domain

  • mode (str or list of str, optional) –

    Controls how the boundary conditions are applied. Options are:




    (default) Adds the supplied boundary conditions to the given locations. Raises an exception if values of any type already exist in the given locations.


    Adds supplied boundary conditions to the given locations, including overwriting conditions of the given type or any other type that may be present in the given locations.


    Removes boundary conditions of the specified type from the specified locations. If bctype is not specified then all types are removed. If no locations are given then values are remvoed from all locations.

    If a list of strings is provided, then each mode in the list is handled in order, so that ['remove', 'add'] will give the same results add 'overwrite'.