Porous cell zone

Download mesh
Download simulation

Introduction

This is an example of flow analysis using porous media conditions. The problem involves flow entering from the top left and flowing down through a porous region (the blue area is the porous cell zone on the left side of the image above).

OpenFOAM’s porous media model suffers from a discontinuous velocity distribution in the porous region, and the pressure loss is slightly different from the input conditions. The left side of the figure below shows the results from Baram-v24, while the right side shows the results using the standard solver in OpenFOAM 2306.

NextFOAM, which Baram uses, solves this problem by improving the interpolation of pressure in porous regions (see the documentation linked below for more information). You can see that the convergence is much improved along with the accuracy of the results.

* Porous Media Reference

결과 (left)Baram v24, (right)openfoam 2306 standard solver

residual

Residual (left)Baram v24, (right)openfoam 2306 standard solver

Start BaramFlow and load mesh

Run the program and select [New Case] from the launcher. In the launcher, select [Pressure-based] for [Solver Type] and [None] for [Multiphase Model].

Use the given polyMesh folder. In the top tab, click [File]-[Load Mesh]-[OpenFOAM] in that order and select the polyMesh folder.

General

For this example, we’ll use default conditions.

Models

For this example, we’ll use $Standard$ $k-epsilon$ model for turbulence.


Turbulence Model setup

Materials

Use material properties of air.

Cell zone Conditions

In Cell Zone Conditions, there is a porousZone in region0. Double-click it to open the settings window. Select the Zone Type as ‘Porous Zone’, and set values as follows

  • Model : Power Law
  • C0 : 5000
  • C1 : 1.9


Cell Zone Conditions setup

Boundary Conditions

Set the boundary type and values as shown below.

  • inlet

    • type : Velocity Inlet

    • Velocity magnitude : 1

    • Turbulent Intensity : 1

    • Turbulent Viscosity Ratio : 10



    inlet boundary condition


  • outlet

    • type : Pressure Outlet

    • Total Pressure : 0



    outlet boundary condition


Set as wall for the rest.

Numerical Conditions

Set [Discretization Schemes]-[Pressure] as Linear. If you have a momentum source like Porous, use Linear because Momentum Weighted or Momentum Weighted Reconstruct techniques can have stability issues.
(user guide)

Set [Convergence Criteria]-[Pressure] as 0.0001 and use default values for the rest.

Initialization

Use default conditions.

Click the Initialize button at the bottom. Then click the [File]-[Save] menu to save the case file.

Run

Change the values as shown below, and click [Start Calculation] button.

  • Number of Iterations : 1000
  • Save Interval : 1000
  • Selct [Parallel]-[Environment] in menu. Set Number of Cores as you want and select [Local Machine] for [Parallel Type].


parallel setup

When the calculation is started, you can see the graphs of Residuals as shown below.


residual plot

Post-processing

Click the parview button in [External tools] to open the paraview.

For parallel case, change the [Case Type] to [Decomposed Case].

Click [Slice] icon.

In the Pipeline Browser, select Y Normal and choose Coloring as U. You should see something like this


velocity at the center plane