class AdvectionDiffusion(*args, **kwargs)[source]

Bases: openpnm.algorithms.ReactiveTransport.ReactiveTransport

A subclass of ReactiveTransport to simulate advection-diffusion

remove_BC(pores=None, bctype='all')[source]

Removes boundary conditions from the specified pores

  • pores (array_like, optional) – The pores from which boundary conditions are to be removed. If no pores are specified, then BCs are removed from all pores. No error is thrown if the provided pores do not have any BCs assigned.

  • bctype (string, or list of strings) –

    Specifies which type of boundary condition to remove. Options are:

    -‘all’: (default) Removes all boundary conditions -‘value’: Removes only value conditions -‘rate’: Removes only rate conditions

set_outflow_BC(pores, mode='merge')[source]

Adds outflow boundary condition to the selected pores

  • pores (array_like) – The pore indices where the condition should be applied

  • mode (string, optional) –

    Controls how the boundary conditions are applied. Options are:

    ’merge’ - (Default) Adds supplied boundary conditions to already existing conditions, and also overwrites any existing values. If at rate or value BC exists at the given locations, these are deleted, and outflow conditions are given priority. ‘overwrite’ - Deletes all boundary conditions of the given type then adds the specified new ones.


Outflow condition means that the gradient of the solved quantity does not change, i.e. is 0.