AdvectionDiffusion.set_source(propname, pores, mode='overwrite')

Applies a given source term to the specified pores.

  • propname (str) – The property name of the source term model to be applied.

  • pores (array_like) – The pore indices where the source term should be applied.

  • mode (str) –

    Controls how the sources are applied (see table under Notes). The default is ‘overwrite’. Options are:




    Adds supplied source term to already existing ones.


    Deletes all existing source terms of the given propname then adds the specified new ones.


Source terms cannot be applied in pores where boundary conditions have already been set. Attempting to do so will result in an error being raised.