Porous zone in OpenFOAM

OpenFOAM offers an easy way to solve for a single flow in systems with porous zones, with the possibility of specifying the porosity and to use Darcy-Forchheimer or power law models. This feature is very versatile, allowing the user to specify also porous zones not aligned with the main reference frame and multiple porous zones in the same case. Currently this feature is implemented in a compressible flow solver (rhoPorousSimpleFoam), with both an explicit and an implicit treatment of the momentum source term due to the presence of the porous zone.

I will show the basic functionalities of this OpenFOAM feature with a simple example of a 2D channel made of two parallel walls distant 0.07m and 1m high. Let’s fix the reference frame so that the walls are perpendicular to the x direction and parallel to the y direction. The channel contains a porous zone which extends from y = 0 to y = 0.5m, with a porosity of 0.5. In this case Darcy-Forchheimer law will be used, with a viscous resistance parameter d of 107, and without inertial resistance (f = 0).

To set the case up, the tutorial case of rhoPorousSimpleFoam can be taken as reference, and the following steps must be followed:

Create the mesh specifying that the rectangle delimited by (0,0) and (0.07, 0.5) is a cell zone called porosity. The name of course is arbitrary. If the mesh is imported, it is necessary to assign the name to the zone when the mesh is created, and use the -writeZones option when importing it.

Open the constant/porousZones dictionary and edit it so that it looks like the following:

            origin (0 0 0);
            e1  (1 0 0);
            e2  (0 1 0);

        porosity 0.5;

            d   d [0 -2 0 0 0 0 0] (-1 1e7 -1);
            f   f [0 -1 0 0 0 0 0] (0 0 0);

Notice that the dictionary contains one entry, and 1 is specified at the beginning of the dictionary. The coordinateSystem subdictionary specifies the main directions of the porous zone resistance, while the porosity entry sets the porosity value for the porous zone. Finally, the Darcy sub-dictionary contains the coefficients for Darcy’s law. Each parameter is a vector with a value of the parameter for each direction specified in the coordinateSystem subdictionary. Negative values of the coefficient in Darcy’s law are not valid, and can be used as multipliers of the maximum component. For further information on the porous zone and on its implementation in OpenFOAM, please refer to the Doxygen documentation here.

To complete the case set up, it is necessary to edit the boundary conditions to match the ones specified above. For the purpose of this exercise, we can switch the turbulence model off in the constant/RASProperties dictionary too. You can then run the case in a terminal by simply entering the case directory and executing rhoPorousSimpleFoam.

Note: This procedure was tested in OpenFOAM 1.5.

Enjoy 🙂


  • Mehul

    Hi, Alberto.
    Thanks for the basic description about porous zone in OpenFOAM.
    I am interested to define energy sink for selected porous zone as in FLUENT.
    How this can specifically include in the energy equation for porous zone?

    Can you give some light about the mater?

    Thanks in advance.