{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/physics.fluid.specific_energy/1.0.0/input.json",
  "title": "Specific energy — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "energy",
        "depth",
        "velocity"
      ],
      "description": "energy (default), depth, or velocity. Not Froude, hydraulic jump, Manning, or Q=Av."
    },
    "y": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Flow depth in m. Required except depth invert. Do not send y1/y2."
    },
    "v": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Mean speed in m/s. Required except velocity invert. Alternative: v_m_s."
    },
    "v_m_s": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Mean speed in m/s (query/UI). REST may send v."
    },
    "E": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Specific energy in m. Required for depth and velocity invert. Do not send with energy mode."
    },
    "g": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Gravity in m/s². Default 9.80665."
    }
  },
  "description": "Open-channel E=y+v²/(2g). Not a Froude wrap, not a hydraulic jump, not Manning, not Q=Av. (calculation_version 1.0.0)"
}
