{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/physics.fluid.trapezoid_critical_depth.input.json",
  "title": "Trapezoidal critical depth — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "depth",
        "discharge"
      ],
      "description": "depth (default, yc from Q) or discharge (Q from yc). Not rectangular unit_discharge q. Not energy, not yn."
    },
    "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/critical-depth. Do not send a bank angle."
    },
    "Q": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Volume flow in m³/s. Required for depth. Alternatives: flow, Q_m3_s. Do not send rectangular q."
    },
    "yc": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Critical depth in m. Required for discharge. Alternatives: y_c. Do not send with depth mode."
    },
    "g": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Gravity in m/s². Optional; default 9.80665. Alternatives: g_m_s2."
    }
  },
  "required": [
    "b",
    "z"
  ],
  "description": "Trapezoid Fr=1 from Q, b, z with Q² T = g A³, A=(b+z y)y, T=b+2 z y. Not rectangular yc=(q²/g)^{1/3}, not yn, not E, not Manning Q, not Q=Av. (calculation_version 1.0.0)"
}
