PDF

Analyzing Porous Structures on the Microscopic Scale
Introduction
Modeling flow through realistic porous structures is difficult due to the complexity of the structure itself. Resolving the flow field in detail is not feasible in real-life applications. Therefore, macroscopic approaches utilizing averaged quantities of the porous structure, such as porosity and permeability, are used. This example analyzes the flow field at the pore scale in detail. The results are used to validate and adapt the macroscopic description, which in turn are used to model large-scale porous geometries.
Model Definition
The modeled geometry shown in Figure 1 is a representative elementary volume (REV) whose properties are representative for the entire system.
Figure 1: Geometry of the REV’s pore volume.
Because only the area of the pore space is required for modeling, the porous matrix is not resolved explicitly. The REV has a quadratic cross section of 2 cm side length and a width of 6 cm. Water flows with a velocity of u = 0.1 mm/s and can flow out freely in the normal direction at the other end. The other boundaries are assumed to be symmetry boundaries. This does not correspond to the actual situation, but for modeling an REV, symmetry boundary conditions are very well suited.
To characterize the flow inside the porous structure one can estimate the Reynolds number according to
with the water density ρ = 1000 kg/m3 and viscosity μ = 10-3 Pa·s. The cross-section side length serves as the characteristic length scale, L. This results in Re 2 and the Stokes equation can be used to describe the flow where inertia terms are neglected.
Finally, the goal of the model is to obtain the averaged values for porosity and permeability to describe a macroscopic model with, for example, Darcy’s law or the Brinkman equation. The porosity is defined as the fraction of pore space volume Vfluid to total volume Vtot:
.
To calculate the permeability κ (m2) the following relationship is used:
Approximating the pressure gradient p by the pressure difference between the inlet and the outlet, Δp, divided by the side length L, and replacing the velocity vector u by the outlet velocity uout in the flow direction gives the expression
.
Results and Discussion
First of all it is interesting to have a look at the mesh, or rather the mesh quality. Although the mesh quality in itself says nothing about the quality of the results, a good mesh quality is beneficial for convergence. The overall mesh quality as shown in Figure 2 is very good.
Figure 2: Mesh quality plot.
The velocity field in the REV is shown in Figure 3. Characteristic for the flow in a porous material are areas with high and areas with low velocity. In some areas the flow also stagnates. This behavior is characterized by the permeability.
Figure 3: Velocity in the REV.
From the simulation the values for the porosity and permeability are obtained, with ε = 0.373 and .
Notes About the COMSOL Implementation
An STL file of the porous structure is imported and remeshed directly in the meshing sequence. This means that the geometry sequence is kept empty. To resolve the velocity gradients at the boundaries of the porous matrix, add a boundary layer mesh.
Application Library path: Porous_Media_Flow_Module/Fluid_Flow/pore_scale_flow_3d
Modeling Instructions
From the File menu, choose New.
New
In the New window, click  Model Wizard.
Model Wizard
1
In the Model Wizard window, click  3D.
2
In the Select Physics tree, select Fluid Flow>Single-Phase Flow>Creeping Flow (spf).
3
Click Add.
4
Click  Study.
5
In the Select Study tree, select General Studies>Stationary.
6
Geometry 1
1
In the Model Builder window, under Component 1 (comp1) click Geometry 1.
2
In the Settings window for Geometry, locate the Units section.
3
From the Length unit list, choose cm.
Import the STL file and remesh it directly in the meshing sequence. This means that the geometry sequence will be kept empty.
Mesh 1
The meshing sequence will define the geometric model on which the physics is defined. The mesh is therefore set up completely before assigning material and physics.
Import 1
1
In the Mesh toolbar, click  Import.
2
In the Settings window for Import, locate the Import section.
3
Click  Browse.
4
5
From the Boundary partitioning list, choose Detect boundaries.
Increase the tolerance to collapse small and sliver mesh elements. This avoids the creation of small boundaries.
6
From the Repair tolerance list, choose Absolute.
7
In the Absolute tolerance text field, type 1e-5.
An increased Maximum neighbor angle will aid the algorithm in forming as few boundaries as possible while still recognizing the planar faces.
8
Locate the Detect Faces section. In the Maximum neighbor angle text field, type 62.
9
Locate the Import section. Click  Import.
Join Entities 1
Join all the boundaries of the free surface to one boundary.
1
In the Mesh toolbar, click  Join Entities.
Instead of clicking on boundaries in the Graphics window, paste the numbers from this document or type them in manually.
2
In the Settings window for Join Entities, locate the Geometric Entity Selection section.
3
Click  Paste Selection.
4
In the Paste Selection dialog box, type 14-20 in the Selection text field.
5
6
In the Settings window for Join Entities, click  Build Selected.
The imported STL file only contains a triangle mesh without domains. Use Create Domains to form the fluid domain in the enclosed volume.
Create Domains 1
1
In the Mesh toolbar, click  Create Entities and choose Create Domains.
2
In the Settings window for Create Domains, click  Build Selected.
Take a look in the Messages log to confirm that the mesh now contains one domain and 37 boundaries.
Next, increase the quality of the triangle mesh by remeshing the faces using a Free Triangular operation. This will also result in triangles of more equal size.
Free Triangular 1
1
In the Mesh toolbar, click  Boundary and choose Free Triangular.
2
In the Settings window for Free Triangular, locate the Boundary Selection section.
3
From the Selection list, choose All boundaries.
Size
1
In the Model Builder window, expand the Free Triangular 1 node, then click Size.
2
In the Settings window for Size, locate the Element Size section.
3
From the Calibrate for list, choose Fluid dynamics.
4
From the Predefined list, choose Fine.
Free Triangular 1
Set an even finer mesh size on the free surface.
Size 1
1
In the Model Builder window, right-click Free Triangular 1 and choose Size.
2
In the Settings window for Size, locate the Geometric Entity Selection section.
3
Click  Clear Selection.
4
Click  Paste Selection.
5
In the Paste Selection dialog box, type 14 36 37 in the Selection text field.
6
7
In the Settings window for Size, locate the Element Size section.
8
Click the Custom button.
9
Locate the Element Size Parameters section. Select the Maximum element size check box.
10
11
Click  Build Selected.
The surface mesh is now of good quality.
Next, generate a tetrahedral mesh in the domain of the porous structure.
Free Tetrahedral 1
In the Mesh toolbar, click  Free Tetrahedral.
Size
1
In the Model Builder window, expand the Free Tetrahedral 1 node, then click Size.
2
In the Settings window for Size, locate the Element Size section.
3
From the Calibrate for list, choose Fluid dynamics.
4
From the Predefined list, choose Fine.
5
Click  Build Selected.
Boundary Layers 1
In order to resolve the large velocity gradients at the boundaries to the porous matrix properly, add a boundary layer mesh.
In the Mesh toolbar, click  Boundary Layers.
Boundary Layer Properties
1
In the Model Builder window, click Boundary Layer Properties.
2
In the Settings window for Boundary Layer Properties, locate the Geometric Entity Selection section.
3
Click  Paste Selection.
4
In the Paste Selection dialog box, type 14 36 37 in the Selection text field.
5
6
In the Settings window for Boundary Layer Properties, locate the Layers section.
7
In the Number of layers text field, type 1.
8
In the Thickness adjustment factor text field, type 10.
9
Click  Build Selected.
10
In the Mesh toolbar, click  Plot.
Results
Mesh 1
Compare with Figure 2. The overall mesh quality is very good. The amount of mesh elements with low quality (skewness) is low. Mesh quality is not an indication for the accuracy of the solution, but it affects the convergence behavior.
Global Definitions
Add some parameters that are used to set up the model.
Parameters 1
1
In the Model Builder window, under Global Definitions click Parameters 1.
2
In the Settings window for Parameters, locate the Parameters section.
3
Materials
Water
1
In the Model Builder window, under Component 1 (comp1) right-click Materials and choose Blank Material.
2
In the Settings window for Material, type Water in the Label text field.
3
Locate the Material Contents section. In the table, enter the following settings:
Creeping Flow (spf)
1
In the Model Builder window, under Component 1 (comp1) click Creeping Flow (spf).
2
In the Settings window for Creeping Flow, click to expand the Discretization section.
3
From the Discretization of fluids list, choose P1+P1.
Linear elements reduce the number of degrees of freedom to be solved. Because the geometry already requires a fine mesh, using linear elements decreases computational time and memory requirements while maintaining sufficient accuracy.
Inlet 1
1
In the Physics toolbar, click  Boundaries and choose Inlet.
2
3
In the Settings window for Inlet, locate the Velocity section.
4
In the U0 text field, type u_in.
5
Locate the Boundary Selection section. Click  Create Selection.
6
In the Create Selection dialog box, type Inlet in the Selection name text field.
7
Outlet 1
1
In the Physics toolbar, click  Boundaries and choose Outlet.
2
3
In the Settings window for Outlet, locate the Pressure Conditions section.
4
Select the Normal flow check box.
5
Locate the Boundary Selection section. Click  Create Selection.
6
In the Create Selection dialog box, type Outlet in the Selection name text field.
7
Create a few more selections to use them throughout the model set up.
Definitions
Wall
1
In the Model Builder window, expand the Component 1 (comp1)>Definitions node.
2
Right-click Definitions and choose Selections>Explicit.
3
In the Settings window for Explicit, type Wall in the Label text field.
4
Locate the Input Entities section. From the Geometric entity level list, choose Boundary.
5
It might be easier to select the correct boundary by using the Selection List window. To open this window, in the Home toolbar click Windows and choose Selection List. (If you are running the cross-platform desktop, you find Windows in the main menu.)
Note that the boundary numbering differs compared to the numbering in the meshing sequence. This is due to the associativity update that runs when the Finalize node is built.
All boundaries
1
In the Definitions toolbar, click  Explicit.
2
In the Settings window for Explicit, locate the Input Entities section.
3
From the Geometric entity level list, choose Boundary.
4
Select the All boundaries check box.
5
In the Label text field, type All boundaries.
Symmetry
1
In the Definitions toolbar, click  Difference.
2
In the Settings window for Difference, type Symmetry in the Label text field.
3
Locate the Geometric Entity Level section. From the Level list, choose Boundary.
4
Locate the Input Entities section. Under Selections to add, click  Add.
5
In the Add dialog box, select All boundaries in the Selections to add list.
6
7
In the Settings window for Difference, locate the Input Entities section.
8
Under Selections to subtract, click  Add.
9
In the Add dialog box, in the Selections to subtract list, choose Inlet, Outlet, and Wall.
10
Creeping Flow (spf)
Symmetry 1
1
In the Physics toolbar, click  Boundaries and choose Symmetry.
2
In the Settings window for Symmetry, locate the Boundary Selection section.
3
From the Selection list, choose Symmetry.
Study 1
1
In the Model Builder window, click Study 1.
2
In the Settings window for Study, locate the Study Settings section.
3
Clear the Generate default plots check box.
4
In the Home toolbar, click  Compute.
Create the plot as shown in Figure 3.
5
In the Results toolbar, click  More Datasets and choose Surface.
Results
Surface 1
1
In the Settings window for Surface, locate the Selection section.
2
From the Selection list, choose Wall.
Velocity
1
In the Results toolbar, click  3D Plot Group.
2
In the Settings window for 3D Plot Group, type Velocity in the Label text field.
3
Locate the Plot Settings section. Clear the Plot dataset edges check box.
Surface 1
1
Right-click Velocity and choose Surface.
2
In the Settings window for Surface, locate the Data section.
3
From the Dataset list, choose Surface 1.
4
Locate the Expression section. In the Expression text field, type 1.
5
Locate the Coloring and Style section. From the Coloring list, choose Uniform.
6
From the Color list, choose Gray.
Line 1
1
In the Model Builder window, right-click Velocity and choose Line.
2
In the Settings window for Line, locate the Data section.
3
From the Dataset list, choose Surface 1.
4
Locate the Coloring and Style section. From the Coloring list, choose Uniform.
5
From the Color list, choose Black.
6
In the Velocity toolbar, click  Plot.
7
From the Color list, choose Custom.
8
Streamline 1
1
Right-click Velocity and choose Streamline.
2
In the Settings window for Streamline, locate the Selection section.
3
From the Selection list, choose Inlet.
4
Locate the Streamline Positioning section. In the Number text field, type 40.
5
Locate the Coloring and Style section. Find the Line style subsection. From the Type list, choose Tube.
6
Select the Radius scale factor check box.
7
Color Expression 1
1
Right-click Streamline 1 and choose Color Expression.
2
In the Settings window for Color Expression, locate the Coloring and Style section.
3
From the Color table list, choose AuroraBorealis.
Next, determine the porosity and permeability for our REV in order to perform simulations at the macroscopic level.
Definitions
Integration 1 (intop1)
1
In the Definitions toolbar, click  Nonlocal Couplings and choose Integration.
2
In the Settings window for Integration, locate the Source Selection section.
3
From the Selection list, choose All domains.
Average Inlet
1
In the Definitions toolbar, click  Nonlocal Couplings and choose Average.
2
In the Settings window for Average, type Average Inlet in the Label text field.
3
Locate the Source Selection section. From the Geometric entity level list, choose Boundary.
4
From the Selection list, choose Inlet.
Average Outlet
1
In the Definitions toolbar, click  Nonlocal Couplings and choose Average.
2
In the Settings window for Average, type Average Outlet in the Label text field.
3
Locate the Source Selection section. From the Geometric entity level list, choose Boundary.
4
From the Selection list, choose Outlet.
Variables 1
1
In the Model Builder window, right-click Definitions and choose Variables.
2
In the Settings window for Variables, locate the Variables section.
3
Since you have introduced new variables, the solution needs to be updated. It is not necessary to compute the study again.
Study 1
In the Study toolbar, click  Update Solution.
Results
Global Evaluation 1
1
In the Results toolbar, click  Global Evaluation.
2
In the Settings window for Global Evaluation, click Add Expression in the upper-right corner of the Expressions section. From the menu, choose Component 1 (comp1)>Definitions>Variables>por - Porosity.
3
Click Add Expression in the upper-right corner of the Expressions section. From the menu, choose Component 1 (comp1)>Definitions>Variables>kappa - Permeability - .
4
Click  Evaluate.
The results are shown in the Table window. The porosity is 0.371 and the permeability is about 3e-8m2. These results can now be used for calculations of large scale models.
Streamline 1
To make the results even more descriptive, create an animation.
1
In the Model Builder window, under Results>Velocity click Streamline 1.
2
In the Settings window for Streamline, locate the Coloring and Style section.
3
Find the Point style subsection. From the Type list, choose Interactive arrow.
4
In the Extra release times text field, type 2000.
Animation 1
1
In the Velocity toolbar, click  Animation and choose Player.
You can adjust the number of frames to obtain a smooth animation of the interactive arrows. This animation visualizes very nicely that there are regions in the porous medium with both very slow and very high velocity.