FormationFactor

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

Bases: openpnm.algorithms.metrics.GenericMetric.GenericMetric

This class works by applying ‘value’ boundary conditions across the domain to find molar flow, then using Fick’s law to back-calculate the effective diffusivity of the domain. The formation factor is defined as:

\[F = \frac{D_{AB}}{D_{eff}} > 1\]

where

\[D_{eff} = \frac{n_{A} L }{\Delta C_{A} A }\]

and

\[D_{eff} = D_{AB} \frac{\varepsilon}{\tau}\]

The formation factor is a convenient metric to compare diffusion in different pore networks since it does not require knowledge of the network porosity, unlike tortuosity. The porosity of a pore network is difficult to determine, mainly because the bulk volume of a network is not well known.

Examples

>>> import openpnm as op
>>> pn = op.network.Cubic(shape=[10, 10, 10], spacing=1e-5)
>>> geo = op.geometry.StickAndBall(network=pn, pores=pn.Ps, throats=pn.Ts)

Now find the formation factor of the network:

>>> F = op.algorithms.metrics.FormationFactor(network=pn)
>>> F.run()
>>> print(F.results)
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Direction                           Formation Factor
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
x                                   ...
y                                   ...
z                                   ...
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
run()[source]

Execute the diffusion simulations in the principle directions.

set_area(direction, area)[source]

Specifies the area of the inlet faces normal to the given direction

Parameters
  • direction (string) – Either ‘x’, ‘y’, or ‘z’, indicating the principle direction

  • area (scalar) – The numerical value of the inlet face area

Notes

If this value is not provided then an attempt is made to calculate it automatically, though this estimate is not perfectly accurate, especially for small networks. This value is placed into the object’s setting dictionary under ‘areas’.

set_inlets(direction, label)[source]

Specifies which pore labels indicate the inlet face for a given direction

Parameters
  • direction (string) – Either ‘x’, ‘y’, or ‘z’, indicating the principle direction

  • label (string) – The pore label indicating which pores define the inlet face

Notes

By default inlets are taken as pores labelled ‘left’, ‘top’ and ‘front’. If your network does not have these labels you should either add them, or change which labels this algorithm looks for using this function, or manual changing the values in the settings['inlets'].

set_length(direction, length)[source]

Specifies the length of the domain along the given direction

Parameters
  • direction (string) – Either ‘x’, ‘y’, or ‘z’, indicating the principle direction

  • area (scalar) – The numerical value of the domain length

Notes

If this value is not provided then an attempt is made to calculate it automatically, though this estimate is not perfectly accurate, especially for small networks. This value is placed into the object’s setting dictionary under ‘lengths’.

set_outlets(direction, label)[source]

Specifies which pore labels indicate the outlet face for a given direction

Parameters
  • direction (string) – Either ‘x’, ‘y’, or ‘z’, indicating the principle direction

  • label (string) – The pore label indicating which pores define the outlet face

Notes

By default outlets are taken as pores labelled ‘right’, ‘bottom’ and ‘back’. If your network does not have these labels you should either add them, or change which labels this algorithm looks for using this function, or manual changing the values in the settings['outlets'].