These are all variables that the solver will read and that will affect its behavior. Most of them have default values which are initialized before processing your input file, but a few of them (notably n_dim and reference_length ) are not defined until you assign to them. You do not need to set all of these—see Running Hexed for a tutorial on how to write an input file.
adapt_freq
Default: 10^3
AMR will be performed every
adapt_freq iterations. Sometimes, only coarsening will be allowed; see
allow_refinement .
adapt_refine_if
Default: {(($({spectral_uncertainty} + i_dim) > spectral_tol*hexed_tol_factor*general_tolerance | (has_wall & i_dim == wall_dimension & flux_uncertainty > flux_tol*hexed_tol_factor*general_tolerance*rms_flux)) & (viscosity_model == {} | $({mean_shape} + i_dim)*reynolds_per_length > 2*min_cell_reynolds*$size_tolerance))}
Adaptive Mesh Refinement criterion. Attempts to refine elements where the numerical uncertainty exceeds specified thresholds. To adjust the behavior of AMR, you should consider changing the following parameters:
adapt_unrefine_if
Default: {((($spectral_unref_criterion & $flux_unref_criterion) | $shape_unref_criterion) & $({aniso_ref_level} + i_dim) > init_ref_level)}
Adaptive coarsening criterion. The default value is designed to coarsen elements if the resulting agglomerated element will not then satisfy
adapt_refine_if .
altitude
art_visc_constant
Default: -1.
If set to a positive number, turns on artificial viscosity and sets the artificial viscosity coefficient to be uniformly equal to art_visc_constant.
attack
av_advect_iters
Default: 1
Number of times to update the artificial viscosity advection equation for each nominal solver iteration.
av_diff_iters
Default: 1
Number of times to update the artificial viscosity diffusion equation for each nominal solver iteration.
capture_shocks
Default: false
If
true, shock-capturing with smoothness-based artificial viscosity will be enabled. This is a novel artificial viscosity scheme specific to Hexed. See
[4] for details.
conductivity_model
contourN
No default value.
Defines contours to visualize if
vis_contour is
true. By default, none of these variables are defined. If you define any number of these variables (consecutively numbered and starting with 0), then each of them will define one isocontour to be computed. Each should be a string containing an expression (which will be evaluated directly after
vis_contour_vars in the same environment), and the resulting contour will be the locus of points where that expression evaluates to 0. So, for example, to visualize the sonic line/surface, you could do
contour0 = {mach - 1.}, and to also visualize the slice at \( x_0 = 3 \), you could do
contour1 = {pos0 - 3.}. Each of the contours will be written to a separate file. For details on the algorithm to compute contours, see the source code for
hexed::Vis_data::compute_contour.
domain_center0
Default: 0.
\(x_0\) coordinate of the center of the flow domain.
domain_center1
Default: 0.
\(x_1\) coordinate of the center of the flow domain.
domain_center2
Default: 0.
\(x_2\) coordinate of the center of the flow domain.
domain_size
domain_size_ratio
done
Default: {($monitor_criterion | iteration > max_iterations | flow_time > max_flow_time | wall_time > max_wall_time)}
Termination condition. This should be a macro that evaluates to an integer. It will be evaluated at each iteration, and the simulation will continue iff it evaluates to
false. As should be clear from the default value, you
must set this variable yourself. You can consider setting it based on the
iteration count,
residual, and/or
output variable history.
elementwise_art_visc
Default: false
If
true, artificial viscosity determined in an elementwise fashion based on the work of Persson
[3] . This feature is provided purely for the purpose of comparing the discretization-independent artificial viscosity to conventional methods. It is not recommended for practical simulations with this solver.
elementwise_art_visc_diff_ratio
elementwise_art_visc_pde
Default: false
If
elementwise artificial viscosity is used, if this variable is
true, the artificial viscosity field will be regularized with PDE-based smoothing. Otherwise, it will be continuous and piecewise n-linear.
extremal_bcNN
Default: {characteristic}
Boundary conditions for boundaries at the mesh extremes. This is actually 6 variables, each of whose name ends in two integers. The first is the index of the coordinate axis which is normal to the boundary. The second is 0 if the boundary faces in the negative direction and 1 if it faces in the positive direction. Thus, the positive z boundary, for example, is governed by
extremal_bc21 and the negative y by
extremal_bc10.
- See also
- Boundary Conditions
final_refine_if
Default: {(has_wall & ((i_dim == wall_dimension & (farthest_vert > max_wall_spacing | (viscosity_model != {} & farthest_vert*reynolds_per_length > max_wall_reynolds & 3*$({mean_shape} + i_dim)*reynolds_per_length > max_wall_reynolds))) | (($({sharp} + i_dim) & $({mean_shape} + i_dim) > max_sharp_spacing) | (viscosity_model != {} & $({sharp} + i_dim) & $({mean_shape} + i_dim)*reynolds_per_length > max_sharp_reynolds))))}
Mesh refinement criterion for final refinement, after the geometry-based refinement (
geom_refine_if ) has already been performed. This will subdivide extruded elements, so no extrusion or vertex smoothing is performed. Unlike the initial refinement and geometry-based refinement, the final refinement phase is anisotropic. In addition to the variables provided by
hexed::hil_properties::element(), you will also have a variable
i_dim which tells you which dimension you are refining along. For non-extruded elements,
i_dim == 0 is the \(x\) direction,
i_dim == 1 is \(y\), etc. but for extruded elements, the axis alignment is arbitrary.
final_refine_if will be evaluated once for each dimension, and if it evaluates to
true, the element will be split in half along that dimension (in reference space). Thus if you set a value of
final_refine_if that does not depend on
i_dim, refinement will be isotropic. If you want to refine specifically in the wall-normal dimension, you can achieve this by comparing
i_dim to
wall_dimension. The default value of
final_refine_if will refine the wall elements such that the wall spacing will satisfy the
max_wall_spacing and
max_wall_reynolds everywhere.
final_unrefine_if
Default: {false}
Unrefinement criterion for final refinement. Like
final_refine_if, this is also anisotropic.
fix_nonphysical
Default: true
If
true, check for certain nonphysical values of state variables (non-positive density, negative energy, and any NaN or infinite values) after every time integration stage. If problems are found, it will run as many Laplacian smearing iterations as necessary to restore physical values. Results in a major robustness improvement and comes at a modest performance cost.
flood_fill_startN
No default value.
Location to start the flood fill algorithm when
mesh is evaluated. This is actually three variables,
flood_fill_start0,
flood_fill_start1, and
flood_fill_start2, specifying the \( x_0 \), \( x_1 \), and \( x_2 \) coordinates, respectively. If any of the coordinates are not within the
flow domain (which is the case by default), the flood fill start location will effectively default to the minimum corner of the domain offset by a distance of
mesh_extreme_eps times the domain size.
flow_iters
Default: 1
Number of times to update the real flow equations for each nominal solver iteration.
flux_tol
Default: 1e-3
Tolerance on the flux convergence for AMR criteria. Extruded elements will be refined in the wall-normal direction if the jump in viscous momentum flux between neighboring elements exceeds flux_tol multiplied by the RMS viscous wall-normal momentum flux in the extruded elements.
general_tolerance
Default: 1.
General tolerance factor which is incorporated into nearly every numerical uncertainty tolerance in the code. The idea is that by parameterizing all of the tolerances by this one value, every source of numerical error should be O(general_tolerance). So, if you want to establish confidence that your simulation is accurate, all you need to do is reduce general_tolerance and evaluate how much the outputs change. However, much more testing is currently needed to validate that claim.
geom_atol
Default: 0.
Geometry fit absolute tolerance. This is a dimensional quantity (in meters). When performing geometry-based refinement with
geom_refine_if, stipulates that elements need not be refined as long as the estimated maximum distance between the element surface and the true geometry surface is less than this value. Note that this tolerance adds to
geom_rtol, so the least strict condition usually dominates.
geom_refine_if
Default: {(uncertainty > (geom_rtol*reference_length + geom_atol)*general_tolerance & ref_level < max_ref_level*$size_tolerance & nominal_size > min_elem_size*$size_tolerance)}
Mesh refinement criterion for geometry-based refinement, after the geometry is added. Each of these refinement sweeps will result in the extruded elements being regenerated and the vertex smoothing being performed again, so this is the most computationally expensive refinement phase. Works like
init_refine_if, except that
wall_distance,
wall_dimension, and
uncertainty have now been defined.
uncertainty is set to an estimate in the error of the polynomial fit to the geometry. Specifically, some points on the faces of surface elements are sampled, and
uncertainty is set to their average distance from the true geometry surface (in the \( L_2 \) Gaussian quadrature norm). The default value of
geom_refine_if will refine elements if their uncertainty is greater than the quantity
geom_rtol *
reference_length +
geom_atol , unless their refinement level exceeds
max_ref_level or their nominal edge length is less than
min_elem_size.
geom_rtol
Default: 1e-7
Geometry fit tolerance relative to geometry bounding box. When performing geometry-based refinement with
geom_refine_if, stipulates that elements need not be refined as long as the estimated maximum distance between the element surface and the true geometry surface is less than this fraction of the length of the diagonal of the geometry bounding box. Note that this tolerance adds to
geom_atol, so the least strict condition usually dominates.
geom_unrefine_if
Default: {false}
Coarsening criterion for geometry-based refinement.
geom_vis_boundNN
No default value.
Bounding box within which to visualize distance from the surface. This is actually 6 variables describing each face of the bounding box, similar to
extremal_bcNN
geom_vis_subdivisions
Default: 100
Number of subdivisions with which to discretize the geometry when writing diagnostic visualizations with
vis_geom . This is completely different from the number of subdivisions to use when actually generating the mesh, which is controlled by
min_geom_subdiv_levels and
max_geom_subdiv_levels .
heat_flux_coercion
Default: 2.
When weakly applying heat flux boundary conditions, this determines how strongly the heat flux is coerced to match the prescribed value. If this number is too large, the simulation might be unstable, but if it too small the boundary condition might not be fully satisfied. The default value is adequate for almost all cases, but there are rare situations in which it might need to be reduced.
heat_rat
Default: 1.4
Ratio of specific heats, \(\gamma = \frac{c_p}{c_v}\).
- Warning
- You may not modify this value. Unfortunately, the value of 1.4 has been hardcoded in several places, so changing
heat_rat in the input file will not result in a correct simulation with a different \(\gamma\).
- Todo
- Enable CPG simulations with modified
heat_rat.
implicit
Default: true
Only relevant if
steady =
false. If
implicit =
true, time marching will be performed using dual time stepping: an implicit temporal discretization is used and the implicit equations are solved by pseudotime iteration. Otherwise, explicit global time stepping will be used. For ill-conditioned meshes (in particular, meshes with very small or high-aspect-ration cells to resolve a high-Reynolds-number boundary layer), implicit will likely be more efficient due to the extremely small time steps required for stability by explicit global time stepping. For implicit time stepping, you must set
time_step yourself. According to linear stability analysis, all implicit schemes currently supported are unconditionally stable and you should be able to set the time step purely based on accuracy considerations. However, in practice, nonlinear stability problems may impose constraints on the time step. You must also set
time_step_done to determine the conditions on which to terminate the pseudotime iteration and advance to the next real-time step. You may also need to adjust
print_freq and
vis_freq. You can control what implicit temporal discretization is used with
implicit_scheme.
implicit_scheme
Default: {backward Euler}
Determines the temporal discretization for unsteady implicit simulations (
steady =
false,
implicit =
true). Otherwise, does nothing. The supported options are (case-insensitive):
{backward euler} The ubiquitous Backward Euler method: robust and dissipative, first-order-accurate in time.
{crank-nicolson} The Crank-Nicolson method: less dissipative, second-order-accurate in time, can induce spurious oscillations in the initial transient behavior.
{dirk2} Implements the second-order-accurate, two-stage Diagonally-Implicit Runge-Kutta scheme described in Ref. [2], Section 4.1.2 (page 72). Unlike Crank-Nicolson, this method is L-stable, and should exhibit somewhat less oscillation. However, each time step requires solving two implicit stages (whereas backward Euler and C-N require only one) which may increase the wall clock time for each step.
init_cond
Implementation
{
momentum0 = freestream_density*freestream_velocity0 + 0*pos0
momentum1 = freestream_density*freestream_velocity1 + 0*pos0
momentum2 = freestream_density*freestream_velocity2 + 0*pos0
density = freestream_density + 0*pos0
energy = freestream_energy + 0*pos0
case0 = {}
case1 = {
turbulent_kinetic_energy = freestream_density*freestream_specific_turbulent_kinetic_energy
turbulent_dissipation_bassi = freestream_density*log(freestream_specific_turbulent_dissipation)
}
$$({case} + (turbulence_model == {k-omega}))
}
Expression defining the initial condition. This expression must assign values to
momentum0,
momentum1,
momentum2,
density, and
energy. It must also assign values to
turbulent_kinetic_energy and
turbulent_dissipation_bassi if
turbulence_model is
k-omega. You may reference the variables
pos0,
pos1,
pos2, and
wall_distance as well as any scalar HIL variables. You may also compute and then reference other variables which are not any of the final outputs. Due to a quirk in the solver code (which is intended to increase performance using array operations), all of these expressions must reference either one of the position variables or one of the other state variables, even if they do not affect the numerical value (as seen in the
0*pos terms below).
init_ref_level
Default: 3
Number of levels to refine the mesh in the initial refinement sweeps before surface geometry is introduced. May be any non-negative integer, up to time and memory constraints.
init_refine_if
Default: {(ref_level < init_ref_level)}
Mesh refinement criterion for initial refinement, before any geometry is added. Should be an expression that can be evaluated for each mesh element in an environment that includes the variables assigned by
hexed::hil_properties::element(). In this case,
uncertainty,
wall_distance, and
wall_dimension have not been initialized and should be ignored. If this expression evaluates to
true (and
init_unrefine_if evaluates to
false), the element will be refined. Otherwise it will not. The default value will uniformly refine all elements to refinement level
init_ref_level. Refinement sweeps will be repeated iteratively until there is a refinement sweep that produces no change, or
max_init_refine_iters iterations have been executed, whichever comes first.
init_unrefine_if
Default: {false}
Mesh unrefinement criterion. Behaves the same as
init_refine_if except that if this expression evaluates to
true (and
init_refine_if evaluates to
false), the element will be unrefined (subject to refinement level constraints).
input_data
Default: {auto}
Where
read_restart and
restart will get data from. The file names from which to read the mesh, flow state, and status (HIL variables) will be obtained by appending
.mesh.h5,
.state.h5, and
.status.hil respectively to the value of
input_data. If you leave
input_data as its default value, it will automatically be set to
working_dir + {/latest}. So, if you change neither
input_data nor
working_dir, the files will be
hexed_out/latest.mesh.h5,
hexed_out/latest.state.h5, and
hexed_out/latest.status.hil.
integrand_field
Default: {}
Expression defining the variables that
integrate_field will integrate.
integrand_surface
iter_width
Default: 10
For file names that include an iteration number, leading zeros will be added so that the number has at least iter_width digits. This ensures that they sort correctly.
local_roughness
Default: true
If
local_roughness ==
true and
update_roughness_freq >= 0, then instead of setting one roughness value \( k_s \) for the entire surface to satisfy the roughness constraints everywhere, a unique value will be set at each surface quadrature point to satisfy the constraints locally. For smooth-wall simulations with widely varying skin friction (e.g., a flat plate), this may allow a significantly coarser mesh to be used in downstream regions without sacrificing accuracy.
max_final_refine_iters
Default: 100
Maximum number of final octree refinement iterations to perform after obtaining a good surface fit but before running any solver iterations.
max_flow_time
Default: huge
Maximum flow time to simulate before terminating the simulation.
max_geom_refine_iters
Default: 100
Maximum number of geometry-based refinement iterations to perform.
max_geom_subdiv_levels
Default: 15
Like
min_geom_subdiv_levels , but used for high-precision applications that directly impact the accuracy of the simulation. The default value gives 32 768 subdivisions, which should be precise enough not to be a significant source of error in any reasonable simulation. Only curves will actually store this many data points, so the memory requirement is \( O(2^\verb|max_geom_subdiv_levels|) \) (note the absence of the factor of 2 which appears in the memory requirement for
min_geom_subdiv_levels because of the necessity to store data for surfaces), which should not generally be a constraint on your simulations. Increasing
max_geom_subdiv_levels will, however, significantly affect the amount of time required for meshing. If you choose to reduce it, keep in mind that high-order DG requires much more precision in the geometry than lower-order methods.
max_init_refine_iters
Default: 100
Maximum number of initial refinement iterations to perform.
max_iterations
Default: huge
Maximum number of solver iterations to run before terminating the simulation.
max_ref_level
Default: 1000
When performing geometry-based refinement with
geom_refine_if, elements will not be refined beyond this refinement level. The default value effectively renders this parameter irrelevant.
max_roughness_absolute
Default: huge
Maximum allowable absolute (dimensional) surface roughness height when adaptive roughness is used (
update_roughness_freq > 0). The default value effectively does not constrain the surface roughness.
max_roughness_plus
max_roughness_relative
Default: 1e-3
Maximum allowable surface roughness height as a fraction of the
geometry length when adaptive roughness is used (
update_roughness_freq > 0). The default value stipulates a very rough surface, but this is unlikely to be a problem, as the roughness is usually constrained by
max_roughness_plus. As long as
max_roughness_plus is set to a reasonable value,
max_roughness_relative will generally only be an active constraint when the skin friction vanishes (which is important to avoid singularities at stagnation/separation points when
local_roughness =
true).
max_safety
Default: 0.7
Maximum allowable safety factor on the
CFL condition for time step determination. The time step will be either this number times the estimated maximum stable time step or
max_time_step, whichever is smaller. This parameter is applicable to both local and global time stepping. If the safety factor is greater than 1 (and
max_time_step is not an active constraint), the scheme will almost certainly be unstable. Thus even if you intend for your time integration not to be CFL-driven, it is strongly recommended that you keep this parameter less than 1 and simply make your
max_time_step small enough to be the active constraint.
- Note
- For unsteady implicit simulations (steady = false, implicit = true), this parameter controls the pseudotime step, not the real-time step. To control the real-time step, use time_step.
max_sharp_reynolds
Default: 1e4
Same as
max_sharp_spacing, but expressed in terms of the element Reynolds number instead of absolute size.
max_sharp_spacing
Default: huge
Maximum size of any element that contacts a sharp edge of the geometry in the initial mesh (before any solver iterations or AMR)
max_time_step
Default: huge
Maximum allowable time step. The time step will be either this number or
max_safety times the estimated maximum stable time step, whichever is smaller. This parameter is only meaningful for global time stepping or implicit unsteady simulations (
steady =
false). If you intend for your time stepping to be CFL driven, simply keep this number large enough not to be the active constraint.
- Note
- For unsteady implicit simulations (steady = false, implicit = true), this parameter controls the pseudotime step. To control the real time step, use time_step.
max_wall_reynolds
Default: 1e3
Same as
max_wall_spacing, but expressed in terms of the element Reynolds number instead of absolute size.
max_wall_spacing
Default: huge
Maximum allowable wall spacing in the initial mesh (before any solver iterations or AMR)
max_wall_time
Default: huge
Maximum wall clock time to spend before terminating the simulation.
mesh_extreme_eps
min_cell_reynolds
Default: 0.1
For any refinement operation (including initial meshing and AMR), elements will not be refined if doing so would result in a cell Reynolds number below this value.
min_elem_size
Default: 0.
When performing geometry-based refinement with
geom_refine_if, elements will not be refined if their nominal edge length is less than this. The default value renders this parameter irrelevant.
min_geom_subdiv_levels
Default: 8
When performing numerical operations on the surface geometry, sometimes it is necessary to discretize curves/surfaces into polygonal/polyhedral segments. For low-precision applications, they will be divided into \( 2^\verb|min_geom_subdiv_levels| \) uniformly-spaced segments along each dimension in parameter space. This requires \( O(2^{2*\verb|min_geom_subdiv_levels|}) \) memory (in 3D) but, in principle, only \( O(\verb|min_geom_subdiv_levels|) \) time thanks to tree-based search algorithms.
min_geom_subdiv_levels should be high enough to capture every feature of the surface, but not necessarily to the level of accuracy that you demand in the final results. Any applications where error in the geometry calculations directly translates to error in the simulation results will use
max_geom_subdiv_levels . The default value gives 256 subdivisions, which is generally enough for any practical purpose while still being pretty fast.
min_prints
Default: 10
The simulation will not terminate unless it has printed to the console at least min_prints times.
min_wall_shock_width_reynolds
Default: 1e3
Minimum shock capturing width at the wall expressed as a Reynolds number.
monitor_vars
Default: {}
An expression defining variables to monitor the convergence history of. For additional details, see the implementation in
hexed::History_monitor.
- Todo
- Explain this more fully.
monitor_window
Default: 0.2
The behavior of the
monitor_vars over the last
monitor_window fraction of the iterations will be analyzed to determine convergence.
n_cheby_av
Default: 12
Number of Chebyshev-acceleration stages to use for the artificial viscosity diffusion equation. For computational efficiency, this should usually be comparable to
shock_sub_iters .
n_dim
No default value.
Number of dimensions. Must be at least 1 and at most 3.
noise_tol
Default: 3e-2
Convergence will not be declared if the estimated noise in any of the
monitor_vars over the last
monitor_window fraction of iterations (after correcting for any gradual trend) exceeds this value multiplied by the filtered value of that variable.
print_freq
Default: 100
Solver status will be printed to stdout every print_freq iterations.
print_vars
Default: {($iteration_expr)} + normalized_residual_expr + {($monitor_vars)}
Expression defining the variables to print to the console every
print_freq iterations.
reference_area
No default value.
Area scale used for normalizing aerodynamic coefficients in 3D. In 2D, the
reference_length is used as the reference area, and you may
not define this variables.
reference_length
No default value.
Length scale used for normalizing aerodynamic coefficients. You must always define this variable. Some internal calculations will also use this variable for hints about the length scale of the problem. For an airfoil, this is traditionally set equal to the chord. In 2D, this is also taken as the reference area for normalizing the lift and drag coefficients.
row_size
shock_adapt_freq
Default: 100
Every
shock_adapt_freq iterations AMR will be performed only on elements that contain shocks. This helps maintain stability without allowing runaway refinement.
- See also
- shock_refine_if
shock_refine_if
Default: {(has_shock & $({mean_shape} + i_dim) > shock_refinement_floor*(wall_shock_width + shock_width_growth*farthest_vert) & $({spectral_uncertainty} + i_dim) > spectral_tol*hexed_tol_factor*general_tolerance)}
Mesh refinement criterion for shock refinement. For simulations with
capture_shocks =
true, this will be used to refine the mesh near shocks to improve stability. This criterion is much more aggressive than the usual uncertainty-based AMR, but it prevents runaway refinement by limiting the minimum element size to
shock_refinement_floor times the shock capturing width.
shock_refinement_floor
Default: 1.5
The minimum ratio of the element size to the shock capturing width in
shock refinement.
shock_sub_iters
Default: 12
Number of sub-iterations to run in each nominal iteration to get an efficient balance between time spent on the flow and artificial viscosity equations.
shock_unrefine_if
Default: {(!has_shock)}
Criterion for undoing shock refinement.
shock_width_growth
Default: 0.1
The shock capturing width will be equal to the wall shock width plus shock_width_growth times the wall distance.
sideslip
spectral_tol
Default: 1e-3
Tolerance on the spectral convergence of the element polynomials for AMR criteria. Elements will be refined along a given dimension if, for any flow variable, the magnitude of the highest-order polynomial mode exceeds spectral_tol multiplied by the difference between the maximum and minimum values of that variable in the entire flowfield.
steady
Default: true
If
true, only solves for steady state—the transient evolutions of the flowfield is not time accurate. This will utilize local time marching and other non-time-accurate tricks to accelerate convergence to steady state. If
false, the simulation will accurately capture unsteady behavior, but will probably take longer to reach steady state (potentially by orders of magnitude). For further control over the unsteady time marching scheme, see
implicit and
implicit_scheme, which can also significantly affect performance and accuracy.
surface_bc
Default: {auto}
Specifies surface boundary condition. It should be the name of a supported
Boundary condition type. If
{auto}, surface boundary condition will be determined automatically depending on whether you define
viscosity_model . If you do (and set it to something other than
{}),
surface_bc will default to
{no_slip}. If you do not, it will default to
{nonpenetration}.
surface_roughness
Default: -1.
Controls the (dimensional) surface roughness height \( k_s \). This is only relevant when
turbulence_model is set to \( k\text{-}\omega \), in which case it controls the boundary condition for \( \omega \): \( \omega_w = \frac{4 \times 10^4 \nu_w}{k_s} \) . If negative,
surface_roughness will be automatically initialized to min(
max_roughness_absolute,
max_roughness_relative *
reference_length). If
update_roughness_freq is set (which it is by default),
surface_roughness will be automatically adjusted to keep the surface hydraulically smooth.
- Note
- Setting
surface_roughness too small will require a smaller wall spacing to achieve mesh convergence, whereas setting it too large may produce unrealistic results. For that reason, allowing automatic adaptation is recommended.
temperature_offset
thermal_bc
Default: {heat_flux = 0.}
Only applicable when
surface_bc =
{no_slip}. Specifies thermal boundary condition. Default gives an adiabatic wall. Accepted values:
{heat_flux = x}: Prescribes the wall heat flux (out of the domain, into the wall) to be x.
{temperature = x}: Prescribes the temperature at the wall to be x.
{internal_energy = x}: Prescribes the internal energy at the wall to be x. For now, since you're stuck in the CPG world, this is equivalent to {temperature = x*(heat_rat - 1)/specific_gas_air}.
{emissivity = x; conduction = y; temperature = z}: Specifies that the wall is in thermal equilibrium according to a simple 1D heat equation. Specifically, sets the heat flux equal to the sum of the radiative cooling flux and the thermal conduction through the wall. The radiative cooling flux is determined by the Stefan-Boltzmann Law with the emissivity \( \sigma \) given by emissivity. The conductive flux is determined by assuming that the wall has a small but finite thickness and the temperature on the non-air side is known. Specifically, it is equal to \( kL(T_w - T_p) \) where \( k \) is the thermal conductivity of the wall material, \( L \) is the wall thickness, \( T_w \) is the current wall temperature, and \( T_p \) is the prescribed temperature. The product \( kL \) is equal to conduction and the prescribed temperature \( T_p \) is temperature. You don't have to specify all 3 parameters—they all default to 0. You may specify emissivity and/or you may specify the other parameters, but if you specify either conduction or temperature you must specify both. If your wall is highly conductive, you might need to reduce heat_flux_coercion to maintain stability.
time_step
No default value.
Real time step to use for unsteady implicit simulations (
steady =
false,
implicit =
true). In such simulations, you must set this to a positive value. For steady or explicit unsteady simulations, this parameter is ignored.
trend_tol
Default: 3e-3
Convergence will not be declared if the estimated drift in any of the
monitor_vars over the last
monitor_window fraction of iterations (after filtering out noise) exceeds this value multiplied by the filtered value of that variable.
turbulence_model
Default: {}
Model for turbulence. If the flow is inviscid (
viscosity_model =
{}), this parameter is ignored. Recognized values are:
{}: Solve the ordinary Navier-Stokes equations. No turbulence model is applied.
{k-omega}: Solve the RANS equations with \( k\text{-}\omega \) closure. Specifically, this uses the Wilcox 2006 [7] formulation written in terms of turbulent_dissipation_bassi \( = \tilde{\omega} = \log \omega \).
turbulent_prandtl
Default: .9
Turbulent Prandtl number ( \( Pr_t \)). Default value recommended by
LaRC.
update_roughness_freq
Default: 10^4
Frequency with which to update wall roughness for RANS simulations. If set to a positive integer, during the simulation, the surface roughness (aka \( k_s \)) will be adaptively updated to be the (approximately) largest possible value that satisfies the criteria \( k_s^+ = k_s u_\tau/\nu \le \)
max_roughness_plus and \( k_s \le \) min(
max_roughness_absolute,
max_roughness_relative *
reference_length). The former criterion is derived from Wilcox
[7] , who recommends that \( k_s^+ \) be less than 5 for hydraulically smooth surfaces. In general, specifying small values for the various roughness constraints will require a finer mesh to resolve the resulting \(\omega\) profile, but specifying too large a value may introduce error relative to the smooth wall solution. If you actually want to simulate a rough wall, you should set
update_roughness_freq to
-1 and set
surface_roughness to the desired roughness height.
vis_contour
Default: true
Whether to explicitly compute and visualize contours when
visualize is invoked. Normally, you would visualize contour plots by loading the field visualization in your plotting software of choice and using its contour plotting feature. However, Hexed can also compute isocontours on its own and write out files containing just the contour. This could be useful if your computation is I/O bound or if you want to streamline some postprocessing pipeline that uses isocontours. This can also be used to visualize slices, which are simply special cases of contours. To control what contours are visualized, use
contourN and to control the variables included in each contour file, use
vis_contour_vars. If you want to visualize contours
and field data, but contours more frequently than field, you can add to
iterate, E.g.
vis_freq = 10^5
iterate = iterate + {
case0 = {}
case1 = {
vis_field = false
print {visualizing contours...}
visualize
println {done}
vis_field = true
}
$$({case} + (iteration%10^3 == 0))
}
vis_contour_vars
Default: vis_field_vars
Expression defining the variables to include in the contour visualization.
vis_csv
Default: false
If
true, write visualization files in CSV format.
- Warning
- For 2D and 3D data this can be very slow.
vis_default_format
No default value.
The default format to visualize in. This will be
xdmf,
tecplot, or
csv, in order of preference, depending on the values of
use_xdmf and
use_tecio. The corresponding
vis_FORMAT variable will be set to
true by default.
vis_edges
Default: true
If
true, write and additional visualization file containing the mesh edges.
vis_field
Default: true
Whether to visualize field data when
visualize is invoked.
vis_field_vars
Default: state_vars + wall_dist_expr + art_visc_expr + transport_expr
Expression defining the variables to include in the field visualization.
vis_freq
Default: 10^4
Visualization files will be written every vis_freq iterations.
vis_geom
Default: true
If
true, after loading any CAD geometry, write diagnostic visualization files that show the geometry as-loaded.
vis_geom_distance
Default: false
If
vis_geom and
vis_geom_distance are both
true, diagnostic visualization files will include a field with the distance from each point to the geometry surface in the block bounded by
geom_vis_boundNN . This will be substantially more expensive than the other visualization files (which are curves and surfaces) but is the most reliable way to diagnose whether the geometry was loaded correctly.
vis_lts_constraints
Default: false
If
true , write an additional field visualization file containing the local time steps for convection and diffusion.
vis_n_sample
Default: 10
Each element will be visualized at sample points distributed in a uniformly-spaced structured block with
vis_n_sample points on each edge. If you want, you can think of this as the visualization row size. For a high-quality visualization, this should generally be greater than the parameter
row_size .
vis_surface
Default: true
Whether to visualize surface data when
visualize is invoked.
vis_surface_vars
Default: state_vars + transport_expr + visc_stress_expr + heat_flux_expr + pressure_coef_expr + skin_friction_coef_expr + bl_nondim_expr
Expression defining the variables to include in the surface visualization.
vis_tecplot
Default: false
If
true, write visualization files in Tecplot format (requires compilation with
use_tecio set to
yes).
vis_xdmf
Default: false
If
true, write visualization files in XDMF format (requires compilation with
use_xdmf set to
yes).
viscosity_model
Default: {}
Model to compute the dynamic viscosity. Options are the following:
{} (empty string): Inviscid.
- Code setting the variable
const_value: Constant viscosity equal to const_value. For example, {const_value = 1.8e-5} will set the viscosity to 1.8e-5 Pa s.
- Code setting the variables
ref_value, ref_temperature, and offset: Sets the viscosity to Sutherland's law (a result of Chapman-Enskog theory) with \( \mu_0 \) = ref_value, \( T_0 \) = ref_temperature and \( S \) = offset. E.g. {ref_value = 1.7e-5; ref_temperature = 273.; offset = 111.;}.
- Note
- Setting
viscosity_model = {} is not the same as setting it to viscosity_model = {const_value = 0.}. The former will solve the inviscid flow equations, whereas the latter will solve the viscous flow equations with a viscosity coefficient of 0 (increasing the computational expense).
- See also
- air_viscosity
wall_shock_width
Default: 0.
Minimum absolute shock capturing width at the wall.
wall_velocity
Default: {velocity0 = 0.; velocity1 = 0.; velocity2 = 0.;}
Expression defining the wall velocity at any
No Slip boundaries. This expression may reference
pos0,
pos1,
pos2,
normal0,
normal1, and
normal2.
working_dir
Default: {hexed_out/}
Directory in which to write output files. Path can be relative or absolute. If the directory does not exist, it will be created. Any modifications to this variable must take place before the solver is initialized.
write_freq
Default: 10^4
Mesh and state files will be written every vis_freq iterations.