# Size Factors and Transport Conductance#

## Conductance in pore network models#

Consider an arbitrary pore network model such as the one shown below:

For simulating transport in this network, we need to know lots of parameters such as pore sizes, physical properties, etc, but ultimately it comes down to knowing the conductance of the “conduits” in the network. For example, consider simulating Fickian diffusion in a pore network model under steady state conditions. Writing a mass balance around an arbitrary pore \(i\), we have:

where \(Nb^i\) is the number of neighboring pores to pore \(i\), \(m_{ik}\) is the mass flow rate from pore \(i\) to pore \(k\), and \(g_{ik}\) is the overall conductance of the conduit containing pores \(i\) and \(k\), and the connecting throat \(ik\). In simple terms, it means that any mass that enters/exits pore \(i\) must balance such that the net rate is 0. Writing the mass balance for each pore, we get a linear system of \(N_p\) equations (where \(N_p\) is the total number of pores in the network), which can be solved for the pore concentrations using a linear solver.

## Conductance of a single conduit#

Consider a conduit in a pore network model, as shown by the following figure (we assumed spherical pores and cylindrical throats, but this is not necessary):

where L is length, A is the cross-sectional area, and the subscripts \(i\), \(k\), and \(ik\) denote pore \(i\), pore \(k\), and throat \(ik\). Now, consider the diffusional mass transfer between pore \(i\) and pore \(k\) with a mass flow rate of \(m_{ik}\), which can be described by the following equation:

where \(g_{ik}\) is the overall conductance of the conduit \(ik\).

Note

A conduit is the assembly of a throat and the two pores it connects. So, conduit \(ik\) is not the same as throat \(ik\)! The conduit \(ik\) begins at the center of pore \(i\) and ends at the center of pore \(k\).

The overall conductance is a function of the pore sizes, throat sizes, and physical properties of the fluid. Since elements of a conduit are connected in series, by electrical circuit analogy, the resistance (inverse of the conductance) of each element can be related to the overall resistance by the following equation:

where the superscripts \(p\) and \(t\) denote pore and throat, respectively, and \(R_{ik}\) is the resistance of the entire conduit. The equation above can be rewritten in form of conductance as follows:

For simplicity, let’s assume that the shape of the pores and throats are cylindrical as shown in the figure below:

Based on this assumption, the diffusive conductance of each element can be expressed as (more on how to derive these equations comes later):

## Size factors vs. shape factors#

In reality, however, pores/throats are not cylindrical, and the diffusive conductance needs to be **corrected**. This correction factor is called the **shape factor** in the network modeling literature, as defined by the following equation:

Warning

We used to use shape factors in OpenPNM in the past, but for the sake of clarity, we removed them and introduced the concept of “size factor” instead. More on this later.

In OpenPNM, we used to follow this terminology, but because the shape factor depends on both geometrical and physical properties, we coined the term **size factor**, \(\mathcal{S}\) to decouple the geometric part of the conductance from its physical properties dependence, such that the diffusional mass flow rate becomes:

where \(D\) is the diffusivity. In other words, the size factor is the geometric part of the conductance, and so the conductance can be defined in terms of the size factor as:

for diffusive transport, and

for fluid flow, where \(\mu\) is the viscosity.

## Built-in size factor models in OpenPNM#

OpenPNM has a number of built-in functions to calculate the size factor, which can be found under `openpnm.models.geometry`

. Let’s inspect the available diffusive and hydraulic size factor models:

```
import openpnm as op
op.Workspace().settings.loglevel = 50
diffusive_size_factors = op.models.geometry.diffusive_size_factors
print("\n".join(diffusive_size_factors._funcs.__all__))
```

```
spheres_and_cylinders
circles_and_rectangles
cones_and_cylinders
intersecting_cones
hybrid_cones_and_cylinders
trapezoids_and_rectangles
hybrid_trapezoids_and_rectangles
intersecting_trapezoids
pyramids_and_cuboids
intersecting_pyramids
hybrid_pyramids_and_cuboids
cubes_and_cuboids
squares_and_rectangles
intersecting_trapezoids
ncylinders_in_series
```

```
import openpnm as op
hydraulic_size_factors = op.models.geometry.hydraulic_size_factors
print("\n".join(hydraulic_size_factors._funcs.__all__))
```

```
spheres_and_cylinders
circles_and_rectangles
cones_and_cylinders
intersecting_cones
hybrid_cones_and_cylinders
trapezoids_and_rectangles
intersecting_trapezoids
hybrid_trapezoids_and_rectangles
pyramids_and_cuboids
intersecting_pyramids
hybrid_pyramids_and_cuboids
cubes_and_cuboids
squares_and_rectangles
ncylinders_in_series
```

Note

The diffusive size factor models can be used for any physics that involves molecular diffusion such as heat conduction, electron transport, etc, and therefore, it is not limited to the diffusive **mass** transport. The hydraulic size factor models, however, are only applicable to fluid flow algorithms such as `StokesFlow`

.

## Deriving the size factor for arbitrary-shaped pores and throats#

In this section, we will derive the equation for the size factor for arbitrary-shaped pores and throats, then we will apply it to the case of cylindrical pores and throats to retrieve the equations we used in the previous section.

Consider the following conduit, which consists of pore \(i\), throat \(ik\), and pore \(k\):

Note that the choice of spheres and cylinders in the above figure is arbitrary and will not be taken into account in the derivation.

### Diffusive size factor#

From the Fick’s law of diffusion, the diffusive mass flow rate between pore \(i\) and pore \(k\) is given by (assuming that the transport begins at the center of pore \(i\) and ends at the center of pore \(k\)):

where \(A(x)\) is the cross-sectional area of the conduit at position \(x\), and \(dc/dx\) is the concentration gradient. Rearranging the equation above, we get:

Integrating the above equation over the entire conduit, we get:

Note that \(m_{ik}\) and \(D\) are not a function of \(x\), so they can be taken out of the integral. Since the conduit elements are connected in series, the above equation can be rewritten as:

and after rearranging, we get:

By comparing the above equation with equations (1), and (2), we can get:

Combining the above equation with the definition of the diffusive size factor, \(g = \mathcal{S} \cdot D\), we get:

Canceling the \(1/D\) terms, we can finally get the size factors for each conduit element:

where \(A_i(x)\), \(A_k(x)\), and \(A_{ik}(x)\) are the cross-sectional areas of pores \(i\), \(k\), and throat \(ik\), respectively. Note that the above equations are valid for any arbitrary shape of the pores and throats.

As a test case, let’s consider cylindrical pores and throats. In this case, the cross-sectional area of the each element is given by:

where \(d_i\), \(d_k\), and \(d_{ik}\) are the diameters of pores \(i\), \(k\), and throat \(ik\), respectively. Substituting the above equations into the above equations, we get:

which matches what we declared earlier in equation (3).

### Hydraulic size factor#

For brevity, we will not go into the nitty-gritty details of the derivation of the hydraulic size factors. Instead, we will give you some pointers on where to start. The derivation of the hydraulic size factors is slightly more involved than that of the diffusive size factors. The main reason is that fluid flow equations need to satisfy two sets of boundary conditions, pressure drop along the domain (\(p_i\) and \(p_k\) at the two ends of the conduit), and no slip at the lateral boundaries (walls), whereas for diffusive transport, only the concentration boundary conditions need to be satisfied (\(c_i\) and \(c_k\) at the two ends of the conduit).

Assuming that the cross-section of the conduit is gradually changing, the pressure drop along the conduit can be approximated by the following equation [1]:

where \(Q\) is the volumetric flow rate, \(I_p^*\) is the *specific polar moment of inertia* [2] (don’t worry if you don’t know what this is, there are tables in the literature that you can use to look up the values for different shapes), \(A(x)\) is the cross-sectional area of the conduit, and \(\mu\) is the viscosity of the fluid. Rearranging and integrating the above equation, we get:

From calculus, we know that:

Substituting the above equation into equation (5), we get:

which can further be simplified to:

where the first term in the right-hand-side is the frictional loss, and the second term is the inertial loss. The frictional loss is a function of the conduit geometry, and the inertial loss is a function of the flow rate and the conduit geometry. The frictional loss is usually much larger than the inertial loss, so we can safely ignore the inertial loss to obtain:

Similar to the diffusive transport, the hydraulic conductance is defined as the ratio of the flow rate to the pressure drop as follows:

where \(g_{ik}\) is the hydraulic conductance (we use the same notation as the diffusive conductance to keep it simple in this notebook). Expanding the integral over the conduit on each element (pores \(i\) and \(k\), and throat \(ik\)), and by comparing equations (6) and (7), we get:

Combining the above equation with the definition of the hydraulic size factor, \(g = \mathcal{S} / \mu\), we get:

from which, we can obtain the hydraulic size factor for each conduit element as follows:

As a test case, consider cylidnrical pores and throats. The specific polar moment of inertia for a cylinder is:

Substituting the above equation and the cross-sectional areas from equation (4) into equation (8), we get:

To verify the above results, we can inspect the Hagen-Poiseuille equation for a cylindrical conduit [3]:

Since the hydraulic size factor is defined as \(g / \mu\), and the hydraulic conductance is defined as \(Q / \Delta p\), we can derive the following relationship for the hydraulic size factor based on the Hagen-Poiseuille equation:

which matches our derivation.

## Conduit vs. element size factor#

So far, we have derived individual equations for the size factor of each conduit element as well the entire conduit (based on resistors in series model). Note that eventually, only the size factor of the entire conduit is used by the algorithms, although as we discussed, it is directly calculated from the size factors of the individual elements.

Almost all of the built-in size factor models in OpenPNM return an Nt by 3 array, where Nt is the number of conduits (same as the number of throats!). The first column is the size factor of the pore on the left side of the conduit, the second column is the size factor of the throat, and the third column is the size factor of the pore on the right side of the conduit.

However, we do have one model (at the time of writing this notebook) that uses a machine learning method [4] to predict the diffusive size factor of the **entire conduit** directly from a voxel image of the porous medium. For this reason, it only returns an Nt by 1 vector. Our built-in conductance models (which take in the size factor and physical properties as input and return the conductance) are designed to work with both types of size factor models.