Gyredocs
Depth Practice
API

Gyre/Reference

Case schema

In one minuteEvery field of the case specification with its type, default and, where the model carries one, a description — generated from the pydantic model that validates it. Fields whose description cell is empty are explained in the Cases guide.

Written at L2 Practice 1068 words Markdown

CaseSpec — Complete, serialisable description of a steady flow analysis.

field type default description
name string case (max length 80, pattern ^[A-Za-z0-9_.-]+$)
description string
mesh MeshSpec *required*
flow FlowSpec
discretization DiscretizationSpec
solver SolverSpec
reference ReferenceSpec

MeshSpec — Built-in mesh generator and its parameters, or a mesh file (generator: file).

field type default description
generator airfoil_omesh | annulus | bump_channel | flat_plate | sphere_shell | box | file *required* Name of the built-in mesh generator, or ‘file’ for an external mesh (params: path, optional scale; Gmsh .msh 2.2/4.1 ASCII or Gyre .npz).
params mapping Keyword arguments of the generator (e.g. n_surf, n_radial, r_far, code); unknown, missing or mistyped arguments are validation errors.
geometry_order integer 4 Polynomial degree of the curved elements (generators only: a mesh file carries its own degree). (≥ 1, ≤ 8)

FlowSpec — Free-stream / reference flow conditions (all differentiable inputs).

field type default description
mach number 0.5 Free-stream Mach number. (> 0.0, < 5.0)
alpha_deg number 0.0 Angle of attack in degrees. (≥ -90.0, ≤ 90.0)
beta_deg number 0.0 Sideslip angle in degrees (3-D only; ignored in 2-D). Free-stream direction: (cos a cos b, sin a cos b, sin b). (≥ -90.0, ≤ 90.0)
reynolds number or null None Reynolds number (unit reference length); null means inviscid.
prandtl number 0.72 (> 0.0)
gamma number 1.4 (> 1.0)
turbulence none | sa none Turbulence closure: ‘none’ (laminar or inviscid) or ‘sa’ (negative Spalart-Allmaras RANS model; requires reynolds).
extra mapping Additional boundary data: p_back, pt_in, tt_in, t_wall, suth; with turbulence ‘sa’ also chi_inf (free-stream nu_tilde/nu, default 3) and prt (turbulent Prandtl number, default 0.9).

DiscretizationSpec — Spatial discretization.

field type default description
order integer 2 Solution polynomial degree p (accuracy p+1); viscous cases need p >= 1. (≥ 0, ≤ 8)
two_point_flux ranocha | chandrashekar | kennedy_gruber | central ranocha
surface_flux roe | es_roe | hllc | llf roe Interface flux: ‘roe’ and ‘hllc’ are the classical solvers; ‘es_roe’ (matrix dissipation in entropy variables) and ‘llf’ (scalar dissipation) are entropy stable with an entropy-conservative two_point_flux.
shock_capturing boolean False Sensor-based artificial viscosity for flows with shocks.
av_coef number 1.0 Artificial-viscosity scale (multiples of h/p * (|u|+c)). (> 0.0, ≤ 10.0)
boundaries mapping Boundary group -> condition; defaults are chosen per generator.

SolverSpec — Nonlinear and linear solver controls.

field type default description
levels list of integer or auto | single auto p-multigrid degrees fine->coarse, ‘auto’ (p, p//2, …, 0) or ‘single’.
tol_rel number 1e-10 (> 0.0, < 1.0)
max_steps integer 150 (≥ 1, ≤ 5000)
cfl0 number 5.0 (> 0.0)
cfl_growth number 10.0 (≥ 1.0)
cfl_shrink number 1.0 Factor applied to the CFL number after a step that the line search shortened to a quarter or less (1: hold the CFL). (> 0.0, ≤ 1.0)
lin_tol number 0.01 (> 0.0, < 1.0)
krylov_dim integer 40 (≥ 5, ≤ 400)
restarts integer 2 (≥ 1, ≤ 50)
smoother jacobi | gmres | line jacobi Smoother of the p-multigrid levels: damped block Jacobi, block-Jacobi GMRES, or line Jacobi (block-tridiagonal solves along lines of strongly coupled elements of an anisotropic mesh; block Jacobi where the mesh has none).
precond_lag integer 1 Assemble the blocks of the smoother every this many nonlinear steps (1: every step). In between, the last blocks are reused. (≥ 1, ≤ 50)
precond_precision double | single double Precision in which the blocks of the smoother are assembled, stored and applied. ‘single’ halves their memory, which is what bounds the size of a 3-D problem on one device; the residual, its Jacobian products, the Krylov vectors and the inverses stay in double precision, so the solution is unchanged and only the iteration count can differ.

ReferenceSpec — Reference quantities of the force and moment coefficients.

field type default description
area number or null None Reference area (length in 2-D). Default: 1 in 2-D, the span of a spanwise-extruded generator mesh in 3-D, the frontal area of the body of a sphere_shell mesh.
length number 1.0 Reference length of the moment coefficient. (> 0.0)
moment_center list of number Point about which the moment is taken.
groups list of string or null None Wall boundary groups over which the force, moment and heat-flux coefficients are integrated (the loads of one component). Default: every wall group of the mesh. The nodal load field f_surface and the surface displacement x_surface always cover all walls.
components mapping or null None Named components of the walls, each a list of wall boundary groups. Every force, moment and heat-flux coefficient is then also an output per component, named _ (cd_wing, cl_tail, …), from the same solve and with its own derivatives. Names are letters and digits.

The table is generated from the model, so a field has a description here only if the model declares one. The meaning of the remaining fields — the flux choices, the solver controls, flow.prandtl, flow.gamma and the keys of flow.extra — is given under Cases, and the generator parameters under Mesh generators.

Presets#

preset description elements DOF model
naca0012_euler Inviscid subsonic flow over a NACA 0012 aerofoil (M=0.5, alpha=2 deg). 256 9,216 Euler, 2-D
naca0012_laminar Laminar flow over a NACA 0012 aerofoil (M=0.5, alpha=1 deg, Re=5000). 480 17,280 Navier–Stokes, 2-D
naca2412_euler Inviscid flow over a cambered NACA 2412 aerofoil (M=0.4, alpha=1 deg). 256 9,216 Euler, 2-D
naca0012_transonic Transonic inviscid flow over a NACA 0012 aerofoil (M=0.8, alpha=1.25 deg) with sensor-based shock capturing. 1024 36,864 Euler, 2-D
naca0012_euler_3d Spanwise-periodic 3-D extrusion of the inviscid NACA 0012 case (hexahedra): exercises the 3-D operators, solver and adjoint; coefficients per unit span. 192 25,920 Euler, 3-D
cylinder_re40 Steady separated laminar flow past a circular cylinder (Re_D=40, M=0.2). 240 15,360 Navier–Stokes, 2-D
sphere_euler Inviscid subsonic flow past a sphere (M=0.2) on a cubed-sphere mesh of curved hexahedra: a genuinely 3-D, unstructured-topology case whose exact solution has no drag and no entropy rise. 216 29,160 Euler, 3-D
sphere_re100 Steady laminar flow past a sphere (Re_D=100, M=0.2): 3-D Navier-Stokes with a closed recirculation bubble; drag referred to the frontal area. 576 77,760 Navier–Stokes, 3-D
flat_plate_sa Turbulent flat plate at zero pressure gradient (M=0.2, Re=5e6 per unit length) with the Spalart-Allmaras model: the NASA Turbulence Modeling Resource verification case on a coarse wall-resolved mesh. 150 6,750 Navier–Stokes, 2-D
bump_euler Inviscid subsonic channel flow over a smooth Gaussian bump (M=0.5): the exact solution is isentropic, so the entropy error measures accuracy. 48 3,072 Euler, 2-D

    ↑ ↓ moveEnter open[ ] change depthResults show section and depth level