**3. Methodology**

In this work is used the code ANSYS-Fluent® [37, 38] and all CFD methodologies presented are embedded in this program. Like most CFD codes, ANSYS contains three main elements: (a) a preprocessor, (b) a solver, and (c) a postprocessor, the role of each one will be described briefly in the next sections.

ANSYS Fluent solves conservation equations for mass and momentum. For flows involving heat transfer or compressibility, an additional equation for energy conservation is solved. Additional transport equations are solved when the flow has other features such as transport species, chemical reactions, turbulence, etc. Since conservation equations are widely known, we will present only the simplified version and will focus in describing the porous media approach briefly.

*A CFD Porous Materials Model to Test Soil Enriched with Nanostructured Zeolite Using… DOI: http://dx.doi.org/10.5772/intechopen.100487*

The equation for conservation of mass, or continuity equation, can be written as follows:

$$\frac{\partial \rho}{\partial t} + \nabla \bullet \left(\rho \overrightarrow{v}\right) = \mathbb{S}\_m \tag{1}$$

Eq. (1) is the general form of the mass conservation equation and is valid for incompressible as well as compressible flows. The source Sm is the mass added to the continuous phase from the dispersed second phase (for example, due to vaporization of liquid droplets) and any user-defined sources.

Conservation of momentum in an inertial (non-accelerating) reference frame is described by the next equation [39]:

$$\frac{\partial}{\partial t} \left( \rho \overrightarrow{\boldsymbol{\nu}} \right) + \nabla \bullet \left( \rho \overrightarrow{\boldsymbol{\nu}} \, \overrightarrow{\boldsymbol{\nu}} \right) = -\nabla \mathbf{p} + \nabla \bullet \left( \overleftarrow{\overline{\mathbf{r}}} \right) + \rho \overrightarrow{\mathbf{g}} + \overrightarrow{F} \tag{2}$$

where *p* is the static pressure, *τ* <sup>¼</sup> is the stress tensor (described below), *ρ g* ! is the gravitational body force and *F* ! represent external body forces (for example, those arising from interaction with the dispersed phase). *F* ! also contains other modeldependent source terms such as porous-media and user-defined sources.

#### **3.1 Geometry and meshing**

Geometry and meshing are part of the preprocessing phase to resolve a computational fluid dynamics problem. The definition of the key features of our model starts with the idea of simulating a water flow through a porous zone formed by a thin layer of zeolite applied over a layer of soil. This model consists of a vertical arrangement of a packed bed like porous zone formed by the two layers, both contained in a transparent pipe with a water flow from top to bottom applied by gravity. PTC-CREO [40] was used to develop the 3D CAD model needed so CAE software may be enabled to carry on with the CFD simulation. SpaceClaim is a module within ANSYS used to prepare geometries for CFD calculations [37] and, it was used to extract the fluid domain for the meshing procedures. The module ANSYS meshing was used to carry on with the meshing procedure of the fluid domain.

#### **3.2 Porous media model**

The porous media model incorporated in ANSYS-Fluent can be used in a wide variety of single phase and multiphase problems, for example, flow through packed beds, filter papers, perforated plates, flow distributors, and others.

In this model, a cell zone is selected as the porous media where ANSYS methodology is applied by means of user inputs and the Momentum Equations for Porous Media, for further information the reader is referred to the ANSYS-Fluent manual [38].

#### **3.3 Limitations and assumptions of the porous media model**

The porous media model incorporates an empirically determined flow resistance in a region of your model defined as "porous". In essence, the porous media model adds a momentum sink in the governing momentum Equations [38]. The model would represent a porous zone without a detailed exact model of the porosity within the materials at microscale, in other words, the porous zone will be represented

qualitatively and will be resolved with equations empirically defined to do so as explained briefly in the next paragraphs.

#### **3.4 Momentum equations for porous media**

The porous media models for single phase flows and multiphase flows use the Superficial Velocity Porous Formulation as the default. ANSYS Fluent calculates the superficial phase or mixture velocities based on the volumetric flow rate in a porous region.

Porous media are modeled by the addition of a momentum source term to the standard fluid flow equations. The source term is composed of two parts: a viscous loss term (Darcy's equation first term on the right-hand side, and an inertial loss term (Darcy's equation second term on the right-hand side), as shown next:

$$\mathbf{S}\_{i} = -\left(\sum\_{j=1}^{3} D\_{ij}\mu v\_{j} + \sum\_{j=1}^{3} \mathbf{C}\_{ij}\frac{1}{2}\rho|v|v\_{j}\right) \tag{3}$$

where *Si* is the source term for the i-th (*x, y*, or *z*) momentum equation, |*v*| is the magnitude of the velocity and *D* and *C* are prescribed matrices. This momentum sink contributes to the pressure gradient in the porous cell, creating a pressure drop that is proportional to the fluid velocity (or velocity squared) in the cell which enables a viable calculation route without the need of microscale porosity details.

To recover the case of simple homogeneous porous media

$$\mathbf{S}\_{i} = -\left(\frac{\mu}{a}\nu\_{i} + \mathbf{C}\_{2}\frac{1}{2}\rho|\boldsymbol{v}|\boldsymbol{v}\_{j}\right) \tag{4}$$

where α is the permeability and *C*<sup>2</sup> is the inertial resistance factor, simply specify *D* and *C* as diagonal matrices with 1/α and *C*2, respectively, on the diagonals (and zero for the other elements).

ANSYS Fluent also allows the source term to be modeled as a power law of the velocity magnitude [38]:

$$\mathbf{S}\_{i} = -\mathbf{C}\_{0}|\boldsymbol{\nu}|^{C\_{1}} = -\mathbf{C}\_{0}|\boldsymbol{\nu}|^{(C\_{1}-1)}\boldsymbol{v}\_{i} \tag{5}$$

where *C*<sup>0</sup> and *C*<sup>1</sup> are user-defined empirical coefficients. **Important**

In the power-law model, the pressure drop is isotropic and the units for *C*<sup>0</sup> are SI but we will not enter any further in the mathematical model supporting this idea and will refer the reader to ANSYS manuals and proper references contained in there to develop this model in part or in whole at the reader convenience.

#### **3.5 Darcy law and Darcy-Forchhimer**

In laminar flows through porous media, the pressure drop is typically proportional to velocity and the constant can be considered zero. Ignoring convective acceleration and diffusion, the porous media model then reduces to Darcy's Law [38]:

$$
\nabla p = -\frac{\mu}{a}\vec{v}\tag{6}
$$

Pressure drop is computed in ANSYS Fluent for each one of the three (*x, y, z*) coordinate directions within the porous region according to:

*A CFD Porous Materials Model to Test Soil Enriched with Nanostructured Zeolite Using… DOI: http://dx.doi.org/10.5772/intechopen.100487*

$$\Delta p\_x = \sum\_{j=1}^3 \frac{\mu}{\alpha} \nu\_j \Delta n\_x$$

$$\Delta p\_\chi = \sum\_{j=1}^3 \frac{\mu}{\alpha} \nu\_j \Delta n\_\chi \tag{7}$$

$$\Delta p\_x = \sum\_{j=1}^3 \frac{\mu}{\alpha} \nu\_j \Delta n\_x$$

where 1*=αij* are the entries in the matrix *D* in Eq. (3), *vi* are the velocity components in the *x, y*, and *z* directions, and Δ*nx*, Δ*ny*, and Δ*nz* are the thicknesses of the medium in the *x, y*, and *z* directions.

Here, the thickness of the medium (Δ*nx*, Δ*ny*, or Δ*nz*) is the actual thickness of the porous region in our model. Therefore, if the thicknesses used in the model differ from the actual thicknesses, adjustments may be needed in the inputs for 1*=αij* .

Calculations for laminar flow regime models were based in Darcy law. For calculations under turbulent flow regime Darcy-Forchhimer is the mathematical model used by ANSYS.

#### **3.6 Processing**

This work was processed using ANSYS Fluent®. The pressure–velocity coupling scheme controls the way pressure and velocity are updated when the pressurebased solver is used. The scheme can be either segregated (pressure and velocity are updated sequentially) or coupled (pressure and velocity are updated simultaneously) [38]. The scheme used in this work for pressure–velocity coupling is SIMPLE. For spatial discretization we use least squares cell based for gradient, PRESTO! for pressure and second order upwind for momentum. This set up was successful to treat single layer and double layer porous media models and convergence was reached with few to moderate number of iterations.

#### **3.7 Postprocessing**

The results module provided by ANSYS® was used to visualize code/numerical results, the data may be presented in different ways to facilitate the numerical analysis. The figures and graphs were generated from the numerical sheet produced within ANSYS-Fluent. These may include domain geometry and grid display, vector plots, line, and shaded contour plots, 2D and 3D surface plots, particle tracking, and view in perspective (translation, rotation, scaling, etc.), and few hand-made numerical computations.

### **4. Results and discussion**

This work was developed using computational fluid dynamics (CFD) as implemented in ANSYS-Fluent. The calculation processes are explained in the next paragraphs.

#### **4.1 Geometry and meshing**

The geometries and assemblies initially were developed using CAD programs, but they can be designed either way in the geometry module within ANSYS, which
