Reduced Order Model, ROM
Download mesh
Download simulation
Introduction

This tutorial demonstrates a Reduced Order Model (ROM) that generates results for uncomputed conditions using computed data set. It utilizes the pipe mixing example problem. It predicts the mixing of flow inside a circular pipe with two inlets and one outlet.
The primary flow velocity is fixed at 1 m/s, and the temperature can vary within the range of 280–300 K. The secondary flow has a velocity range of 1–4 m/s and a temperature range of 310–360 K. Using Design of Experiment(Latin hypercube sampling), 30 analysis conditions are determined for the three variables. A model is created that utilizes the calculated results to obtain outcomes in real time for arbitrary conditions.
Start BaramFlow
Run the program and select [New Case] from the launcher. In the launcher, select [Pressure-based] for [Solver Type] and [None] for [Multiphase Model].

Mesh
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 and include energy.
Materials
Set the density of air as Perfect Gas.
Define user parameter
The user parameter required for a batch run are primary flow temperature, secondary flow temperature and secondary flow velocity and are defined as follows
- TLARGE: primary flow temperature
- TSMALL: Secondary flow temperature
- USMALL: Secondary flow velocity magnitude
Go to [Solution – Run] to declare the variables.
Click the Edit button of [User Parameters] to open the window and click (+) next to [Parameter Values] to add them one by one as shown below.

Boundary Conditions
You can set boundary values for multiple boundaries. Each boundary will turn red when selected.
Right-clicking on a boundary allows you to change the boundary type, and double-clicking or clicking the ‘Edit’ button below opens a window where you can set the value.
Each boundary condition is set as follows
- in-1 : Velocity Inlet
- Velocity Magnitude : 1 (m/s)
- Turbulent Intensity : 1 (%)
- Turbulent Viscosity Ratio : 10
- Temperature : $TLARGE (user parameter)
- in-2 : Velocity Inlet
- Velocity Magnitude : $USMALL (user parameter)
- Turbulent Intensity : 1 (%)
- Turbulent Viscosity Ratio : 10
- Temperature : $TSMALL (user parameter)
- out : Pressure Outlet
- Pressure : 0 (Pa)
- wall
- Velocity Condition : No Slip


Numerical Conditions
In this example, we’ll change the settings as shown below.
- Pressure-Velocity Coupling Scheme : SIMPLEC
- Under-Relaxation Factors : 0.9 for Pressure, Momentum, Turbulence and 1.0 for Energy
- Use default value for others
Initialization
Use default value for all.
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
- Number of Iterations : 1000
- Save Interval : 500
Click [Switch To Batch Running Mode] button, then the [Batch Cases] settings section appears, as shown in the image below.

Select the file that sets the conditions for each variable by clicking the import button. The condition setting file can be in csv (comma separated values) or xlsx file format.
In this example, it is an csv file as shown below. This conditions are obtained using Latin hypercube sampling method.

Click the [Import] button and select the file above. The [Batch Cases] section will then change as shown in the following figure.

Use the mouse drag to select the entire range (or use Ctrl-A on the keyboard), then right-click and select [Schedule Calculation]. A check mark will appear in the [Calc.] column. Only the checked items will be calculated.
Pressing [Start Calculation] initiates the calculation sequentially.
An arrow appears in the far left column for the case currently being calculated. Cases whose calculations are complete are displayed in green in the [Result] column, while cases that diverged during calculation are displayed in red.
Build Reduced Order Model
Click the Build ROM button in Model Creation to select the case to use for ROM creation. Select the entire range from a1 to a30.

Pressing the OK button displays a window for selecting variables to use in ROM creation. All variables declared as user parameter appear here; in this example, all three are selected. Pressing the OK button creates the ROM.


Enter the values for the three variables in the [Reconstruct from Model] section below and provide a Case name. Click the [Reconstruct case with ROM] button to generate results for those conditions. The generated results are added to the Run’s Batch Cases under the name entered in the Case name field. Right-click the added case and select Load to post-process the results.
