# Porous media to simulate a filter placed inside a pipe

In many engineering applications porous media like radiators, filters or vents in the flow will create a blockage or a pressure drop on the flow itself. While i is possible to model them explicitly meshing every detail of the element, this would require an extremely fine mesh, for this reason in CFD those elements are normally modelled as porous media which will artificially alter the flow characteristics.

This tutorial shows how to add a porous media in SimWorks to simulate the pressure drop coming from the introduction of a filter inside a pipe. The results will show the introduced pressure drop along the pipe coming from the new porous media.

SimWorks uses the Darcy-Forchheimer law porosity model. The model takes into account separately a linear variation (Darcy contribution) which takes into account the effect of the porous media itself as a linear effect with velocity proportional to porosity (Darcy’s lawand a parabolic contribution (Forchheimer term). For Reynolds numbers above 10 the inertial effects (Forchheimer term) will become important:

which is defined by

\begin{gather} S = -(\mu d +\frac{\rho |U|}{2} f)U \end{gather} (1)

Where:

d = Darcy coefficient [1/m2]

f = Forchheimer coefficient [1/m]

On top of the natural combination of the 2 main pressure drop modes, it is also possible to only have a single contribution from one of the 2 terms by considering the following cases:

• Pressure drop parabolic with velocity (d = 0 –  Forchheimer contribution only)
• Pressure drop linear with velocity (f = 0 – Darcy contribution only)

Negative Darcy/Forchheimer parameters are not valid. The orientation of the porous region is defined with the same notation as a coordinate system.

To estimate the actual parameters you can also find a useful calculation tool here.

## Setting up the CFD analysis of the porous media in SimWorks

This tutorial is based on the Pipe flow tutorial completed using our free CFD software Simworks. It is required for you to complete that tutorial first before proceeding because this new tutorial will share the setup with the original one

## Setup the simulation

Please complete the setup phase of the original CFD analysis of pipe flow tutorial before adding the porous media. You can complete the pipe flow tutorial and then right click on it and select Simulation Manager and then Duplicate. This will create a new simulation with all the base parameters of the original one and you can quickly add the porous media definition:

## Setup the porous media

Once you imported the geometry in the Geometrical viewer, just click on the Add volume button

This will add a generic volume. From the Regions tree define the following parameters. We will use only the Darchy term of porosity in the X direction of 500000, the coefficients in the other 2 directions are 1 order of magnitude higher to simulate the radiator channels walls which do not allow the flow to move in a direction normal to the radiator main axis:

• Volume shape: Box (Other base shapes are available, like Sphere, Cone, Cylinder)
• Surface level: 0 1
• Edge Level: 1 (refines the mesh in the porous media by 1 level)
• Shape origin: -1.1 -0.3 0
• Shape dimensions: 0.5 1 1
• Volume type: Porous region
• Porosity coefficient D: 500000 5000000 5000000 (see above)
• Porosity coefficient F: 0 0 0 (noForchheimer term for the quadratic porosity)
• Reference frame: Absolute (Different reference systems can be defined if required)

## Setup and Mesh phases

To complete this tutorial we strongly reccommend activating the 14-day free trial of the commercial version to be able to run it on at least 4 cores. Once the Setup and Mesh phases have been completed to visualise the mesh, right click on it → select Fields → Load

You can see that the area where the porous media region intersects the pipe has been refined by 2 levels as specified above:

## Run the simulation and analyse the results

Once the simulation has run we can load the results of the pipe tutorial without a porous media in the Field viewer, we can then select the results of the current tutorial, right click on the results → select Fields → Load to add the new results to the old ones.

Select a view normal to Z and show just the mid plane normal to Z selecting p as value to be plot. Also set as parameter the pressure p with limits -30 / 100:

You will find that the case on the right with the porous media is showing a much bigger pressure because of the increased blockage. Activate the delta view pressing on the Show/Hide delta button, show the mesh pressing the Show/Hide edges button on the top left corner of the GUI. If  and check the pressure on a point upstream of the porous media (press v and click on the point) you will see that the pressure raise just before the radiator is around +80%

You can now change the parameters / location of the porous region to see the overall effect on the results and become more confident with this SimWorks functionality

Try the free version of SimWorks or contact us to find out more