Porous Media for CFD Applications

Porous media is widely used in CFD to reduce the computational expense of modeling things like filters, perforated plates, and tube banks. To accomplish this reduction in computational expense, the losses across the porous device are modeled mathematically using a simple equation rather than by geometrically resolving the flow obstruction.

 

Using the porous media model requires knowledge of the loss coefficients. These are referred to as the viscous and inertial loss coefficients. These coefficients can be derived from experimental data, empirical correlations in literature, or through CFD. The CFD models used to determine these coefficients are small sections of the full device, which makes the computational expense relatively small.

The pressure loss through a porous domain is represented by the following equation:

 

The change in pressure has two terms. One where the loss is proportional to velocity, and one where loss is proportional to velocity squared. These are referred to as the viscous and inertial losses, respectively.

While the input for different CFD codes can differ, the input into Ansys Fluent will be the Inertial Loss Coefficient (C2) and the Viscous Loss Coefficient (1/alpha). 

While loss coefficients can be derived via either experiment or literature, it is common to determine these coefficients via a CFD model. Since the main goal of porous media is to reduce computational complexity, naturally the whole device should not be modeled when determining these coefficients. Instead, a small “unit cell” model that fully resolves a small section of the porous geometry is used. The model has the sole purpose of generating data that will be used to determine the inertial and viscous coefficients.

The unit cell model will be run at several flow rates and the pressure drop across the model will be recorded. The velocity vs pressure drop curve formed by this data will be curve fit to the form:

Coefficients a and b will then solved for using:

Knowing that the pressure loss will always follow a parabolic curve as described above, any tuning that is perceived to be needed means that the curve fit must be altered. Similarly, if experimental testing reveals that the pressure drop vs velocity curve follows any shape other than a parabola with a y-intercept of zero, then the porous loss model cannot represent this loss accurately across, though a curve fit could potentially be done for some limited range of velocities.

Meshing Tips for Zero Thickness Baffles in Ansys Fluent

A common technique in distributing ducted flow involves thin guiding vanes or baffles.  One of the biggest hurdles to modeling baffles is how thin they are relative to the rest of the model.  If you were to model their true thickness, you typically have a choice between poor quality skewed elements or an excessively high mesh count.  Instead, thin baffles are often approximated as infinitely thin.  

When using Fluent Meshing, the addition of surface bodies in SpaceClaim to represent each baffle is perhaps the quickest approach to adding in baffle geometry. In some cases it is also possible to split up the fluid volume to account for these baffles, but generation of non-manifold geometry is not a viable approach, so this is typically more challenging than the surface body approach.

 

 

 

It is also important to consider inflation on zero thickness baffles. If one was to resolve the actual thickness of a baffle, inflation could wrap around the baffle without issue, but this is not the case for a zero thickness baffle. Instead, inflation will be forced to stair-step wherever the baffle ends in the middle of the fluid volume. These stair-stepped elements are of poor quality and will negatively affect the convergence behavior of the solution.

 

 

 

To prevent stair-stepping, inflation must be allowed to wrap fully around an object, or extend to an external boundary. To accomplish this for the case of zero thickness baffles, additional surfaces must be added to the geometry. Inflation layers can be grown on surfaces that allow flow to pass through them. It would be typical to consider these as “meshing surfaces” as their only purpose in the model is to aid in mesh quality by preventing stair-stepping of inflation layers.

In the case of turning vanes in a duct as pictured in this article, it makes sense to create extensions to the turning vanes that terminate at the inlet and outlet. Note that these additional surfaces must be separate faces from the actual vanes themselves. This is so that the meshing surfaces can be set to interior type boundaries in the solver. This will allow flow to pass through the meshing surfaces unobstructed.

 

 

 

 

 

 

To achieve continuous inflation using these new meshing surfaces, there are two approaches in Fluent Meshing. First, you can intentionally set the meshing surfaces to the wall boundary type in the Update Boundaries task. This will allow you to grow inflation using the default Add Boundary Layers control. When choosing this option it is important to set the meshing surfaces to “Interior” type boundaries once inside the solver otherwise flow will not be able to pass through these surfaces. The second option while meshing is to set the meshing surfaces to “internal” boundaries in the Update Boundaries task. This will then require that you manually scope your boundary layers for these surfaces, but avoids the need to change the boundary type later in the solver. Note that the terminology for a conformal boundary that allows flow to pass through it is different for the mesher and the solver. In the mesher this is “internal” and in the solver this is “Interior.”

Regardless of approach, the final mesh should have no stair-stepping of inflation as shown below. 

 

If in your final model you have no need for multiple cell zones, then you can merge the multiple cell zones together inside of the solver. To do so, go to the Domain Tab > Combine > Merge and select the relevant cell zones. This will remove the workflow information from the case file, so be sure that you have saved the .msh.h5 file separately before performing this operation.

Convergence Monitoring in Ansys Fluent

When solving CFD models using Ansys products, there are a number of ways to determine model convergence.  DRD recommends monitoring a combination of holistic (like individual equation residual values) and local quantities (like surface and point monitors) to ensure a stable, converged solution. Residuals are representative of the average error across all control volumes in the model, while local quantities can help you better focus on key parameters in your model.

Sometimes you might encounter a situation where one or more residual does not reach its convergence target, but important characteristic features being monitored have steadied to a particular value.  Often this is sufficient for approximating the behavior you are simulating, but other times you may need to strive for more precision.  To do so, it is helpful to be able to determine where in the model there are locally high residuals that are preventing the overall residual value from reaching its target.

By default, Fluent only exposes mass-imbalance (related to continuity residual) to the user.  When post-processing, this can be found in the Residuals group of variables.

Ansys Fluent software image of residuals variables

To access the other residuals, you need to enable an expert parameter using the console prior to solving.  Expert parameters can be accessed using the TUI command ‘/solve/set/expert’.  Beyond that, the prompts you receive will depend on your Fluent environment, so we can’t dictate a specific list of responses.  However, to enable the remaining residuals you will need to answer “yes” to the prompt “Save cell residuals for post-processing?”.

Ansys Fluent setting image

After solving you should then see more options for plotting residuals, which will allow you to better evaluate where local error is preventing the overall residual from reaching its convergence target.

Ansys Fluent software image of residuals variables

Often you will find this is associated with a mesh quality issue that requires resolution via remeshing, or even a geometric modification in order to improve mesh quality.