Skip to main content

Inputs

1. Command-Line Arguments

CompFlowLab requires two inputs when executed from the command line:
  • Working directory
    Directory where all simulation outputs will be stored. It is recommended to use the test case folder.
  • Input file (.inp)
    A configuration file that defines the simulation setup, including physical parameters, numerical settings, and ROM options.
Example of Sod Shock Tube:

2. Input File Structure

The .inp file contains all parameters required to run a simulation. It is organized into logical sections, each controlling a specific part of the simulation. This section provides a complete reference for all parameters available in the CompFlowLab input file. Parameters are grouped by section and include type, allowed values, and descriptions. Solver
  • FOM: full order model
  • PROM: linear projection ROM
  • AROM: adaptive ROM
  • QROM: quadratic ROM
  • NLROM: non-linear ROM
Time Integration
  • FDF: Forward Difference Euler - Explicit
  • SSPRK2: Strong Stability Preserv. RK2 – Explicit
  • SSPRK3: Strong Stability Preserv. RK3 – Explicit
  • BDF: Backward Difference Euler – Implicit
The BDF method uses finite differences to compute the Jacobian in reacting flow cases, which might make it very stiff and hard to converge if the time step is too large.
Space Discretization Inlet Boundary Conditions Outlet Boundary Conditions
  • constant: specified constant value will be imposed.
  • extrapolate: use the nearest inside value at the boundary.
  • periodic: left boundary = right side, and right boundary = left side.
  • wall: zero net velocity
CompFlowLab uses ghost cells to apply boundary conditions and does not automatically assign values to them. It completely depends on the user’s CFD knowledge in imposing physically valid boundary conditions.
Initial Condition
Initial conditions can be specified in two different ways:(1) Using a pre-generated profile saved in the same format as a CompFlowLab primitive variable output file (.npy).(2) Defining a few intervals, with the location and primitive variables specified for each interval.
If specifying variables using intervals, CompFlowLab always requires values for mass fractions. For non-reacting flows, dummy values can be provided to mass_frac_ic.
Gas Model Visualization Available variables to plot:
  • Density [kg/m3]
  • Velocity [m/s]
  • Pressure [Pa]
  • Temperature [K]
  • MF: Mass Fraction of first species [-]
  • Heat Release [W/m3]
Saving Profiling
The profiling results will be saved at the working directory as .prof format. It is recommended to use snakeviz to visualize the profiling results.
Injection
Injection section is only applicable for 1D RDE test case and must be set as False for any other test case.
The injection_state_dir must point to a .npy file which follows the same format as CompFlowLab primitive variable output file.
ROM Setup
These properties will be read if any ROM methods are used.

ROM Methodology

Further details about Reduced Order Modeling under Methodology section.

Outputs

1. Field Data

Unsteady field data represents the time evolution of an unsteady field at the time step iteration interval specified by save_interval in input file. Each field data is written in a NumPy binary file containing a single NumPy array with two dimensions. The first dimension is the number of variables, the second is the number of cells in the computational mesh. Primitive variable indices are as following: Conservative variable indices are as following:

2. Visualization

During simulation runtime, plotted visuals will be saved under working_dir/plots if save_visual=True in input file.
This visualization serves only as a basic tool to inspect results during the initial stages. It is recommended that users implement their own customized post-processing scripts to visualize results according to their specific requirements.
When CompFlowLab is run on Linux, interactive plots cannot be displayed during the simulation due to Linux environment limitations. They can only be accessed after the visualizations are saved (i.e., save_visual=True).