# FickianDiffusion¶

class openpnm.algorithms.FickianDiffusion(*args, **kwargs)[source]

A class to simulate binary diffusion with reactions

Parameters
• network (GenericNetwork) – The network object to which this algorithm will apply.

• name (str, optional) – Name of the algorithm

Notes

Fickian diffusion in porous materials occurs in the void space, but becuase the diffusion is confined to pores it is impacted by the porosity and tortuosity of the network. Thus the total diffusive flux through the network is reduced. This class can be used to simualte diffusion-reaction in domains with specified boundary conditions, or it can be used to calculate the effective diffusivity of the network by applying controlled boundary conditions on opposing faces, calculating the diffusion rate, and inverting Fick’s first law as follows:

$D_{eff} = N_{A}*L/(A*\Delta C_{A})$
Attributes
A

The coefficients matrix, A (in Ax = b)

Np

A shortcut to query the total number of pores on the object

Nt

A shortcut to query the total number of throats on the object

Ps

A shortcut to get a list of all pores on the object

Ts

A shortcut to get a list of all throats on the object

b

The right-hand-side (RHS) vector, b (in Ax = b)

name

String representing the name of the object

network

A shortcut to get a handle to the associated network.

project

A shortcut to get a handle to the associated project.

settings

Dictionary containing object settings.

x

Shortcut to the solution currently stored on the algorithm.

Methods

 get_conduit_data(poreprop[, throatprop, mode]) Combines requested data into a single 3-column array. Retrieves requested property from associated objects, to produce a full Np or Nt length array. interpolate_data(propname[, mode]) Determines a pore (or throat) property as the average of it's neighboring throats (or pores) map_pores(pores, origin[, filtered]) Given a list of pore on a target object, finds indices of those pores on the calling object map_throats(throats, origin[, filtered]) Given a list of throats on a target object, finds indices of those throats on the calling object props([element, mode, deep]) Returns a list containing the names of all defined pore or throat properties. rate([pores, throats, mode]) Calculates the net rate of material moving into a given set of pores or throats remove_BC([pores, bctype]) Removes boundary conditions from the specified pores. remove_source(propname[, pores]) Removes source terms from specified pores. reset([source_terms]) Resets the algorithm to enable re-use. Fetches the calculated quantity from the algorithm and returns it as an array. run([solver, x0]) Builds the A and b matrices, and calls the solver specified in the settings attribute. set_rate_BC(pores[, rates, total_rate, mode]) Apply constant rate boundary conditons to the specified locations. set_source(propname, pores[, mode]) Applies a given source term to the specified pores. set_value_BC(pores, values[, mode]) Applues constant value boundary conditons to the specified pores. set_variable_props(variable_props[, mode]) This method is useful for setting variable_props to the settings dictionary of the target object. show_hist([props, bins, fontsize]) Shows a quick plot of key property distributions. to_indices(mask) Converts a boolean mask to a list of pore or throat indices. to_mask([pores, throats]) Convert a list of pore or throat indices into a boolean mask of the correct length. toindices(*args, **kwargs) Brief explanation of tomask tomask(*args, **kwargs) Brief explanation of tomask