{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://guillochon.github.io/shaderous/shaderous-setup.schema.json",
 "title": "Shaderous setup",
 "description": "A simulation setup for Shaderous: the domain, the physics, the mesh, the background gas and the parts that make the initial conditions (docs/setups.md). Generated from the option table by `npm run gen`.",
 "type": "object",
 "required": [
  "format",
  "version"
 ],
 "additionalProperties": false,
 "properties": {
  "$schema": {
   "type": "string"
  },
  "format": {
   "const": "shaderous-setup"
  },
  "version": {
   "type": "integer",
   "minimum": 1,
   "maximum": 1
  },
  "id": {
   "type": "string",
   "maxLength": 4000
  },
  "name": {
   "type": "string",
   "maxLength": 4000,
   "title": "Name",
   "description": "What the setup is called in the preset list and in its file"
  },
  "group": {
   "type": "string",
   "maxLength": 4000
  },
  "family": {
   "type": "string",
   "maxLength": 4000
  },
  "familyName": {
   "type": "string",
   "maxLength": 4000
  },
  "variant": {
   "type": "string",
   "maxLength": 4000
  },
  "blurb": {
   "type": "string",
   "maxLength": 4000,
   "title": "Description",
   "description": "A sentence or two shown under the preset menu"
  },
  "extends": {
   "type": "string",
   "maxLength": 4000
  },
  "domain": {
   "type": "object",
   "properties": {
    "ndim": {
     "enum": [
      3,
      2
     ],
     "title": "Dimensions",
     "description": "Two or three dimensions. A 2D run is one layer of cells in x and y"
    },
    "n": {
     "type": "integer",
     "title": "Resolution",
     "description": "Cells across the box; on an adaptive mesh, at its finest level",
     "minimum": 16,
     "maximum": 16384
    },
    "amr": {
     "type": "integer",
     "title": "Refinement",
     "description": "Adaptive mesh: levels of refinement below the coarsest grid. 0 puts every cell at the full resolution",
     "minimum": 0,
     "maximum": 5
    },
    "box": {
     "type": "number",
     "title": "Box size",
     "description": "Side of the box, in code units: the domain is a cube of this side centered on the origin",
     "minimum": 1e-12,
     "maximum": 1e+30
    },
    "supports2d": {
     "type": "boolean",
     "title": "Makes sense in 2D",
     "description": "The setup can also run on a 2D (x, y) grid. Without it the setup is three-dimensional only"
    },
    "symmetric": {
     "enum": [
      "none",
      "x",
      "y",
      "z",
      "xy",
      "xz",
      "yz",
      "xyz"
     ],
     "title": "Symmetric under",
     "description": "The mirrors (planes through the origin, named by the axis normal to each) the setup is symmetric under: a run may then compute only the part above them"
    },
    "symmetricField": {
     "type": "boolean",
     "title": "Field symmetric too",
     "description": "The magnetic field is symmetric under those mirrors as well (a vector potential odd in its normal component and even in the others)"
    },
    "mirror": {
     "enum": [
      "none",
      "x",
      "y",
      "z",
      "xy",
      "xz",
      "yz",
      "xyz"
     ],
     "title": "Mirror symmetry",
     "description": "Compute only the part of a symmetric setup above its planes of symmetry, each mirrored axis’s lower face a plane of symmetry; the totals are those of the whole. With every axis mirrored (an octant in 3D, a quadrant in 2D) each runs from 0 to the box side: twice the resolution for the same cells. With only some (a half, or a quadrant in 3D) those run from 0 to half the box with half the cells: the same cube as without mirrors, at half or a quarter of the cost"
    },
    "geometry": {
     "enum": [
      "cartesian",
      "cylindrical",
      "spherical"
     ],
     "title": "Geometry",
     "description": "Cartesian, or a 2D body of revolution about the y axis, in (R, z): x is then R from the axis (the lower x face) to the box side, and cells are rings; or in (r, theta): x is then r from the inner radius to the box side, y theta from pole to pole"
    },
    "rMin": {
     "type": "number",
     "title": "Inner radius",
     "description": "A spherical (r, theta) run: the radius of its inner face (above zero); the box side is then its outer radius",
     "minimum": 1e-12,
     "maximum": 1e+30
    },
    "logR": {
     "type": "boolean",
     "title": "Logarithmic in r",
     "description": "A spherical (r, theta) run: cells spaced evenly in ln r, so that they stay about as long as they are wide, rather than evenly in r"
    },
    "bc": {
     "type": "object",
     "properties": {
      "lo": {
       "type": "array",
       "items": {
        "enum": [
         0,
         1,
         2,
         3,
         4,
         5
        ]
       },
       "maxItems": 3
      },
      "hi": {
       "type": "array",
       "items": {
        "enum": [
         0,
         1,
         2,
         3,
         4,
         5
        ]
       },
       "maxItems": 3
      }
     },
     "additionalProperties": false,
     "title": "Faces of the box",
     "description": "What the gas meets at each face of the box. Periodic faces come in pairs"
    },
    "bc2d": {
     "type": "object",
     "properties": {
      "lo": {
       "type": "array",
       "items": {
        "enum": [
         0,
         1,
         2,
         3,
         4,
         5
        ]
       },
       "maxItems": 3
      },
      "hi": {
       "type": "array",
       "items": {
        "enum": [
         0,
         1,
         2,
         3,
         4,
         5
        ]
       },
       "maxItems": 3
      }
     },
     "additionalProperties": false
    },
    "wallVelocity": {
     "type": "object",
     "properties": {
      "xlo": {
       "type": "array",
       "items": {
        "type": "number"
       },
       "minItems": 3,
       "maxItems": 3,
       "title": "Wall velocity, lower x face",
       "description": "Where the lower x face is a moving wall: its velocity along itself (the part normal to it is ignored)"
      },
      "xhi": {
       "type": "array",
       "items": {
        "type": "number"
       },
       "minItems": 3,
       "maxItems": 3,
       "title": "Wall velocity, upper x face",
       "description": "Where the upper x face is a moving wall: its velocity along itself (the part normal to it is ignored)"
      },
      "ylo": {
       "type": "array",
       "items": {
        "type": "number"
       },
       "minItems": 3,
       "maxItems": 3,
       "title": "Wall velocity, lower y face",
       "description": "Where the lower y face is a moving wall: its velocity along itself (the part normal to it is ignored)"
      },
      "yhi": {
       "type": "array",
       "items": {
        "type": "number"
       },
       "minItems": 3,
       "maxItems": 3,
       "title": "Wall velocity, upper y face",
       "description": "Where the upper y face is a moving wall: its velocity along itself (the part normal to it is ignored)"
      },
      "zlo": {
       "type": "array",
       "items": {
        "type": "number"
       },
       "minItems": 3,
       "maxItems": 3,
       "title": "Wall velocity, lower z face",
       "description": "Where the lower z face is a moving wall: its velocity along itself (the part normal to it is ignored)"
      },
      "zhi": {
       "type": "array",
       "items": {
        "type": "number"
       },
       "minItems": 3,
       "maxItems": 3,
       "title": "Wall velocity, upper z face",
       "description": "Where the upper z face is a moving wall: its velocity along itself (the part normal to it is ignored)"
      }
     },
     "additionalProperties": false
    },
    "units": {
     "type": "object",
     "properties": {
      "name": {
       "type": "string",
       "maxLength": 4000,
       "title": "Name",
       "description": "A name for the unit system"
      },
      "length": {
       "type": "object",
       "properties": {
        "unit": {
         "enum": [
          "m",
          "cm",
          "km",
          "Rearth",
          "Rsun",
          "au",
          "pc",
          "kg",
          "g",
          "Mearth",
          "Msun",
          "kg/m3",
          "g/cm3",
          "m/s",
          "km/s",
          "cm/s"
         ],
         "title": "Length unit",
         "description": "The unit of the length"
        },
        "value": {
         "type": "number",
         "title": "Length",
         "description": "This many of the unit beside it are one code unit of length",
         "minimum": 1e-300,
         "maximum": 1e+300
        },
        "per": {
         "anyOf": [
          {
           "type": "number"
          },
          {
           "type": "string",
           "maxLength": 4000
          }
         ]
        }
       },
       "additionalProperties": false
      },
      "mass": {
       "type": "object",
       "properties": {
        "unit": {
         "enum": [
          "m",
          "cm",
          "km",
          "Rearth",
          "Rsun",
          "au",
          "pc",
          "kg",
          "g",
          "Mearth",
          "Msun",
          "kg/m3",
          "g/cm3",
          "m/s",
          "km/s",
          "cm/s"
         ],
         "title": "Mass unit",
         "description": "The unit of the mass"
        },
        "value": {
         "type": "number",
         "title": "Mass",
         "description": "This many of the unit beside it are one code unit of mass",
         "minimum": 1e-300,
         "maximum": 1e+300
        },
        "per": {
         "anyOf": [
          {
           "type": "number"
          },
          {
           "type": "string",
           "maxLength": 4000
          }
         ]
        }
       },
       "additionalProperties": false
      },
      "density": {
       "type": "object",
       "properties": {
        "unit": {
         "enum": [
          "m",
          "cm",
          "km",
          "Rearth",
          "Rsun",
          "au",
          "pc",
          "kg",
          "g",
          "Mearth",
          "Msun",
          "kg/m3",
          "g/cm3",
          "m/s",
          "km/s",
          "cm/s"
         ],
         "title": "Density unit",
         "description": "The unit of the density"
        },
        "value": {
         "type": "number",
         "title": "Density",
         "description": "This many of the unit beside it are one code unit of density",
         "minimum": 1e-300,
         "maximum": 1e+300
        },
        "per": {
         "anyOf": [
          {
           "type": "number"
          },
          {
           "type": "string",
           "maxLength": 4000
          }
         ]
        }
       },
       "additionalProperties": false
      },
      "velocity": {
       "type": "object",
       "properties": {
        "unit": {
         "enum": [
          "m",
          "cm",
          "km",
          "Rearth",
          "Rsun",
          "au",
          "pc",
          "kg",
          "g",
          "Mearth",
          "Msun",
          "kg/m3",
          "g/cm3",
          "m/s",
          "km/s",
          "cm/s"
         ],
         "title": "Velocity unit",
         "description": "The unit of the velocity"
        },
        "value": {
         "type": "number",
         "title": "Velocity",
         "description": "This many of the unit beside it are one code unit of velocity",
         "minimum": 1e-300,
         "maximum": 1e+300
        },
        "per": {
         "anyOf": [
          {
           "type": "number"
          },
          {
           "type": "string",
           "maxLength": 4000
          }
         ]
        }
       },
       "additionalProperties": false
      }
     },
     "additionalProperties": false,
     "title": "Physical units",
     "description": "What one code unit is, for a setup that stands for something real: a length and a mass (the time unit then makes G = 1), or a length, a density and a velocity. Without them the setup is scale free and shown in code units"
    }
   },
   "additionalProperties": false
  },
  "physics": {
   "type": "object",
   "properties": {
    "eos": {
     "enum": [
      "ideal",
      "barotropic",
      "liquid",
      "gas_radiation",
      "degenerate",
      "ionizing",
      "helmholtz",
      "hhe",
      "aneos"
     ],
     "title": "Equation of state",
     "description": "How pressure follows from density and internal energy. Changing it carries each cell’s pressure over, and the run continues"
    },
    "eosParams": {
     "type": "object",
     "properties": {
      "aneosA": {
       "enum": [
        0,
        1,
        2,
        3
       ],
       "title": "Material",
       "description": "The material of the ANEOS equation of state: rock, iron alloy or water, each from its published tables. A run whose two species are materials (a planet with a core) takes them instead"
      }
     },
     "additionalProperties": {
      "type": "number"
     }
    },
    "gravity": {
     "enum": [
      "off",
      "constant",
      "periodic",
      "isolated"
     ],
     "title": "Gravity",
     "description": "Off, a uniform field, or the self-gravity of the gas. Point masses pull either way"
    },
    "G": {
     "anyOf": [
      {
       "type": "number"
      },
      {
       "enum": [
        "units"
       ]
      }
     ],
     "title": "G",
     "description": "Gravitational constant in code units, or the strength of the uniform field. A setup with physical units may leave it to them"
    },
    "gext": {
     "anyOf": [
      {
       "type": "array",
       "items": {
        "type": "number"
       },
       "minItems": 3,
       "maxItems": 3
      },
      {
       "type": "object",
       "properties": {
        "down": {
         "type": "number"
        }
       },
       "additionalProperties": false
      }
     ],
     "title": "Uniform acceleration",
     "description": "A uniform acceleration on the gas, besides the Constant field"
    },
    "cooling": {
     "enum": [
      "off",
      "power",
      "ism"
     ],
     "title": "Cooling function",
     "description": "Optically thin radiative cooling (and heating) of the gas"
    },
    "coolParams": {
     "type": "object",
     "properties": {},
     "additionalProperties": {
      "type": "number"
     }
    },
    "radiation": {
     "enum": [
      "off",
      "m1"
     ],
     "title": "Radiation transport",
     "description": "Gray radiation transport with the M1 closure: the radiation’s energy and flux, carried with the gas, streaming and diffusing between cells, and trading heat and momentum with the gas through its opacity (docs/numerics.md section 24). Cartesian coordinates, on the uniform grid or the adaptive mesh (all blocks then take one timestep), without a magnetic field"
    },
    "opacity": {
     "enum": [
      "constant",
      "electron",
      "kramers"
     ],
     "title": "Opacity",
     "description": "How opaque the gas is to the radiation, per unit mass: a constant, electron scattering, or Kramers’ free-free absorption with electron scattering. With physical units the scattering and Kramers constants come from the composition"
    },
    "opacityParams": {
     "type": "object",
     "properties": {},
     "additionalProperties": {
      "type": "number"
     }
    },
    "radC": {
     "type": "number",
     "title": "Speed of light c",
     "description": "The speed of light in code units. With physical units it is theirs; a scale-free setup sets its own",
     "minimum": 0
    },
    "radChat": {
     "type": "number",
     "title": "Reduced speed of light",
     "description": "The speed light crosses transparent gas at in the run (at most c): its step is about dx / chat. Ten times the fastest gas is enough; opaque cells take the true speed whatever this is",
     "minimum": 0
    },
    "radLocalC": {
     "type": "boolean",
     "title": "Speed of light per cell",
     "description": "Opaque cells take the true speed of light and only transparent ones the reduced one, so the radiation in a star has its true heat capacity. Off, one reduced speed everywhere"
    },
    "radSolver": {
     "enum": [
      "hll",
      "glf"
     ],
     "title": "Radiation flux",
     "description": "The flux between cells: HLL with the M1 closure’s wave speeds, or global Lax-Friedrichs (the speed of light: more diffusive, more isotropic around sources)"
    },
    "radSweeps": {
     "type": "integer",
     "title": "Radiation sweeps per step",
     "description": "Radiation sweeps per hydro step (1 to 16). The hydro step is at most this many of the sweep’s own steps, so more sweeps let it be longer",
     "minimum": 1,
     "maximum": 16
    },
    "viscosity": {
     "type": "number",
     "title": "Viscosity ν",
     "description": "Kinematic viscosity: the stress is ρ ν times the shear. Obstacles hold the gas at their walls. 0 is off",
     "minimum": 0,
     "maximum": 1e+30
    },
    "conductivity": {
     "type": "number",
     "title": "Conductivity κ",
     "description": "Thermal conduction: the heat flux is -κ ρ grad T, so the temperature of an ideal gas diffuses at (γ - 1) κ. 0 is off",
     "minimum": 0,
     "maximum": 1e+30
    },
    "resistivity": {
     "type": "number",
     "title": "Resistivity η",
     "description": "With a magnetic field: magnetic diffusivity, so the field diffuses as η ∇²B (the electric field gains η curl B) and the current it dissipates, η J², heats the gas. 0 is off (ideal MHD, with only the scheme’s own diffusion)",
     "minimum": 0,
     "maximum": 1e+30
    },
    "driving": {
     "type": "object",
     "properties": {
      "accel": {
       "type": "number",
       "title": "Driving acceleration",
       "description": "Turbulence driving: the root-mean-square acceleration of a random force that stirs the gas at large scales (a band of wavelengths, correlated over a time τ). The gas reaches speeds of about (accel × box / band)^½ where it balances the dissipation. 0 is off",
       "minimum": 0,
       "maximum": 1e+30
      },
      "tau": {
       "type": "number",
       "title": "Driving correlation time τ",
       "description": "How long the random force keeps its pattern (its Ornstein-Uhlenbeck correlation time)",
       "minimum": 0.000001,
       "maximum": 1e+30
      },
      "kMin": {
       "type": "number",
       "title": "Driving band, longest",
       "description": "The longest wavelengths driven, as wavelengths per box side",
       "minimum": 1,
       "maximum": 16
      },
      "kMax": {
       "type": "number",
       "title": "Driving band, shortest",
       "description": "The shortest wavelengths driven, as wavelengths per box side (at most 64 wavevectors are kept, the longest first)",
       "minimum": 1,
       "maximum": 16
      },
      "zeta": {
       "type": "number",
       "title": "Solenoidal share ζ",
       "description": "What the force stirs: 1 swirls only (solenoidal, no compression), 0 compresses only, 0.5 the natural mix",
       "minimum": 0,
       "maximum": 1
      },
      "seed": {
       "type": "number",
       "title": "Driving seed",
       "description": "Which random force: each seed gives another, and the same seed the same run",
       "minimum": 0,
       "maximum": 1000000000
      }
     },
     "additionalProperties": false
    },
    "riemann": {
     "enum": [
      "hllc",
      "hllclm",
      "hll"
     ],
     "title": "Riemann solver",
     "description": "How the flux between neighboring cells is worked out. HLLC resolves contact waves; its low-Mach version cuts dissipation in slow flow; HLL is the most diffusive and the most robust"
    },
    "limiter": {
     "enum": [
      "koren",
      "mc",
      "vanleer",
      "minmod"
     ],
     "title": "Limiter",
     "description": "How steeply the reconstruction may vary within a cell: Koren is sharpest, Minmod most diffusive and most robust"
    },
    "cfl": {
     "type": "number",
     "title": "CFL number",
     "description": "Timestep as a fraction of the time a signal takes to cross a cell. Smaller is more stable and slower",
     "minimum": 0.05,
     "maximum": 1
    },
    "pressure": {
     "enum": [
      "explicit",
      "implicit"
     ],
     "title": "Pressure",
     "description": "How the pressure acts. Explicit: in the fluxes between cells, with a timestep that follows the sound speed. Implicit: advection is explicit and the pressure is solved for each step, so the timestep follows the flow speed, however fast the sound: for the liquid and the ideal gas, in Cartesian coordinates, on the uniform grid or the adaptive mesh"
    },
    "pressureCycles": {
     "type": "integer",
     "title": "Pressure V-cycles",
     "description": "Implicit pressure: multigrid V-cycles per step (warm-started). More converge the pressure further, at more cost",
     "minimum": 1,
     "maximum": 16
    },
    "pressureTol": {
     "type": "number",
     "title": "Pressure tolerance",
     "description": "Implicit pressure: the residual of the pressure equation after a step’s V-cycles, relative to its largest right-hand side, above which the step is counted as unconverged",
     "minimum": 1e-8,
     "maximum": 1
    },
    "acousticCfl": {
     "type": "number",
     "title": "Acoustic steps per step",
     "description": "Implicit pressure: the most steps of the explicit scheme that one step may span. It is what bounds the step of a liquid at rest; sound that a step spans many times over is damped",
     "minimum": 1,
     "maximum": 1000000
    },
    "floors": {
     "type": "object",
     "properties": {
      "rho": {
       "type": "number",
       "title": "Density floor",
       "description": "No cell is thinner than this",
       "minimum": 0
      },
      "p": {
       "type": "number",
       "title": "Pressure floor",
       "description": "No cell has less pressure than this",
       "minimum": 0
      }
     },
     "additionalProperties": false
    },
    "fluff": {
     "type": "object",
     "properties": {
      "rho": {
       "type": "number",
       "title": "Tenuous below density",
       "description": "Gas thinner than this has its heat and speed capped (the next two fields), so a few hot or fast cells of ambient gas cannot set the timestep for the whole grid. Not conservative, but such gas carries next to no mass. 0 is off",
       "minimum": 0
      },
      "u": {
       "type": "number",
       "title": "Max specific energy",
       "description": "Largest internal energy per unit mass tenuous gas may have. 0 is no cap",
       "minimum": 0
      },
      "v": {
       "type": "number",
       "title": "Max speed",
       "description": "Largest speed tenuous gas may have. 0 is no cap",
       "minimum": 0
      },
      "va": {
       "type": "number",
       "title": "Max Alfvén speed",
       "description": "With a magnetic field: largest Alfvén speed |B| / √ρ anywhere. Where the field is stronger than that for the gas it threads, mass is added at rest until it is not. Not conservative. 0 is no cap",
       "minimum": 0
      }
     },
     "additionalProperties": false
    },
    "frame": {
     "enum": [
      "inertial",
      "gas",
      "masses"
     ],
     "title": "Frame",
     "description": "An inertial frame, or one that accelerates with the gas’s center of mass or the point masses’, so that what the run follows stays in the box"
    },
    "rotation": {
     "type": "object",
     "properties": {
      "omega": {
       "type": "array",
       "items": {
        "type": "number"
       },
       "minItems": 3,
       "maxItems": 3,
       "title": "Rotating frame Ω",
       "description": "Angular velocity of a frame turning about an axis through the box center: the gas feels the Coriolis force (and the centrifugal force, below). Velocities are those in the turning frame. In 2D only the z part turns the plane. Zero: an inertial frame"
      },
      "centrifugal": {
       "type": "boolean",
       "title": "Centrifugal force",
       "description": "With a rotating frame: the centrifugal force as well as the Coriolis force. Off, the Coriolis force alone (an f-plane, as in a shearing box)"
      }
     },
     "additionalProperties": false
    },
    "cosmology": {
     "type": "object",
     "properties": {
      "omegaM": {
       "type": "number",
       "title": "Matter density Ω_m",
       "description": "Matter density today, in units of the critical density",
       "minimum": 0,
       "maximum": 10
      },
      "omegaL": {
       "type": "number",
       "title": "Cosmological constant Ω_Λ",
       "description": "Its density today, in units of the critical density (the curvature makes up the rest)",
       "minimum": 0,
       "maximum": 10
      },
      "zStart": {
       "type": "number",
       "title": "Starting redshift",
       "description": "Redshift at t = 0",
       "minimum": 0,
       "maximum": 10000
      },
      "zEnd": {
       "type": "number",
       "title": "Ending redshift",
       "description": "Redshift the run stops at (it sets the end time)",
       "minimum": 0,
       "maximum": 10000
      },
      "h": {
       "type": "number",
       "title": "Hubble constant h",
       "description": "H0 in units of 100 km/s/Mpc, for the physical units a box size gives",
       "minimum": 0.1,
       "maximum": 2
      },
      "boxMpc": {
       "type": "number",
       "title": "Box size (Mpc/h)",
       "description": "The box’s comoving side in Mpc/h. With it the run has physical units, and the readouts show proper densities, pressures and lengths at the current scale factor. Left out, the run is scale free",
       "minimum": 0,
       "maximum": 100000
      }
     },
     "additionalProperties": false,
     "title": "Comoving coordinates",
     "description": "An expanding universe: positions comoving, densities comoving (mean 1), velocities peculiar, times in 1/H0 from the starting redshift. G follows from the matter density. A periodic box of gas, with or without self-gravity"
    },
    "shear": {
     "type": "object",
     "properties": {
      "omega": {
       "type": "number",
       "title": "Ω",
       "description": "Angular velocity of the frame",
       "minimum": 0,
       "maximum": 1000000
      },
      "q": {
       "type": "number",
       "title": "Shear q",
       "description": "-d ln Ω / d ln R: 1.5 for a Keplerian disk, 1 for a flat rotation curve",
       "minimum": 0,
       "maximum": 2
      },
      "stratified": {
       "type": "boolean",
       "title": "Stratified",
       "description": "The vertical tidal pull, -Ω² z, toward the midplane"
      }
     },
     "additionalProperties": false,
     "title": "Shearing box",
     "description": "The local model of a disk: a frame turning at Ω about z with the tidal pull of the shear, x radial, y along the orbit. Its x faces are periodic with the shift of the background flow v_y = -q Ω x, which the initial state should hold. Hydrodynamics on a uniform grid, periodic in y (and z unless stratified)"
    },
    "jeansFloor": {
     "type": "boolean",
     "title": "Jeans floor",
     "description": "Pressure floor that keeps the Jeans length resolved (Truelove)"
    },
    "jeansCells": {
     "type": "integer",
     "title": "Cells per Jeans length",
     "description": "The Jeans floor raises the pressure so the Jeans length spans at least this many cells",
     "minimum": 4,
     "maximum": 32
    },
    "vcycles": {
     "type": "integer",
     "title": "V-cycles",
     "description": "Multigrid V-cycles per step for self-gravity. More converge the potential further, at more cost. On the adaptive mesh this is the most per step",
     "minimum": 1,
     "maximum": 8
    },
    "gravEnergyFlux": {
     "type": "boolean",
     "title": "Conserve energy",
     "description": "Flux-form gravitational work: conserves total energy"
    },
    "composition": {
     "anyOf": [
      {
       "enum": [
        "solar",
        "solarNeutral",
        "hydrogen",
        "carbonOxygen"
       ]
      },
      {
       "type": "object",
       "properties": {
        "name": {
         "type": "string",
         "maxLength": 4000
        },
        "X": {
         "type": "object",
         "additionalProperties": {
          "type": "number"
         }
        },
        "ionization": {
         "enum": [
          "full",
          "neutral"
         ]
        }
       },
       "additionalProperties": false
      }
     ],
     "title": "Composition",
     "description": "What the gas is made of, which sets the kelvin scale and the physical constants of the equation of state: solar (fully ionized), solarNeutral, hydrogen or carbonOxygen. The hydrogen and helium equation of state has tables for the solar ones and for hydrogen"
    },
    "species": {
     "anyOf": [
      {
       "enum": [
        "aprox13"
       ]
      },
      {
       "type": "array",
       "items": {
        "type": "string",
        "maxLength": 4000
       },
       "maxItems": 64
      }
     ],
     "title": "Species",
     "description": "Species whose mass fractions the gas carries, by name (he4, c12, ...), separated by commas; or aprox13 for the burning network’s thirteen. None by default"
    },
    "speciesGamma": {
     "type": "object",
     "additionalProperties": {
      "type": "number"
     },
     "title": "Gamma by species",
     "description": "Adiabatic index of each species the gas carries, by name, where the species set the equation of state (a mixture of ideal gases): a species not listed takes the gas’s gamma"
    },
    "burn": {
     "anyOf": [
      {
       "type": "object",
       "properties": {
        "network": {
         "enum": [
          "aprox13"
         ]
        },
        "inShocks": {
         "type": "boolean"
        },
        "limiter": {
         "type": "number"
        }
       },
       "additionalProperties": false
      },
      {
       "type": "object",
       "properties": {
        "fuel": {
         "type": "string",
         "maxLength": 4000
        },
        "ash": {
         "type": "string",
         "maxLength": 4000
        },
        "q": {
         "type": "number"
        },
        "ea": {
         "type": "number"
        },
        "k": {
         "type": "number"
        },
        "inShocks": {
         "type": "boolean"
        }
       },
       "additionalProperties": false
      }
     ],
     "title": "Burning",
     "description": "Burning of the gas, wherever it is hot and dense enough: nuclear, by the trained network of the 13-isotope alpha chain, or a single fuel to ash reaction at an Arrhenius rate"
    },
    "toolScale": {
     "type": "object",
     "properties": {
      "rho": {
       "type": "number",
       "title": "Density",
       "description": "The tools’ density scale is at least this",
       "minimum": 0
      },
      "v": {
       "type": "number",
       "title": "Speed",
       "description": "The tools’ speed scale is at least this",
       "minimum": 0
      }
     },
     "additionalProperties": false,
     "title": "Scale of the editing tools",
     "description": "Least density and speed the editing tools (paint, push) measure their amounts against. They take the densest and fastest gas of the run, which leaves them nothing to go by in a box that holds next to nothing"
    }
   },
   "additionalProperties": false
  },
  "mesh": {
   "type": "object",
   "properties": {
    "refineHi": {
     "type": "number",
     "title": "Refine above",
     "description": "Adaptive mesh: a block is split where the normalized second derivative of density or pressure exceeds this anywhere in it. The indicator is near 1 at a shock or contact and small where the gas varies smoothly. Lower refines more",
     "minimum": 0.05,
     "maximum": 1
    },
    "refineLo": {
     "type": "number",
     "title": "Merge below",
     "description": "Adaptive mesh: four sibling blocks are merged where the indicator is below this in all of them. Kept below the refinement threshold",
     "minimum": 0,
     "maximum": 1
    },
    "refineMasses": {
     "type": "boolean",
     "title": "Refine around point masses",
     "description": "Adaptive mesh: keep the gas around every point mass at the finest level, so that softening and sinks can be as small as the finest cells allow"
    },
    "refineDense": {
     "type": "number",
     "title": "Always refine above density",
     "description": "Adaptive mesh: gas denser than this is always at the finest level, as the smooth interior of a star must be. 0 is off",
     "minimum": 0
    },
    "refineRho": {
     "type": "number",
     "title": "Refine above density",
     "description": "Adaptive mesh: gas thinner than this does not ask for refinement, so ripples in the ambient gas far from a star leave its blocks coarse. 0 is off",
     "minimum": 0
    },
    "timeBins": {
     "enum": [
      0,
      1,
      2,
      3
     ],
     "title": "Local timesteps",
     "description": "Adaptive mesh: blocks of slow gas take longer steps than the fastest block, where that saves work"
    },
    "jeansRefine": {
     "type": "number",
     "title": "Refine the Jeans length",
     "description": "With self-gravity, refine where the Jeans length is under this many cells. 0 is off",
     "minimum": 0,
     "maximum": 64
    }
   },
   "additionalProperties": false
  },
  "background": {
   "type": "object",
   "properties": {
    "rho": {
     "type": "number",
     "title": "Ambient density",
     "description": "Density of the gas that fills the box where no part puts anything else. With stars, the gas around them",
     "minimum": 1e-300
    },
    "p": {
     "type": "number",
     "title": "Ambient pressure",
     "description": "Pressure of that gas. With stars and left empty, the pressure of the stars’ outermost layer",
     "minimum": 0
    },
    "v": {
     "type": "array",
     "items": {
      "type": "number"
     },
     "minItems": 3,
     "maxItems": 3,
     "title": "Ambient velocity",
     "description": "Velocity of that gas"
    },
    "s": {
     "type": "number",
     "title": "Ambient dye",
     "description": "Passive scalar of that gas: a dye carried with it",
     "minimum": 0,
     "maximum": 1
    },
    "X": {
     "type": "object",
     "additionalProperties": {
      "type": "number"
     },
     "title": "Ambient composition",
     "description": "Mass fractions of that gas, by species name"
    },
    "cut": {
     "type": "number",
     "title": "Stars end at density",
     "description": "With stars: a cell thinner than this is ambient gas, not star. Left empty, a polytrope ends where the ambient gas would be as hot as its center",
     "minimum": 0
    },
    "relativeTo": {
     "type": "string",
     "maxLength": 4000
    }
   },
   "additionalProperties": false
  },
  "run": {
   "type": "object",
   "properties": {
    "tEnd": {
     "anyOf": [
      {
       "type": "null"
      },
      {
       "type": "number"
      }
     ],
     "title": "End time",
     "description": "The run pauses when it reaches this time. Empty runs on without end"
    },
    "checkpointDt": {
     "type": "number",
     "title": "Checkpoint every",
     "description": "Time between checkpoints, when the page is asked to save them: the value the Time panel starts with",
     "minimum": 0
    },
    "tDyn": {
     "type": "number",
     "title": "Dynamical time",
     "description": "The time over which the flow visibly changes (a star’s sqrt(R³ / G M), a binary’s period): a movie takes a frame every 600th of it by default",
     "minimum": 0
    },
    "startPaused": {
     "type": "boolean",
     "title": "Start paused",
     "description": "The run waits, paused, for Run"
    }
   },
   "additionalProperties": false
  },
  "view": {
   "type": "object",
   "properties": {
    "field": {
     "type": "integer",
     "title": "Opening field",
     "description": "The quantity shown when the setup opens (the View panel’s Field, by its number)",
     "minimum": 0,
     "maximum": 36
    },
    "log": {
     "type": "boolean",
     "title": "Logarithmic colors",
     "description": "The color scale the setup opens with"
    },
    "mode": {
     "enum": [
      "volume",
      "slice",
      "projection"
     ],
     "title": "Opening view",
     "description": "How the gas is drawn when the setup opens in 3D"
    },
    "axis": {
     "enum": [
      2,
      1,
      0
     ],
     "title": "Slice normal",
     "description": "The axis the opening slice is perpendicular to (0 x, 1 y, 2 z)"
    },
    "pitch": {
     "type": "number",
     "title": "Camera elevation",
     "description": "Elevation of the volume view’s camera when the setup opens, in radians",
     "minimum": -1.5,
     "maximum": 1.5
    }
   },
   "additionalProperties": false
  },
  "featured": {
   "type": "array",
   "items": {
    "anyOf": [
     {
      "type": "string",
      "maxLength": 4000
     },
     {
      "type": "object",
      "properties": {
       "path": {
        "anyOf": [
         {
          "type": "string",
          "maxLength": 4000
         },
         {
          "type": "array",
          "items": {
           "type": "string",
           "maxLength": 4000
          },
          "maxItems": 8
         }
        ]
       },
       "id": {
        "type": "string",
        "maxLength": 4000
       },
       "label": {
        "type": "string",
        "maxLength": 4000
       },
       "tip": {
        "type": "string",
        "maxLength": 4000
       },
       "min": {
        "type": "number"
       },
       "max": {
        "type": "number"
       },
       "step": {
        "type": "number"
       },
       "factor": {
        "type": "number"
       },
       "control": {
        "enum": [
         "number",
         "slider",
         "checkbox"
        ]
       },
       "dims": {
        "enum": [
         2,
         3
        ]
       },
       "unit": {
        "type": "object",
        "properties": {
         "label": {
          "type": "string",
          "maxLength": 4000
         },
         "times": {
          "type": "string",
          "maxLength": 4000
         }
        },
        "additionalProperties": false
       },
       "unitChoices": {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "label": {
           "type": "string",
           "maxLength": 4000
          },
          "value": {
           "type": "number"
          }
         },
         "additionalProperties": false
        },
        "maxItems": 16
       }
      },
      "additionalProperties": false
     }
    ]
   },
   "maxItems": 32
  },
  "parts": {
   "type": "array",
   "maxItems": 256,
   "items": {
    "oneOf": [
     {
      "type": "object",
      "title": "Point mass",
      "properties": {
       "kind": {
        "const": "mass"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "gm": {
        "type": "number",
        "title": "G M",
        "description": "Its mass times G, in code units",
        "minimum": 0
       },
       "pos": {
        "type": "array",
        "items": {
         "type": "number"
        },
        "minItems": 3,
        "maxItems": 3,
        "title": "Position",
        "description": "Where it starts, relative to the box center"
       },
       "vel": {
        "type": "array",
        "items": {
         "type": "number"
        },
        "minItems": 3,
        "maxItems": 3,
        "title": "Velocity",
        "description": "How it moves at the start"
       },
       "soft": {
        "type": "number",
        "title": "Softening",
        "description": "Plummer softening length of its gravity: at least two cells, and two cells if left empty. Changes take effect without a restart",
        "minimum": 0
       },
       "sink": {
        "type": "number",
        "title": "Sink radius",
        "description": "Radius within which it takes gas in: the softening length if left empty, 0 for none. Changes take effect without a restart",
        "minimum": 0
       },
       "sinkRate": {
        "type": "number",
        "title": "Sink rate",
        "description": "Removal rate at the sink’s center, in units of sqrt(G M / radius³)",
        "minimum": 0
       },
       "massless": {
        "type": "boolean",
        "title": "Massless",
        "description": "A particle without a mass of its own: it pulls on nothing and moves as the gas and the masses pull it"
       },
       "fixed": {
        "type": "boolean",
        "title": "Held in place",
        "description": "Nothing moves it, whatever pulls on it or it takes in"
       },
       "onOrbit": {
        "type": "boolean",
        "title": "Hold on its orbit",
        "description": "The other point masses move it; the gas does not: neither the gas’s pull nor what its sink takes changes its motion, and it does not grow. A binary with both masses held keeps the orbit it was given, as in most studies of circumbinary disks. What the sink takes is still counted. Changes take effect without a restart"
       }
      },
      "required": [
       "kind"
      ],
      "additionalProperties": false
     },
     {
      "type": "object",
      "title": "Orbit",
      "properties": {
       "kind": {
        "const": "orbit"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "of": {
        "type": "array",
        "items": {
         "type": "string",
         "maxLength": 4000
        },
        "maxItems": 2,
        "title": "Bodies",
        "description": "The two bodies it places: point masses or stars (binary), a star and a point mass (flyby), or two stars (collision)"
       },
       "type": {
        "enum": [
         "binary",
         "flyby",
         "collision"
        ],
        "title": "Kind of orbit",
        "description": "Binary: two bodies, point masses or stars, about their center of mass, at pericenter; on a circular orbit its stars turn with it and start in the balance of the Roche potential. Flyby: a point mass on a parabola about a star that stays at the origin (a tidal disruption in the star’s frame). Collision: two stars on a parabola about their center of mass"
       },
       "q": {
        "type": "number",
        "title": "Mass ratio",
        "description": "Mass of the second body over the first. It sets their masses: in a binary of two point masses the total stays, in a binary with a star or a flyby the star’s",
        "minimum": 0.000001,
        "maximum": 1000000000
       },
       "separation": {
        "type": "number",
        "title": "Separation",
        "description": "Semi-major axis of the binary’s orbit",
        "minimum": 0.000001
       },
       "ecc": {
        "type": "number",
        "title": "Eccentricity",
        "description": "Eccentricity of the binary’s orbit",
        "minimum": 0,
        "maximum": 0.95
       },
       "incl": {
        "type": "number",
        "title": "Inclination (°)",
        "description": "Tilt of the binary’s orbit about the line through pericenter, in degrees (3D): 180 is retrograde",
        "minimum": 0,
        "maximum": 180
       },
       "retrograde": {
        "type": "boolean",
        "title": "Retrograde",
        "description": "In 2D: the binary orbits clockwise"
       },
       "fill": {
        "type": "number",
        "title": "Roche lobe fill",
        "description": "In place of the separation: the first body, a star, is this many times the size of its Roche lobe (Eggleton 1983), which sets how far apart the two are. 1 just fills it; above 1 it pours gas through L1 onto its companion from the start",
        "minimum": 0.05,
        "maximum": 2
       },
       "corotating": {
        "type": "boolean",
        "title": "Corotating frame",
        "description": "A circular binary: the run is in the frame turning with the orbit, so the bodies start at rest and a binary in balance stays still"
       },
       "track": {
        "type": "boolean",
        "title": "Follow the orbit",
        "description": "With the corotating frame: the frame turns faster or slower as the orbit changes (mass transfer, drag, gas lost through the faces), keeping the line between the two bodies where it started, and the gas and the point masses feel the Euler force of its changing turn. It follows the axis of the stars’ and point masses’ quadrupole, so any two bodies can be followed"
       },
       "beta": {
        "type": "number",
        "title": "Impact parameter β",
        "description": "Tidal radius over pericenter distance: above 1 the mass passes inside the star’s tidal radius",
        "minimum": 0.05,
        "maximum": 20
       },
       "start": {
        "type": "number",
        "title": "Starts at (tidal radii)",
        "description": "Separation at the start, in tidal radii (never inside 1.5 pericenters)",
        "minimum": 1,
        "maximum": 20
       },
       "impact": {
        "type": "number",
        "title": "Impact parameter",
        "description": "Pericenter distance over the sum of the two radii: 0 is head-on, 1 just grazes",
        "minimum": 0,
        "maximum": 5
       },
       "starts": {
        "type": "number",
        "title": "Starts at (sums of radii)",
        "description": "Separation at the start, in sums of the two radii (closer if they would not fit in the box)",
        "minimum": 1.05,
        "maximum": 20
       },
       "debris": {
        "type": "boolean",
        "title": "Debris energies",
        "description": "Bin the star’s gas by its orbital energy about the mass, for the rate at which bound debris returns"
       }
      },
      "required": [
       "kind"
      ],
      "additionalProperties": false
     },
     {
      "type": "object",
      "title": "Star",
      "properties": {
       "kind": {
        "const": "star"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "type": {
        "enum": [
         "polytrope",
         "white-dwarf",
         "planet"
        ],
        "title": "Kind of star",
        "description": "A polytrope of index n, a cold white dwarf held up by degenerate electrons, or a planet of an ANEOS material, with or without a core of another (physical units)"
       },
       "n": {
        "type": "number",
        "title": "Polytropic index n",
        "description": "The star’s structure, p = K ρ^(1 + 1/n): the larger n, the more centrally concentrated. Stable against convection only if the gas’s adiabatic index is at least 1 + 1/n",
        "minimum": 0.5,
        "maximum": 4.5
       },
       "radius": {
        "type": "number",
        "title": "Radius",
        "description": "A polytrope’s radius, in code units. A white dwarf’s follows from its mass",
        "minimum": 1e-12
       },
       "mass": {
        "type": "number",
        "title": "Mass",
        "description": "Its mass, in code units (solar masses for a white dwarf in its usual units)",
        "minimum": 1e-12
       },
       "rhoc": {
        "type": "number",
        "title": "Central density",
        "description": "Instead of the mass: a polytrope’s central density",
        "minimum": 1e-300
       },
       "core": {
        "type": "object",
        "properties": {
         "mass": {
          "type": "number",
          "title": "Core mass",
          "description": "The core’s share of the star’s mass, in code units: less than the star’s",
          "minimum": 1e-12
         },
         "soft": {
          "type": "number",
          "title": "Core softening",
          "description": "Plummer softening length of the core’s gravity: a twentieth of the star’s radius if left empty. At least two finest cells, and the envelope’s steep inner part should span several",
          "minimum": 1e-12
         }
        },
        "additionalProperties": false,
        "title": "Point-mass core",
        "description": "A giant: part of the star’s mass is a point mass at its center, and the rest a polytropic envelope in balance with its own gravity and the core’s softened pull. The core moves with the star and then as the gas and the other masses pull it. By mass and radius only"
       },
       "material": {
        "enum": [
         "pyrolite",
         "fe85si15",
         "water",
         "forsterite"
        ],
        "title": "Material",
        "description": "What a planet is made of; with a core, its mantle. A run holds two materials at most, and they are its species: the mantle’s first"
       },
       "coreMaterial": {
        "enum": [
         "pyrolite",
         "fe85si15",
         "water",
         "forsterite"
        ],
        "title": "Core material",
        "description": "A planet’s core, if it has one: the inner part of its mass, of this material"
       },
       "coreFraction": {
        "type": "number",
        "title": "Core mass fraction",
        "description": "The core’s share of a planet’s mass (the Earth’s is 0.32)",
        "minimum": 0.01,
        "maximum": 0.99
       },
       "surfaceT": {
        "type": "number",
        "title": "Surface temperature (K)",
        "description": "A planet’s temperature at its surface, in kelvin. Each of its layers lies along its adiabat from there: 2000 K is a body still hot from its accretion, as the published giant-impact calculations start",
        "minimum": 50,
        "maximum": 20000
       },
       "pos": {
        "type": "array",
        "items": {
         "type": "number"
        },
        "minItems": 3,
        "maxItems": 3,
        "title": "Position",
        "description": "Where it starts, relative to the box center"
       },
       "vel": {
        "type": "array",
        "items": {
         "type": "number"
        },
        "minItems": 3,
        "maxItems": 3,
        "title": "Velocity",
        "description": "How it moves at the start"
       },
       "dye": {
        "type": "number",
        "title": "Dye",
        "description": "Passive scalar of its gas, which tells the stars apart: spread over (0, 1] by their order if left empty",
        "minimum": 0,
        "maximum": 1
       },
       "X": {
        "type": "object",
        "additionalProperties": {
         "type": "number"
        },
        "title": "Composition",
        "description": "Mass fractions of its gas, by species name (the ambient gas’s if left empty)"
       },
       "field": {
        "type": "object",
        "properties": {
         "type": {
          "enum": [
           "dipole",
           "random",
           "gm17-dipole",
           "gm17-random"
          ],
          "title": "Shape",
          "description": "Dipole or random, by the plasma beta at the center; or Guillochon & McCourt’s, by β_M"
         },
         "beta": {
          "type": "number",
          "title": "Plasma beta",
          "description": "Gas pressure over magnetic pressure B² / 2 at the center (or β_M): the larger, the weaker the field",
          "minimum": 1,
          "maximum": 1000000000000
         },
         "seed": {
          "type": "number",
          "title": "Random seed",
          "description": "Which random field: each seed gives another",
          "minimum": 1,
          "maximum": 9999
         }
        },
        "additionalProperties": false,
        "title": "Magnetic field inside",
        "description": "A field confined to the star: a dipole along z or a tangled Kolmogorov field, with plasma beta at the center; or the same as Guillochon & McCourt (2017) set them, by their β_M"
       }
      },
      "required": [
       "kind"
      ],
      "additionalProperties": false
     },
     {
      "type": "object",
      "title": "Disk",
      "properties": {
       "kind": {
        "const": "disk"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "about": {
        "type": "array",
        "items": {
         "type": "string",
         "maxLength": 4000
        },
        "maxItems": 32,
        "title": "Orbits",
        "description": "The point masses or stars it orbits: about several, their total mass. The disk is centered on their center of mass and moves with it. About a star, keep the inner radius outside 1.3 of the star’s radius: the star is settled within that"
       },
       "profile": {
        "enum": [
         "thin",
         "balanced"
        ],
        "title": "Profile",
        "description": "Thin: a surface density with a cavity and a Gaussian vertical profile, on circular orbits (the binary’s disk). Balanced: a midplane density in vertical balance with the softened potential, rotating as its pressure gradient asks (the magnetized disk); 3D only"
       },
       "radial": {
        "type": "array",
        "items": {
         "type": "array",
         "items": {
          "type": "number"
         },
         "minItems": 2,
         "maxItems": 2
        },
        "maxItems": 32
       },
       "vertical": {
        "type": "array",
        "items": {
         "type": "array",
         "items": {
          "type": "number"
         },
         "minItems": 2,
         "maxItems": 2
        },
        "maxItems": 32
       },
       "radialFn": {
        "type": "string",
        "maxLength": 4000,
        "title": "Radial profile (formula)",
        "description": "A density profile of your own in radius, as a formula of r: the surface density (thin) or the midplane density (balanced). It replaces the density scale’s law, the slope and the tapers. Example: sigma0 * (r / rIn)^-1 * exp(-(r / rOut)^2) * step(r - rIn). Names: r, rIn, rOut, sigma0, cs, H (the scale height cs / Ω at r), pi, e. Functions: exp, log, ln, log10, sqrt, abs, sin, cos, tan, atan, sinh, cosh, tanh, step, pow, min, max, clamp; powers as x^y. Where it is not a positive number there is no disk. A file may give a table of points instead (radial)"
       },
       "verticalFn": {
        "type": "string",
        "maxLength": 4000,
        "title": "Vertical profile (formula)",
        "description": "A density profile of your own in height, as a formula of z, the height above the midplane (the same on both sides), relative to the midplane: it replaces the Gaussian (thin) or the balance with the potential (balanced). Examples: exp(-z^2 / 2), 1 / cosh(z)^2, max(1 - z / 3, 0). Such a disk is in vertical balance only if the profile is, and settles as the run starts. 3D only. A file may give a table of points instead (vertical)"
       },
       "verticalIn": {
        "enum": [
         "H",
         "length"
        ],
        "title": "Heights in",
        "description": "The z of the vertical profile: in scale heights cs / Ω of each radius (the profile then flares with the disk), or in code lengths"
       },
       "rIn": {
        "type": "number",
        "title": "Inner radius",
        "description": "Where the disk is tapered away toward the center (the cavity’s radius)",
        "minimum": 0.000001
       },
       "rOut": {
        "type": "number",
        "title": "Outer radius",
        "description": "Where the disk is tapered away outward",
        "minimum": 0.000001
       },
       "sigma0": {
        "type": "number",
        "title": "Density scale",
        "description": "Thin: the surface density. Balanced: the midplane density at r = 1",
        "minimum": 1e-300
       },
       "slope": {
        "type": "number",
        "title": "Density slope",
        "description": "Balanced: the midplane density goes as r to this power (-3/2 is a flat surface density)",
        "minimum": -4,
        "maximum": 2
       },
       "cs": {
        "type": "number",
        "title": "Sound speed",
        "description": "Sound speed of the disk’s gas: its scale height is cs / Ω",
        "minimum": 0.000001
       },
       "floor": {
        "type": "number",
        "title": "Gas outside the disk",
        "description": "Thin: a fraction of the density scale. Balanced: the density of the ambient gas",
        "minimum": 0
       },
       "damp": {
        "type": "object",
        "properties": {
         "from": {
          "type": "number",
          "title": "Damping from r",
          "description": "Radius from the box center where the damping zone starts",
          "minimum": 0,
          "maximum": 1e+30
         },
         "rate": {
          "type": "number",
          "title": "Damping rate",
          "description": "How many times per local orbital period the gas at the box edge is relaxed toward its initial state. 0 is off",
          "minimum": 0,
          "maximum": 1e+30
         }
        },
        "additionalProperties": false,
        "title": "Damping zone",
        "description": "Beyond a radius the gas is relaxed toward the disk as it started, more strongly toward the box’s edge, so the outer disk is a reservoir and the boundaries see only it"
       },
       "loops": {
        "type": "object",
        "properties": {
         "beta": {
          "type": "number",
          "title": "Plasma beta at the midplane",
          "description": "Gas pressure over magnetic pressure where two loops meet: the larger, the weaker the field",
          "minimum": 1,
          "maximum": 1000000000
         },
         "span": {
          "type": "number",
          "title": "Span of a loop",
          "description": "Each loop spans this factor in radius",
          "minimum": 1.05,
          "maximum": 4
         },
         "count": {
          "type": "integer",
          "title": "Loops",
          "description": "How many loops, outward from the inner radius",
          "minimum": 1,
          "maximum": 16
         }
        },
        "additionalProperties": false,
        "title": "Field loops",
        "description": "Poloidal loops of magnetic field inside the disk, with no net flux: the seed of the magnetorotational instability"
       },
       "stresses": {
        "type": "boolean",
        "title": "Disk diagnostics",
        "description": "Report the disk’s stresses and MRI quality factors about the first point mass"
       }
      },
      "required": [
       "kind"
      ],
      "additionalProperties": false
     },
     {
      "type": "object",
      "title": "Gas region",
      "properties": {
       "kind": {
        "const": "region"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "shape": {
        "type": "object",
        "properties": {
         "type": {
          "enum": [
           "sphere",
           "box",
           "half"
          ],
          "title": "Shape",
          "description": "A sphere (a cylinder in 2D), a box, or the half of space on one side of a plane"
         },
         "center": {
          "type": "array",
          "items": {
           "type": "number"
          },
          "minItems": 3,
          "maxItems": 3,
          "title": "Center",
          "description": "Center of the sphere"
         },
         "radius": {
          "type": "number",
          "title": "Radius",
          "description": "Radius of the sphere",
          "minimum": 0
         },
         "radiusCells": {
          "type": "number",
          "title": "Radius in cells",
          "description": "Instead of the radius: this many finest cells, whatever the resolution (a point explosion)",
          "minimum": 0.5,
          "maximum": 64
         },
         "min": {
          "type": "array",
          "items": {
           "anyOf": [
            {
             "type": "null"
            },
            {
             "type": "number"
            }
           ]
          },
          "maxItems": 3,
          "title": "Lower corner",
          "description": "Corner of the box nearest -x, -y, -z"
         },
         "max": {
          "type": "array",
          "items": {
           "anyOf": [
            {
             "type": "null"
            },
            {
             "type": "number"
            }
           ]
          },
          "maxItems": 3,
          "title": "Upper corner",
          "description": "Corner of the box nearest +x, +y, +z"
         },
         "normal": {
          "type": "array",
          "items": {
           "type": "number"
          },
          "minItems": 3,
          "maxItems": 3,
          "title": "Normal",
          "description": "The plane’s normal: the shape is the side the normal points away from"
         },
         "at": {
          "type": "number",
          "title": "Plane at",
          "description": "Distance of the plane from the box center, along its normal"
         },
         "rotate": {
          "type": "array",
          "items": {
           "type": "number"
          },
          "minItems": 3,
          "maxItems": 3,
          "title": "Rotation",
          "description": "Degrees the box is turned about its center: about x, then y, then z. In 2D only the turn about z counts"
         }
        },
        "additionalProperties": false
       },
       "rho": {
        "type": "number",
        "title": "Density",
        "description": "Density inside the shape",
        "minimum": 1e-300
       },
       "p": {
        "type": "number",
        "title": "Pressure",
        "description": "Pressure inside the shape",
        "minimum": 0
       },
       "energy": {
        "type": "number",
        "title": "Total energy",
        "description": "Instead of a pressure: this much energy in all, spread evenly over the sphere’s cells (a point explosion; per unit length in 2D)",
        "minimum": 0
       },
       "v": {
        "type": "array",
        "items": {
         "type": "number"
        },
        "minItems": 3,
        "maxItems": 3,
        "title": "Velocity",
        "description": "Velocity inside the shape"
       },
       "s": {
        "type": "number",
        "title": "Dye",
        "description": "Passive scalar inside the shape",
        "minimum": 0,
        "maximum": 1
       },
       "X": {
        "type": "object",
        "additionalProperties": {
         "type": "number"
        },
        "title": "Composition",
        "description": "Mass fractions inside the shape, by species name"
       },
       "erad": {
        "type": "number",
        "title": "Radiation energy",
        "description": "With radiation transport: the radiation’s energy density inside the shape. Empty: that in equilibrium with the gas, a T⁴",
        "minimum": 0
       },
       "frad": {
        "type": "array",
        "items": {
         "type": "number"
        },
        "minItems": 3,
        "maxItems": 3,
        "title": "Radiation flux",
        "description": "With radiation transport: the radiation’s flux inside the shape, at most c times its energy (a beam). Empty: the flux of diffusion. With an inflow over the same shape, a lamp that shines for the whole run"
       },
       "supersample": {
        "type": "integer",
        "title": "Smooth edge (samples)",
        "description": "A sphere’s edge cells take the share of their volume inside it, from this many samples a side. Empty: a sharp edge",
        "minimum": 2,
        "maximum": 8
       }
      },
      "required": [
       "kind"
      ],
      "additionalProperties": false
     },
     {
      "type": "object",
      "title": "Obstacle",
      "properties": {
       "kind": {
        "const": "obstacle"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "shape": {
        "type": "object",
        "properties": {
         "type": {
          "enum": [
           "sphere",
           "box",
           "half"
          ],
          "title": "Shape",
          "description": "A sphere (a cylinder in 2D), a box, or the half of space on one side of a plane"
         },
         "center": {
          "type": "array",
          "items": {
           "type": "number"
          },
          "minItems": 3,
          "maxItems": 3,
          "title": "Center",
          "description": "Center of the sphere"
         },
         "radius": {
          "type": "number",
          "title": "Radius",
          "description": "Radius of the sphere",
          "minimum": 0
         },
         "radiusCells": {
          "type": "number",
          "title": "Radius in cells",
          "description": "Instead of the radius: this many finest cells, whatever the resolution (a point explosion)",
          "minimum": 0.5,
          "maximum": 64
         },
         "min": {
          "type": "array",
          "items": {
           "anyOf": [
            {
             "type": "null"
            },
            {
             "type": "number"
            }
           ]
          },
          "maxItems": 3,
          "title": "Lower corner",
          "description": "Corner of the box nearest -x, -y, -z"
         },
         "max": {
          "type": "array",
          "items": {
           "anyOf": [
            {
             "type": "null"
            },
            {
             "type": "number"
            }
           ]
          },
          "maxItems": 3,
          "title": "Upper corner",
          "description": "Corner of the box nearest +x, +y, +z"
         },
         "normal": {
          "type": "array",
          "items": {
           "type": "number"
          },
          "minItems": 3,
          "maxItems": 3,
          "title": "Normal",
          "description": "The plane’s normal: the shape is the side the normal points away from"
         },
         "at": {
          "type": "number",
          "title": "Plane at",
          "description": "Distance of the plane from the box center, along its normal"
         },
         "rotate": {
          "type": "array",
          "items": {
           "type": "number"
          },
          "minItems": 3,
          "maxItems": 3,
          "title": "Rotation",
          "description": "Degrees the box is turned about its center: about x, then y, then z. In 2D only the turn about z counts"
         }
        },
        "additionalProperties": false
       }
      },
      "required": [
       "kind"
      ],
      "additionalProperties": false
     },
     {
      "type": "object",
      "title": "Inflow",
      "properties": {
       "kind": {
        "const": "inflow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "shape": {
        "type": "object",
        "properties": {
         "type": {
          "enum": [
           "sphere",
           "box",
           "half"
          ],
          "title": "Shape",
          "description": "A sphere (a cylinder in 2D), a box, or the half of space on one side of a plane"
         },
         "center": {
          "type": "array",
          "items": {
           "type": "number"
          },
          "minItems": 3,
          "maxItems": 3,
          "title": "Center",
          "description": "Center of the sphere"
         },
         "radius": {
          "type": "number",
          "title": "Radius",
          "description": "Radius of the sphere",
          "minimum": 0
         },
         "radiusCells": {
          "type": "number",
          "title": "Radius in cells",
          "description": "Instead of the radius: this many finest cells, whatever the resolution (a point explosion)",
          "minimum": 0.5,
          "maximum": 64
         },
         "min": {
          "type": "array",
          "items": {
           "anyOf": [
            {
             "type": "null"
            },
            {
             "type": "number"
            }
           ]
          },
          "maxItems": 3,
          "title": "Lower corner",
          "description": "Corner of the box nearest -x, -y, -z"
         },
         "max": {
          "type": "array",
          "items": {
           "anyOf": [
            {
             "type": "null"
            },
            {
             "type": "number"
            }
           ]
          },
          "maxItems": 3,
          "title": "Upper corner",
          "description": "Corner of the box nearest +x, +y, +z"
         },
         "normal": {
          "type": "array",
          "items": {
           "type": "number"
          },
          "minItems": 3,
          "maxItems": 3,
          "title": "Normal",
          "description": "The plane’s normal: the shape is the side the normal points away from"
         },
         "at": {
          "type": "number",
          "title": "Plane at",
          "description": "Distance of the plane from the box center, along its normal"
         },
         "rotate": {
          "type": "array",
          "items": {
           "type": "number"
          },
          "minItems": 3,
          "maxItems": 3,
          "title": "Rotation",
          "description": "Degrees the box is turned about its center: about x, then y, then z. In 2D only the turn about z counts"
         }
        },
        "additionalProperties": false
       }
      },
      "required": [
       "kind"
      ],
      "additionalProperties": false
     },
     {
      "type": "object",
      "title": "Uniform magnetic field",
      "properties": {
       "kind": {
        "const": "field"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "b": {
        "type": "array",
        "items": {
         "type": "number"
        },
        "minItems": 3,
        "maxItems": 3,
        "title": "Field",
        "description": "The field’s vector"
       },
       "up": {
        "type": "number",
        "title": "Strength, upward",
        "description": "Instead of a vector: a strength along the axis drawn upward (y in 2D, z in 3D)"
       }
      },
      "required": [
       "kind"
      ],
      "additionalProperties": false
     },
     {
      "type": "object",
      "title": "Flow: Advected Gaussian blob",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "advection"
       },
       "rho0": {
        "type": "number",
        "title": "Density around the blob",
        "default": 1.5,
        "minimum": 0.000001,
        "maximum": 1000000
       },
       "amp": {
        "type": "number",
        "title": "Blob height",
        "default": 1,
        "minimum": 0,
        "maximum": 1000000
       },
       "width": {
        "type": "number",
        "title": "Blob width",
        "default": 0.1,
        "minimum": 0.01,
        "maximum": 1
       },
       "vx": {
        "type": "number",
        "title": "Velocity x",
        "default": 1,
        "minimum": -100,
        "maximum": 100
       },
       "vy": {
        "type": "number",
        "title": "Velocity y",
        "default": 0.5,
        "minimum": -100,
        "maximum": 100
       },
       "vz": {
        "type": "number",
        "title": "Velocity z",
        "default": 0.25,
        "minimum": -100,
        "maximum": 100
       },
       "p": {
        "type": "number",
        "title": "Pressure",
        "default": 1,
        "minimum": 0.000001,
        "maximum": 1000000
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "A Gaussian density blob at the center, carried by a uniform flow at a uniform pressure. The passive scalar follows the blob. On a periodic box it tests conservation."
     },
     {
      "type": "object",
      "title": "Flow: Alfven-wave collision",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "alfven-collision"
       },
       "b0": {
        "type": "number",
        "title": "Guide field",
        "default": 1,
        "minimum": 0.01,
        "maximum": 100
       },
       "amp": {
        "type": "number",
        "title": "Wave amplitude",
        "default": 0.25,
        "minimum": 0,
        "maximum": 2
       },
       "beta": {
        "type": "number",
        "title": "Plasma beta",
        "default": 10,
        "minimum": 0.01,
        "maximum": 1000
       },
       "kperp": {
        "type": "number",
        "title": "Waves across the field",
        "default": 1,
        "minimum": 1,
        "maximum": 16
       },
       "kpar": {
        "type": "number",
        "title": "Waves along the field",
        "default": 1,
        "minimum": 1,
        "maximum": 16
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "Two plane Alfven waves travelling in opposite directions along a guide field B0 (along z), in uniform gas of density 1: one varies along x and is polarized along y, the other varies along y and is polarized along x (Howes & Nielson 2013). Needs a 3D periodic box."
     },
     {
      "type": "object",
      "title": "Flow: Elsasser packets",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "alfven-packets"
       },
       "b0": {
        "type": "number",
        "title": "Guide field",
        "default": 1,
        "minimum": 0.01,
        "maximum": 100
       },
       "amp": {
        "type": "number",
        "title": "Wave amplitude",
        "default": 0.25,
        "minimum": 0,
        "maximum": 2
       },
       "beta": {
        "type": "number",
        "title": "Plasma beta",
        "default": 10,
        "minimum": 0.01,
        "maximum": 1000
       },
       "kperp": {
        "type": "number",
        "title": "Waves across the field",
        "default": 1,
        "minimum": 1,
        "maximum": 16
       },
       "kpar": {
        "type": "number",
        "title": "Wavelengths in a packet",
        "default": 0,
        "minimum": 0,
        "maximum": 8
       },
       "width": {
        "type": "number",
        "title": "Packet width",
        "default": 0.08,
        "minimum": 0.02,
        "maximum": 0.25
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "Two Alfven-wave packets on a guide field B0 (along z), each with a Gaussian profile along the field: a z+ packet above the center heading down and a z- packet below it heading up, in uniform gas of density 1 (Verniero et al. 2018). They meet at the center at t = box / (4 B0). Needs a 3D periodic box."
     },
     {
      "type": "object",
      "title": "Flow: Carbon–oxygen fuel with an ignition layer",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "co-ignition"
       },
       "logrho": {
        "type": "number",
        "title": "Density (log₁₀ g/cm³)",
        "default": 7,
        "minimum": 6,
        "maximum": 9.5
       },
       "carbon": {
        "type": "number",
        "title": "Carbon fraction",
        "default": 0.5,
        "minimum": 0.2,
        "maximum": 0.8
       },
       "tfuel": {
        "type": "number",
        "title": "Fuel temperature (10⁸ K)",
        "default": 0.5,
        "minimum": 0.1,
        "maximum": 5
       },
       "tign": {
        "type": "number",
        "title": "Ignition temperature (10⁹ K)",
        "default": 4,
        "minimum": 2,
        "maximum": 8
       },
       "width": {
        "type": "number",
        "title": "Ignition layer (km)",
        "default": 30,
        "minimum": 5,
        "maximum": 200
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "Carbon and oxygen at rest at one density, with a hot layer at the low-x edge of the box that sets it alight. Needs physical units, an equation of state with a temperature (Helmholtz) and the species of the aprox13 network."
     },
     {
      "type": "object",
      "title": "Flow: ZND detonation",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "znd-detonation"
       },
       "ea": {
        "type": "number",
        "title": "Activation temperature Ea",
        "default": 25,
        "minimum": 5,
        "maximum": 50
       },
       "overdrive": {
        "type": "number",
        "title": "Overdrive (D / D_CJ)²",
        "default": 1,
        "minimum": 1,
        "maximum": 2
       },
       "shockburn": {
        "type": "boolean",
        "title": "Burn inside shocks",
        "default": true
       },
       "frontFrame": {
        "type": "boolean",
        "title": "Frame of the front",
        "default": false
       },
       "pocket": {
        "type": "boolean",
        "title": "Pocket of unburned gas",
        "default": false
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "The steady (ZND) detonation of the single-step Arrhenius model, moving toward +x into fuel of density 1 and pressure 1 (for gamma = 1.2; heat release 50), with its burning. Lengths are half-reaction lengths. Needs the species fuel and ash."
     },
     {
      "type": "object",
      "title": "Flow: Evrard sphere",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "evrard"
       },
       "mass": {
        "type": "number",
        "title": "Mass",
        "default": 1,
        "minimum": 0.000001,
        "maximum": 1000000
       },
       "radius": {
        "type": "number",
        "title": "Radius",
        "default": 1,
        "minimum": 0.05,
        "maximum": 1000
       },
       "u": {
        "type": "number",
        "title": "Specific internal energy",
        "default": 0.05,
        "minimum": 0,
        "maximum": 100
       },
       "rhoAmb": {
        "type": "number",
        "title": "Density outside",
        "default": 0.0001,
        "minimum": 1e-12,
        "maximum": 1
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "A cold gas sphere whose density falls as 1/r, rho = M / (2 pi R^2 r), in thin gas at the same specific internal energy (for gamma = 5/3). With G = M = R = 1 it collapses in about a unit of time."
     },
     {
      "type": "object",
      "title": "Flow: First core (protostellar)",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "first-core"
       },
       "logrhoc": {
        "type": "number",
        "title": "Central density (log₁₀ g/cm³)",
        "default": -7.75,
        "minimum": -11,
        "maximum": -6
       },
       "tad": {
        "type": "number",
        "title": "Adiabat (K at 10⁻¹³ g/cm³)",
        "default": 10,
        "minimum": 3,
        "maximum": 100
       },
       "deficit": {
        "type": "number",
        "title": "Pressure deficit",
        "default": 0.05,
        "minimum": 0,
        "maximum": 0.5
       },
       "logamb": {
        "type": "number",
        "title": "Density outside (log₁₀ g/cm³)",
        "default": -13,
        "minimum": -16,
        "maximum": -11
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "A first hydrostatic core of protostellar collapse at the middle of the box: molecular gas on one adiabat, in balance with its own gravity, in thin gas at its surface pressure. Past a central density of 3e-9 g/cm^3 its center is above 2000 K, where H2 dissociates, and it collapses. Needs physical units and an equation of state with a temperature (hydrogen and helium)."
     },
     {
      "type": "object",
      "title": "Flow: Helium shell with a hot spot",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "helium-shell-ignition"
       },
       "mhe": {
        "type": "number",
        "title": "Helium shell (M☉)",
        "default": 0.05,
        "minimum": 0.005,
        "maximum": 0.15
       },
       "tign": {
        "type": "number",
        "title": "Ignition temperature (10⁹ K)",
        "default": 3,
        "minimum": 1,
        "maximum": 6
       },
       "spot": {
        "type": "number",
        "title": "Hot spot radius (km)",
        "default": 300,
        "minimum": 50,
        "maximum": 1000
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "Turns the outermost mass of the first star into helium over a carbon-oxygen core and heats a spot at the base of that shell, on the +z axis. Needs the 13 species of the burning network, the tabulated equation of state and physical units."
     },
     {
      "type": "object",
      "title": "Flow: Turbulent velocity field",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "isothermal-collapse"
       },
       "rho": {
        "type": "number",
        "title": "Density",
        "default": 1,
        "minimum": 0.000001,
        "maximum": 1000000
       },
       "p": {
        "type": "number",
        "title": "Pressure",
        "default": 0.01,
        "minimum": 1e-12,
        "maximum": 1000000
       },
       "vrms": {
        "type": "number",
        "title": "Rms speed",
        "default": 0.5,
        "minimum": 0,
        "maximum": 100
       },
       "modes": {
        "type": "number",
        "title": "Velocity modes",
        "default": 12,
        "minimum": 1,
        "maximum": 64
       },
       "seed": {
        "type": "number",
        "title": "Random seed",
        "default": 12345,
        "minimum": 1,
        "maximum": 4294967295
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "Uniform gas in a unit periodic box, stirred by a few long-wavelength velocity modes with random directions and phases. With the preset’s isothermal gas (sound speed 0.1) the default speed is Mach 5."
     },
     {
      "type": "object",
      "title": "Flow: Jeans-unstable wave",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "jeans"
       },
       "amp": {
        "type": "number",
        "title": "Amplitude",
        "default": 0.001,
        "minimum": 0.000001,
        "maximum": 0.5
       },
       "modes": {
        "type": "number",
        "title": "Wavelengths across",
        "default": 1,
        "minimum": 1,
        "maximum": 32
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "A small adiabatic density wave along x about density 1 and sound speed 1. With one wavelength across a unit box and G = 2 pi it grows at the rate 2 pi; a shorter wave grows more slowly, or oscillates as sound once k^2 passes 4 pi G."
     },
     {
      "type": "object",
      "title": "Flow: Kelvin-Helmholtz shear layer",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "kelvin-helmholtz"
       },
       "helium": {
        "type": "boolean",
        "title": "Helium slab in hydrogen",
        "default": false
       },
       "rhoIn": {
        "type": "number",
        "title": "Slab density",
        "default": 2,
        "minimum": 0.000001,
        "maximum": 1000000
       },
       "rhoOut": {
        "type": "number",
        "title": "Density outside",
        "default": 1,
        "minimum": 0.000001,
        "maximum": 1000000
       },
       "shear": {
        "type": "number",
        "title": "Shear speed",
        "default": 1,
        "minimum": 0,
        "maximum": 100
       },
       "p": {
        "type": "number",
        "title": "Pressure",
        "default": 2.5,
        "minimum": 0.000001,
        "maximum": 1000000
       },
       "width": {
        "type": "number",
        "title": "Slab thickness",
        "default": 0.5,
        "minimum": 0.05,
        "maximum": 0.9
       },
       "amp": {
        "type": "number",
        "title": "Kick amplitude",
        "default": 0.1,
        "minimum": 0,
        "maximum": 1
       },
       "modes": {
        "type": "number",
        "title": "Wavelengths across",
        "default": 2,
        "minimum": 1,
        "maximum": 32
       },
       "sigma": {
        "type": "number",
        "title": "Kick width",
        "default": 0.035,
        "minimum": 0.005,
        "maximum": 0.2
       },
       "zmod": {
        "type": "number",
        "title": "Variation along z",
        "default": 0.2,
        "minimum": 0,
        "maximum": 1
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "A dense slab across the middle of the box (in y), sliding through lighter gas at one pressure, with one seeded mode at its two edges. With helium, the slab is helium in hydrogen (species he4 and h1, which then set the equation of state), denser by the ratio of their mean molecular weights."
     },
     {
      "type": "object",
      "title": "Flow: Gresho vortex",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "gresho"
       },
       "mach": {
        "type": "number",
        "title": "Mach number",
        "default": 0.1,
        "minimum": 0.0001,
        "maximum": 1
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "A steady vortex (Gresho & Chan 1990): the gas turns rigidly out to a fifth of the box, slows to rest by two fifths, and the pressure balances the centrifugal force. Nothing should change; what does is the solver’s own dissipation. In 3D it is a column along z."
     },
     {
      "type": "object",
      "title": "Flow: Taylor-Green vortex",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "taylor-green"
       },
       "mach": {
        "type": "number",
        "title": "Mach number",
        "default": 0.1,
        "minimum": 0.0001,
        "maximum": 1
       },
       "modes": {
        "type": "number",
        "title": "Wavelengths across",
        "default": 1,
        "minimum": 1,
        "maximum": 16
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "An array of counter-rotating vortices. In 2D with viscosity it keeps its shape and decays as exp(-2 ν k² t), an exact solution of the incompressible equations; in 3D the same start, varying along z, breaks down into turbulence."
     },
     {
      "type": "object",
      "title": "Flow: Double shear layer",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "shear-layers"
       },
       "mach": {
        "type": "number",
        "title": "Mach number",
        "default": 0.1,
        "minimum": 0.0001,
        "maximum": 1
       },
       "sharp": {
        "type": "number",
        "title": "Layer sharpness",
        "default": 30,
        "minimum": 5,
        "maximum": 400
       },
       "kick": {
        "type": "number",
        "title": "Kick amplitude",
        "default": 0.05,
        "minimum": 0,
        "maximum": 0.5
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "Two shear layers in a doubly periodic box, the band between them moving at +1 and the rest at -1, with a small sideways kick (Bell, Colella & Glaz 1989): each layer rolls up into one vortex. Under-resolved, a scheme grows spurious vortices along the thin braids between them."
     },
     {
      "type": "object",
      "title": "Flow: Orszag-Tang vortex",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "orszag-tang"
       },
       "v0": {
        "type": "number",
        "title": "Velocity amplitude",
        "default": 1,
        "minimum": 0,
        "maximum": 100
       },
       "b0": {
        "type": "number",
        "title": "Field amplitude",
        "default": 1,
        "minimum": 0,
        "maximum": 100
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "The Orszag-Tang vortex on a periodic unit box (for gamma = 5/3): uniform gas of density 25 / 36 pi and pressure 5 / 12 pi (sound speed 1) with a velocity vortex and a field of twice its wavenumber in x."
     },
     {
      "type": "object",
      "title": "Flow: Rotor",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "mhd-rotor"
       },
       "rho": {
        "type": "number",
        "title": "Disk density",
        "default": 10,
        "minimum": 1,
        "maximum": 10000
       },
       "v0": {
        "type": "number",
        "title": "Rim speed",
        "default": 2,
        "minimum": 0,
        "maximum": 100
       },
       "r0": {
        "type": "number",
        "title": "Disk radius",
        "default": 0.1,
        "minimum": 0.01,
        "maximum": 0.45
       },
       "r1": {
        "type": "number",
        "title": "Outer radius of the ring",
        "default": 0.115,
        "minimum": 0.011,
        "maximum": 0.5
       },
       "p": {
        "type": "number",
        "title": "Pressure",
        "default": 1,
        "minimum": 0.000001,
        "maximum": 1000000
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "A dense disk spinning rigidly in gas of density 1 at rest, at one pressure, with a ring around it where density and speed taper (Balsara & Spicer 1999). The field is a part of its own."
     },
     {
      "type": "object",
      "title": "Flow: Brio-Wu shock tube",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "brio-wu"
       },
       "rhoL": {
        "type": "number",
        "title": "Density, left",
        "default": 1,
        "minimum": 0.000001,
        "maximum": 1000000
       },
       "pL": {
        "type": "number",
        "title": "Pressure, left",
        "default": 1,
        "minimum": 0.000001,
        "maximum": 1000000
       },
       "rhoR": {
        "type": "number",
        "title": "Density, right",
        "default": 0.125,
        "minimum": 0.000001,
        "maximum": 1000000
       },
       "pR": {
        "type": "number",
        "title": "Pressure, right",
        "default": 0.1,
        "minimum": 0.000001,
        "maximum": 1000000
       },
       "bx": {
        "type": "number",
        "title": "Field along the tube",
        "default": 0.75,
        "minimum": -100,
        "maximum": 100
       },
       "by": {
        "type": "number",
        "title": "Field across the tube",
        "default": 1,
        "minimum": 0,
        "maximum": 100
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "The MHD shock tube of Brio & Wu (1988) along x (for gamma = 2): gas at rest in two states either side of a membrane at the center, a field B_x throughout and B_y reversing across the membrane."
     },
     {
      "type": "object",
      "title": "Flow: Field loop advection",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "field-loop"
       },
       "dense": {
        "type": "boolean",
        "title": "Dense loop",
        "default": false
       },
       "rhoIn": {
        "type": "number",
        "title": "Density of a dense loop",
        "default": 2,
        "minimum": 1,
        "maximum": 1000
       },
       "radius": {
        "type": "number",
        "title": "Loop radius",
        "default": 0.3,
        "minimum": 0.02,
        "maximum": 0.5
       },
       "a0": {
        "type": "number",
        "title": "Field strength",
        "default": 0.001,
        "minimum": 0,
        "maximum": 10
       },
       "vx": {
        "type": "number",
        "title": "Velocity x",
        "default": 2,
        "minimum": -100,
        "maximum": 100
       },
       "vy": {
        "type": "number",
        "title": "Velocity y",
        "default": 1,
        "minimum": -100,
        "maximum": 100
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "A weak loop of magnetic field, A_z = A0 (R - r) inside radius R, in gas of density 1 and pressure 1 carried by a uniform flow: at (2, 1) on a periodic unit box it is back where it started at t = 1 (Gardiner & Stone 2005)."
     },
     {
      "type": "object",
      "title": "Flow: Circularly polarized Alfven wave",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "alfven-wave"
       },
       "amp": {
        "type": "number",
        "title": "Amplitude",
        "default": 0.1,
        "minimum": 0,
        "maximum": 2
       },
       "p": {
        "type": "number",
        "title": "Pressure",
        "default": 0.1,
        "minimum": 0.000001,
        "maximum": 1000000
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "A circularly polarized Alfven wave along the diagonal of the x-y plane of a periodic unit box: density 1, a field of 1 along the wave, and a perpendicular field and velocity that turn about it (Toth 2000). It returns to its start after each period, 1 / sqrt(2)."
     },
     {
      "type": "object",
      "title": "Flow: Weak in-plane field",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "seed-field"
       },
       "amp": {
        "type": "number",
        "title": "Field strength",
        "default": 0.01,
        "minimum": 0,
        "maximum": 10
       },
       "kMax": {
        "type": "number",
        "title": "Largest wavenumber",
        "default": 3,
        "minimum": 1,
        "maximum": 8
       },
       "seed": {
        "type": "number",
        "title": "Seed",
        "default": 1,
        "minimum": 0,
        "maximum": 1000000
       },
       "in3d": {
        "type": "boolean",
        "title": "Also in 3D",
        "default": false
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "A weak tangled magnetic field in the x-y plane (random modes of the periodic box, from a vector potential A_z), for the flow to stretch and wind up. It adds to the other parts’ fields and leaves the gas as they paint it."
     },
     {
      "type": "object",
      "title": "Flow: Rayleigh-Taylor layers",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "rayleigh-taylor"
       },
       "rhoTop": {
        "type": "number",
        "title": "Density above",
        "default": 2,
        "minimum": 0.000001,
        "maximum": 1000000
       },
       "rhoBottom": {
        "type": "number",
        "title": "Density below",
        "default": 1,
        "minimum": 0.000001,
        "maximum": 1000000
       },
       "p0": {
        "type": "number",
        "title": "Pressure at the interface",
        "default": 2.5,
        "minimum": 0.000001,
        "maximum": 1000000
       },
       "amp": {
        "type": "number",
        "title": "Kick amplitude",
        "default": 0.05,
        "minimum": 0,
        "maximum": 1
       },
       "modes": {
        "type": "number",
        "title": "Wavelengths across",
        "default": 2,
        "minimum": 1,
        "maximum": 32
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "Heavy gas over light gas in a unit box, in hydrostatic balance with the uniform downward acceleration of the setup (Gravity: Uniform acceleration), with one seeded mode that vanishes at the walls. Up is y in 2D and z in 3D."
     },
     {
      "type": "object",
      "title": "Flow: Harris current sheet",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "harris-sheet"
       },
       "b0": {
        "type": "number",
        "title": "Field strength",
        "default": 1,
        "minimum": 0.01,
        "maximum": 100
       },
       "width": {
        "type": "number",
        "title": "Sheet half-width",
        "default": 0.05,
        "minimum": 0.005,
        "maximum": 0.2
       },
       "beta": {
        "type": "number",
        "title": "Plasma beta outside",
        "default": 1,
        "minimum": 0.01,
        "maximum": 100
       },
       "guide": {
        "type": "number",
        "title": "Guide field",
        "default": 0,
        "minimum": 0,
        "maximum": 100
       },
       "psi": {
        "type": "number",
        "title": "Perturbation",
        "default": 0.0001,
        "minimum": 0,
        "maximum": 0.1
       },
       "modes": {
        "type": "number",
        "title": "Wavelengths across",
        "default": 1,
        "minimum": 1,
        "maximum": 16
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "A current sheet along y = 0: B_x = B0 tanh(y / a), with the gas pressure higher in the sheet so that p + B² / 2 is uniform, density 1, an optional uniform guide field B_z, and a perturbation A_z = psi B0 L cos(k x) cos(pi y / L) that seeds the tearing mode (Harris 1962; Furth, Killeen & Rosenbluth 1963). Periodic along x, walls along y."
     },
     {
      "type": "object",
      "title": "Flow: Island coalescence",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "island-coalescence"
       },
       "b0": {
        "type": "number",
        "title": "Field strength",
        "default": 1,
        "minimum": 0.01,
        "maximum": 100
       },
       "eps": {
        "type": "number",
        "title": "Island size",
        "default": 0.2,
        "minimum": 0.01,
        "maximum": 0.9
       },
       "islands": {
        "type": "number",
        "title": "Islands across",
        "default": 2,
        "minimum": 2,
        "maximum": 16
       },
       "beta": {
        "type": "number",
        "title": "Plasma beta outside",
        "default": 0.4,
        "minimum": 0.01,
        "maximum": 100
       },
       "kick": {
        "type": "number",
        "title": "Push",
        "default": 0.1,
        "minimum": 0,
        "maximum": 1
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "A chain of magnetic islands along y = 0, the Fadeev equilibrium A_z = -lambda B0 ln(cosh(y / lambda) + eps cos(x / lambda)), with the gas pressure p = p_out + B0² (1 - eps²) / (2 (cosh(y / lambda) + eps cos(x / lambda))²) that holds it, density 1, and a flow along x that pushes pairs of islands together (Fadeev et al. 1965; Finn & Kaw 1977). Periodic along x, walls along y."
     },
     {
      "type": "object",
      "title": "Flow: Stressed X-point",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "x-point"
       },
       "b0": {
        "type": "number",
        "title": "Field strength",
        "default": 1,
        "minimum": 0.01,
        "maximum": 100
       },
       "alpha": {
        "type": "number",
        "title": "Stress",
        "default": 1.2,
        "minimum": 0.5,
        "maximum": 3
       },
       "p": {
        "type": "number",
        "title": "Pressure",
        "default": 0.05,
        "minimum": 0.0001,
        "maximum": 100
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "An X-type magnetic null at the center, A_z = (B0 / 2L) (y² - alpha² x²) with L the box side, so B = (B0 / L) (y, alpha² x), in gas of density 1 and uniform pressure. With alpha above 1 it carries a current its own force cannot hold, and collapses into a current sheet. Needs walls that hold the field lines crossing them: line-tied on all four sides."
     },
     {
      "type": "object",
      "title": "Flow: Shearing wave",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "shearing-wave"
       },
       "amplitude": {
        "type": "number",
        "title": "Amplitude",
        "default": 0.01,
        "minimum": 0,
        "maximum": 0.5
       },
       "kx": {
        "type": "number",
        "title": "Wavenumber along x",
        "default": -2,
        "minimum": -32,
        "maximum": 32
       },
       "ky": {
        "type": "number",
        "title": "Wavenumber along y",
        "default": 1,
        "minimum": -32,
        "maximum": 32
       },
       "pressure": {
        "type": "number",
        "title": "Pressure",
        "default": 0.01,
        "minimum": 1e-8,
        "maximum": 100
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "The background flow of a shearing sheet, v_y = -q Omega x, with a small density wave cos(kx x + ky y) on it (kx and ky in wavelengths across the box). A leading wave (kx < 0) is swung to trailing by the shear and amplified on the way. Needs physics.shear."
     },
     {
      "type": "object",
      "title": "Flow: Shearing box",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "shearing-noise"
       },
       "noise": {
        "type": "number",
        "title": "Velocity noise",
        "default": 0.001,
        "minimum": 0,
        "maximum": 0.5
       },
       "pressure": {
        "type": "number",
        "title": "Pressure",
        "default": 0.6,
        "minimum": 1e-8,
        "maximum": 100
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "The background flow of a shearing box, v_y = -q Omega x, in gas of uniform density 1 and pressure, with small random velocities on it (a fraction of the sound speed) to seed instabilities such as the magnetorotational. Needs physics.shear."
     },
     {
      "type": "object",
      "title": "Flow: Shock hitting a helium bubble",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "shock-bubble"
       },
       "mach": {
        "type": "number",
        "title": "Shock Mach number",
        "default": 1.22,
        "minimum": 1.01,
        "maximum": 5
       },
       "xhe": {
        "type": "number",
        "title": "Helium in the bubble",
        "default": 0.72,
        "minimum": 0,
        "maximum": 1
       },
       "radius": {
        "type": "number",
        "title": "Bubble radius",
        "default": 0.15,
        "minimum": 0.05,
        "maximum": 0.2
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "A planar shock in air (density 1, pressure 1, gamma 1.4) running toward +x into a bubble of helium at the same pressure and temperature, after Haas & Sturtevant (1987). Needs the species he4 and air, in that order, each with its own gamma."
     },
     {
      "type": "object",
      "title": "Flow: Gas in unstable thermal balance",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "thermal-instability"
       },
       "n0": {
        "type": "number",
        "title": "Mean density (cm⁻³)",
        "default": 2,
        "minimum": 1,
        "maximum": 8
       },
       "amp": {
        "type": "number",
        "title": "Perturbation",
        "default": 0.02,
        "minimum": 0.001,
        "maximum": 0.3
       },
       "kMax": {
        "type": "number",
        "title": "Smallest wavelength",
        "default": 8,
        "minimum": 1,
        "maximum": 64
       },
       "seed": {
        "type": "number",
        "title": "Random seed",
        "default": 20021,
        "minimum": 1,
        "maximum": 4294967295
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "Uniform gas at the temperature where interstellar cooling balances heating on the unstable branch, with small random density perturbations at one pressure. Density in atoms per cm^3, temperature in units of 1000 K: needs the interstellar cooling, in those units."
     },
     {
      "type": "object",
      "title": "Flow: Zel’dovich pancake",
      "properties": {
       "kind": {
        "const": "flow"
       },
       "id": {
        "type": "string",
        "description": "A name other parts refer to it by (an orbit’s `of`, a disk’s `about`)"
       },
       "name": {
        "const": "zeldovich"
       },
       "zCaustic": {
        "type": "number",
        "title": "Caustic redshift",
        "default": 1,
        "minimum": 0,
        "maximum": 1000
       },
       "temperature": {
        "type": "number",
        "title": "Specific internal energy",
        "default": 1e-10,
        "minimum": 0,
        "maximum": 1
       }
      },
      "required": [
       "kind",
       "name"
      ],
      "additionalProperties": false,
      "description": "One plane wave along x on its growing mode in an Einstein-de Sitter universe (physics.cosmology with Omega_m = 1): the gas converges into a sheet, a caustic, at the given redshift, and then shocks. Cold gas: its specific internal energy at the start is given."
     }
    ]
   }
  }
 }
}
