Runtime Options¶
Note
Options in the documentation are specified by command-line flag and YAML format interchangeably. See YAML vs Command line options for details.
Common Options¶
HONEE is controlled via command-line options. The following options are common among all problem types:
Option |
Description |
Default value |
|---|---|---|
|
CEED resource specifier |
|
|
Problem to solve ( |
|
|
Use implicit time integrator formulation |
|
|
Polynomial degree of tensor product basis (must be >= 1) |
|
|
Number of extra quadrature points |
|
|
Viewer for the force on each no-slip wall, e.g., |
|
|
Viewer for the total kinetic energy in the domain and other terms, e.g., |
|
|
Number of timesteps between calculating and printing the total kinetic energy |
|
|
Viewer for the min/max CFL in the domain e.g., |
|
|
Number of timesteps between calculating and printing the min/max CFL |
|
|
Number of time steps between checking the solution for Nans. Negative interval indicates it will not run. |
|
|
Wall clock duration of simulation before it should be stopped. Acceptable formats are |
|
|
Approximate time required to exit simulation cleanly (write checkpoints, etc.) |
|
|
Number of time steps between checking whether simulation should stop based on |
|
|
Transform the mesh, usually for an initial box mesh. |
|
|
View comprehensive information about run-time options |
File I/O Options¶
Option |
Description |
Default value |
|---|---|---|
|
Filename of mesh file to load in |
|
|
PETSc output format, such as |
|
|
Number of time steps between visualization output frames. |
|
|
Number of frames written per CGNS file if the CGNS file name includes a format specifier ( |
|
|
Number of steps between writing binary checkpoints. |
|
|
Checkpoints include VTK ( |
|
|
Use regular refinement for VTK visualization |
|
|
Output directory for binary checkpoints and VTK files (if enabled). |
|
|
Whether to add step numbers to output binary files |
|
|
Path to file from which to continue from. Either binary file or CGNS |
|
|
Sets intermediate time points to evaluate the solution at. See PETSc documentation for more details. |
|
|
PETSc output format for |
Note that to use -continue_filename with CGNS files, the same file must be used with -dm_plex_filename and -dm_plex_cgns_parallel.
Testing Options¶
Option |
Description |
Default value |
|---|---|---|
|
Run in test mode and specify whether solution ( |
|
|
Test absolute tolerance |
|
|
Test filename |
|
|
Run unit tests of Newtonian state variable transformation functions |
|
|
Run unit tests of Riemann problem solver and it’s Jacobian |
|
Logging Options¶
Some of these are PETSc options here as reference, while others are custom to HONEE.
Option |
Description |
Default value |
|---|---|---|
|
View PETSc |
|
|
View mass KSP once before |
|
|
View log for every timestep taken by the |
|
|
View log for every iteration taken by the |
|
|
View convergence reason for every iteration taken by the |
|
|
View convergence reason for every iteration taken by the |
|
|
View PETSc performance log |
|
|
Print KSP residual summary information after each |
Nondimensionalization¶
These options allow the units used during solving to be changed. For problems where solution components can differ by many orders of magnitude, this can help problem conditioning.
Caution
This feature may be broken for certain use cases. If you discover a bug related to nondimensionalization, please submit an issue to the HONEE repo so that we can address it.
Option |
Description |
Default value |
|---|---|---|
|
1 meter in scaled length units |
|
|
1 second in scaled time units |
|
|
1 kilogram in scaled mass units |
|
|
1 Kelvin in scaled temperature units |
|
Boundary conditions¶
Boundary conditions (BCs) are defined by a name and a list of face IDs that said BC applies to.
These are collectively known as a BCDefinition.
A list of BCDefinition names is specified by the user using -bc_names.
The BCDefinition name will be used in the flag prefix -bc_{name}_* for every option pertaining to that BCDefinition.
The list of face_ids used for a BCDefinition is specified using -bc_{name}_face_ids.
For example:
bc_names: airfoil,inflow
bc_airfoil:
face_ids: 2,5
bc_inflow:
face_ids: 1,3,4
Essential boundary conditions (i.e. strong, Dirichlet, etc.) are defined by the component indices they constrain in the solution vector.
They are specified by -bc_{name}_essential_comps.
Note
The essential boundary conditions are specified by component indices rather than by their solution component name to inhibit invalid states. For example, if the user specifies an essential constraint on velocity and is running with entropy solution variables, that constraint cannot be set, and is thus an invalid state. Additionally, this more generic interface allows for expansion to other governing equations (e.g. RANS turbulence models, chemistry transport, etc.).
Natural boundary conditions (i.e. weak, Neumann, etc.) are specified by type (a string), from a list of possibilities given by the given governing equation and example problem.
These possibilities are registered by the problem/governing equation and are specified by -bc_{name}_natural_type.
Option |
Description |
Default value |
|---|---|---|
|
List of names used to reference boundary conditions |
|
|
List of face label values to define BC |
|
|
Component indices to apply essential BC on |
|
|
Type of natural BC to apply ( |
The face_ids are simply the label values of the Face Sets label on the DM.
For the case of PETSc-generated box meshes, those labels correspond to the following faces:
PETSc Face Name |
Cartesian direction |
Face ID |
|---|---|---|
faceMarkerBottom |
-z |
1 |
faceMarkerRight |
+x |
2 |
faceMarkerTop |
+z |
3 |
faceMarkerLeft |
-x |
4 |
PETSc Face Name |
Cartesian direction |
Face ID |
|---|---|---|
faceMarkerBottom |
-z |
1 |
faceMarkerTop |
+z |
2 |
faceMarkerFront |
-y |
3 |
faceMarkerBack |
+y |
4 |
faceMarkerRight |
+x |
5 |
faceMarkerLeft |
-x |
6 |
Newtonian viscosity, Ideal Gas¶
Option |
Description |
Default value |
Unit |
|---|---|---|---|
|
Stabilization method ( |
|
|
|
Stabilization time constant, \(C_t\) |
|
|
|
Stabilization viscous constant, \(C_v\) |
|
|
|
Stabilization continuity constant, \(C_c\) |
|
|
|
Stabilization momentum constant, \(C_m\) |
|
|
|
Stabilization energy constant, \(C_E\) |
|
|
|
Method used to calculate divergence of diffusive flux projection ( |
|
|
|
Control the KSP object for the projection of the divergence of diffusive flux |
N/A |
|
|
Heat capacity at constant volume |
|
|
|
Heat capacity at constant pressure |
|
|
|
Gravitational acceleration vector |
|
|
|
Stokes hypothesis second viscosity coefficient |
|
|
|
Shear dynamic viscosity coefficient |
|
|
|
Thermal conductivity |
|
|
|
State variables to solve solution with. |
|
string |
Newtonian Reference State Options¶
These options set the Newtonian reference state.
Option |
Description |
Default value |
|---|---|---|
|
Reference/initial pressure. Also used as the default for |
|
|
Reference/initial velocity (3 values). Also used as the default for |
|
|
Reference/initial temperature. Also used as the default for |
|
YAML vs Command line options¶
Options for HONEE and PETSc can be given by either command line options or via a YAML file.
Command-line flags can be represented in a YAML file by removing the leading - and by allowing underscores (_) to be converted into a hierarchy of options (so that options with redundant prefixes can be more easily grouped together).
For example,
-dm_plex_shape zbox -dm_plex_box_faces 10,12,4 -dm_plex_box_bd none,none,periodic
could be represented as
dm_plex:
shape: zbox
box:
faces: 10,12,4
bd: none,none,periodic
A YAML file of options can be passed to HONEE via -options_file <yaml file>.
Overriding of options are done in the order that HONEE/PETSc reads them.
Given the following YAML file:
# ./options.yaml
option_a: 1
Running
navierstokes -option_a 2 -options_file options.yaml
will result in option_a == 1, but
navierstokes -option_a 2 -options_file options.yaml -option_a 3
will result in option_a == 3.
See PETSc documentation for more advanced uses of the yaml file system.