To solve the partial differential equations describing the fluid flow, three solution methods, called solvers, are available in FlowDict:
LIR
The LIR (Left Identity Right) solver uses a non-uniform adaptive grid which results in very low memory requirements. While the LIR solver’s speed is comparable to the SimpleFFT solver for low porous materials, it is very fast (and should be chosen) for highly porous materials. See Linden et al. (2015) for more information.
It can be used to solve the Stokes, Darcy Flow, Stokes-Brinkman, Navier-Stokes, and Navier-Stokes-Brinkman equations.
|
SimpleFFT
The SimpleFFT (Simple Fast Fourier Transform) solver takes longer to converge for highly porous materials and requires more memory, but it can deal with non-linear (non-laminar) fluid flow as well as with linear flow. Therefore, faster flows, which are not necessarily laminar and are modeled by the Navier-Stokes equation can be computed with the SimpleFFT solver.
It can be used to solve the Stokes, Stokes-Brinkman, Navier-Stokes, and Navier-Stokes-Brinkman equations
The SimpleFFT solver is very fast for low porosity materials and is a much better choice than the EJ solver for this type of materials.
|
EJ
The EJ (Explicit Jump) solver is very fast for highly porous materials and has low memory requirements but can only be applied to flows when the pressure drop/flow velocity dependence is linear (laminar), i.e., for the Stokes equation and Darcy Flow only.
For Stokes simulations, the EJ solver should not be used for low porous materials (50% or less porosity) such as reservoir rocks or ceramics. For these kinds of materials, the SimpleFFT or LIR solver perform much better.
|

|
Know how! It is important to distinguish between porous materials and porous voxels.
A flow simulation is run on a 3D material model, e.g., glass fibers, where the pores are filled with air. Thus, a highly porous material is a material with more fluid voxels than solid voxels, e.g., 80% air and 20% glass fibers.
Alternatively, a voxel, i.e. a grid cell, can be defined as porous voxel, if the pores in a material are too small to be resolved by the computational grid.
|
The sketch below shows which solver can be applied in which use case. The equations are denoted in red. The gray boxes show where the solution exhibits a linear relation between pressure drop and flow rate, and the blue boxes show where the 3D structure can have porous voxels:
Solver Benchmarks
Three parallelization benchmark results for FlowDict are shown here. All benchmark computations were run on a server with 2 x Intel E5-2697A v4 processors with 16 cores each, running with a maximum of 3.60 GHz, and 1,024 GB RAM.
Sandstone Benchmark
The first example is the computation of the flow through a synthetic X-ray tomography data of a sandstone structure (Mattila et al., 2016). The structure has a porosity of 13.5% and a size of 2,048 x 2,048 x 2,032 voxels.
Together with an inlet and outlet of 8 voxels each, the flow computation is performed on a structure size of 2,0483. This structure size is optimal to speed up runtime, since 2,048 is a power of two. The smaller the factors in the prime factorization of the number of voxels in each coordinate direction, the better for the runtime of SimpleFFT.
The flow through the structure is computed by solving the Stokes equation with the LIR solver (speed optimization and memory optimization) and with the SimpleFFT solver. The following figure shows the runtime for a different number of processes to compute the permeability of 3.3e-13 m2 with an error bound of 0.01 with both solvers. Runtime and speedup of the parallelization are better for the LIR solver. For both solvers, the ideal speedup, i.e., getting half of the runtime for twice of the number of processes is also shown. The computation with the LIR solver is close to the ideal speedup, which is usually not possible to reach for real life examples.
|
Filter Benchmark
The second benchmark is the computation of the flow through a filter structure with linear increasingly fiber density.
The structure size is 2,048 x 2,048 x 2,032 voxels, with an inlet and an outlet of 8 voxels (i.e., in total 8.6 billion voxels). So, like for the sandstone structure, the size is optimal to get a short runtime even for a large structure. The porosity of 94.2% is much larger than for the sandstone structure example.
The flow through the structure is computed by solving the Stokes equation, with the LIR (speed optimization) and the SimpleFFT solver.
The following figure shows the runtime for a different number of processes to compute the permeability of 5.63e-11 m2 for SimpleFFT and 5.69e-11 m2 for LIR. Both results are equal within the chosen error bound of 1%. The benefit of using the LIR solver compared to SimpleFFT is large for the structure with high porosity. The computation with the LIR solver is close to the ideal speedup, which is usually not possible to reach for real life examples.
|
Multilayer Weave Benchmark
The third benchmark is the computation of fast airflow through a multilayer weave. The structure has a size of 400 x 800 x 1024 including 150 voxels inlet and 800 voxels outlet (i.e., in total ~300 million voxels).
The flow through the structure is computed by solving the Navier-Stokes equation, with the LIR (speed optimization) and the SimpleFFT solver with and without using Tdma. The Velocity Inlet, Pressure outlet boundary condition is used and the average flow velocity is 3 m/s.
The SimpleFFT solver with using Tdma reduces the runtime in this benchmark by up to 50%.
|
Memory requirements for the examples and both solvers are listed in the following table:
Memory Requirements
The RAM required for a flow computation depends on the set of flow equations, structure size, porosity, boundary conditions, parallelization, and the selected solver itself. Here, basic hints are given to estimate the memory requirements for the EJ solver, the SimpleFFT solver, and the LIR solver.
We assume a structure with
- NX, the voxels in X-direction,
- NY, the voxels in Y-direction,
- NZ, the voxels in Z-direction,
- NI, additional inlet voxel layers,
- NO, additional outlet voxel layers, and
- P, the number of parallel processes
In addition, we assume that a flow in Z-direction is computed. Then, the total number of voxels is given by
The EJ and SimpleFFT solver are MPI-parallel and need to have some overlap slices for each process in memory. The number of voxels including overlap slices is then given by
The memory requirements can now be roughly estimated using the following formulas for each of the solvers:
Memory estimation for EJ
The memory required by the EJ solver depends on the total number of voxels, the boundary conditions, the number of pore-solid interfaces and the number of parallel processes. The number of pore-solid interfaces depends on the solid volume fraction (SVF). A rule of thumb is:
A more accurate rule of thumb that considers the SVF is:
For symmetric boundary conditions in flow direction the memory requirements are doubled. The unit of the estimated memory is in bytes.
|
Memory estimation for SimpleFFT
The memory required by the SimpleFFT solver depends on the total number of voxels, the boundary conditions, and the number of parallel processes. A rule of thumb is:
For symmetric boundary conditions in flow direction the memory requirements are doubled. The unit of the estimated memory is in bytes.
|
Memory estimation for LIR
The estimation of the LIR memory requirements is more complicated due to the adaptive grid structure. The memory that is required for a flow computation depends on the set of equations (Stokes or Stokes-Brinkman), the total number of voxels, and the solid volume fraction (SVF). The memory requirements are directly correlated to the number of adaptive grid cells. The number of adaptive grid cells depends on the number of pore-solid interfaces. A rule of thumb is:
where
if Optimize is set for Speed, else the value is 0, and
if Stokes-Brinkman or Navier-Stokes-Brinkman is computed, else the value is 0.
|