Subsonic cavity flow

Download mesh
Download simulation

Introduction

include surface's own gap{:target=”_blank”}

This example computes subsonic two-dimensional cavity flow.

The geometry and flow conditions are as follows

  • L/D = 2 (the ratio of the length and height of the cavity)
  • Mach Number = 0.6
  • Reynolds Number = 2.75e+5
  • Prandtl Number = 0.7

The mesh was converted from a plot3d format created in matlab.

The solver is buoyantPimpleNFoam, a pressure-based thermal flow solver developed by NEXTfoam.

The boundary conditions at the outlet and the top surface are waveTransmissive (non-reflecting) with no reflection of pressure waves.

The computational conditions are as follows

  • solver : buoyantPimpleNFoam
  • turbulence model : $SST$ $k-omega$
  • density : Perfect Gas
  • inlet temperature : 300 K
  • inlet pressure : 101325 Pa

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.

include surface's own gap

General

Change Time to Transient.

Models

For this example, we’ll use $SST$ $k-omega$ model for turbulence.

Include Energy.

Materials

Material properties of air is as follows

  • Density : Perfect Gas
  • Specific heat : 1006
  • Viscosity : 0.00178 (value for the Reynolds number)
  • Thermal Conductivity : 2.562 (value for the Prandtl number)
  • Molecular Weight : 28.966

Boundary Conditions

Set the boundary type and values as shown below.

  • inlet : Velocity Inlet
    • Velocity Specification Method : Magnitude, Normal to Boundary
    • Velocity Magnitude : 208.31
    • Turbulence Specification Method : Intensity and Viscosity Ratio
    • Turbulent Intensity : 1
    • Turbulent Viscosity Ratio : 10
    • Temperature : 300

  • outlet, top : Pressure Outlet
    • Pressure : 0
    • with Non-Reflecting Boundary option

  • cavityFront, cavityBottom, cavityRear, frontBottom, rearBottom : Wall
    • Velocity Condition : No Slip
  • frontPlane, backPlane : Empty

Numerical Conditions

In this example, we’ll change the settings as shown below.

  • Pressure-Velocity Coupling : SIMPLE
  • Discretization Schemes
    • Time : Second Order Implicit
    • Pressure : Momentum Weighted Reconstruct
    • Momentum, Energy, Turbulence : Second Order Wpwind
  • Max Iteration per Time Step : 20
  • Number of Correctors : 2
  • Under-Relaxation Factors
    • Pressure : 0.3 / 1
    • Momentum, Turbulence : 0.7 / 1
    • Energy, Density : 1 / 1

Monitor

Monitor pressure at cavity center point. Click [Add]-[Point].

Set coordinate as (0 -0.5 0.25).

Initialization

Set values as follows

  • Velocity : (208.31 0 0)
  • Pressure : 0
  • Temperature : 300
  • Scale of velocity : 208.31
  • Turbulent Intensity : 1
  • Turbulent Viscosity Ratio : 10

Initialize the velocity inside the cavity to zero. Under [Advanced]-[Sections], select [Create]-[Hex] and enter the Min/Max coordinates as (-1 -1 -1), (1 0 1). Select Velcity and give it a value of (0 0 0).

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

Run

Selct [Parallel]-[Environment] in menu. Set Number of Cores as you want and select [Local Machine] for [Parallel Type].

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

  • Time Stepping Method : Fixed
  • Time Step Size : 1e-5
  • End Time : 0.5
  • Save Interval : Every 0.002 sec

Post-processing

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

Change the [Case Type] to [Decomposed Case].

Change [Coloring] to U.