FickianDiffusion¶
- class FickianDiffusion(*args, **kwargs)[source]¶
Bases:
openpnm.algorithms.ReactiveTransport.ReactiveTransport
A class to simulate binary diffusion with reactions
- Parameters
network ((OpenPNM Network object)) – The network object to which this algorithm will apply.
name ((string, optional)) – Name of the algorithm
project ((OpenPNM Project object, optional)) – Either a Network or a Project must be supplied
Notes
Fickian diffusion in porous materials occurs in the void space, but becuase the diffusion is defined 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 arbitrarily complex boundary conditions, or it can be used to calculate the effective diffusivity of the network by applying controlled boundary conditions on opposing faces, calculate the diffusion rate, and inverting Fick’s first law:
\[D_{eff} = N_{A}*L/(A*\Delta C_{A})\]This class includes a method for calculating Deff automatically assuming appropriate boundary conditions were applied (
calc_eff_diffusivity
). The length and area of the domain should be supplied, but if they are not an attempt is made to calculate them.- calc_effective_diffusivity(inlets=None, outlets=None, domain_area=None, domain_length=None)[source]¶
This calculates the effective diffusivity in this linear transport algorithm.
- Parameters
inlets (array_like) – The pores where the inlet composition boundary conditions were applied. If not given an attempt is made to infer them from the algorithm.
outlets (array_like) – The pores where the outlet composition boundary conditions were applied. If not given an attempt is made to infer them from the algorithm.
domain_area (scalar, optional) – The area of the inlet (and outlet) boundary faces. If not given then an attempt is made to estimate it, but it is usually underestimated.
domain_length (scalar, optional) – The length of the domain between the inlet and outlet boundary faces. If not given then an attempt is made to estimate it, but it is usually underestimated.
Notes
The area and length of the domain are found using the bounding box around the inlet and outlet pores which do not necessarily lie on the edge of the domain, resulting in underestimation of sizes.