{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/physics.fluid.trapezoid_specific_energy.input.json",
  "title": "Trapezoidal specific energy — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "energy",
        "discharge"
      ],
      "description": "energy (default, E from y,Q,b,z) or discharge (Q from E,y,b,z). Not rectangular depth|velocity. Not alternate depths."
    },
    "b": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Bottom width in m. Required. Alternatives: width, b_m, channel_width. Do not send side-weir B."
    },
    "z": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Side slope run/rise (z>0). Required. Alternatives: z_side, side_slope, m. z=0 is rectangular /calc/physics/specific-energy. Do not send a bank angle."
    },
    "y": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Flow depth in m. Required. Alternatives: y_m, depth. Do not send yc or yn."
    },
    "Q": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Volume flow in m³/s. Required for energy. Alternatives: flow, Q_m3_s. Do not send v."
    },
    "E": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Specific energy in m. Required for discharge. Alternatives: energy. Do not send with energy mode."
    },
    "g": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Gravity in m/s². Optional; default 9.80665. Alternatives: g_m_s2."
    }
  },
  "required": [
    "b",
    "z",
    "y"
  ],
  "description": "Trapezoid E=y+Q²/(2gA²) with A=(b+z y)y. Not rectangular E=y+v²/(2g), not trapezoid yc, not trapezoid yn, not Manning A,R, not Q=Av. (calculation_version 1.0.0)"
}
