{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/physics.fluid.side_weir.input.json",
  "title": "Side weir — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "flow",
        "length"
      ],
      "description": "flow (default) or length. Not thin-plate, not ogee, not sluice, not Manning, not Q=Av."
    },
    "B": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Channel width in m. Required. Alternatives: B_m, channel_width. Do not send sluice/broad-crested b."
    },
    "L": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Along-channel weir length in m. Required for flow. Alternatives: L_m, weir_length."
    },
    "y1": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Upstream depth in m. Required. Alternatives: y_1, upstream_depth, y_m. Do not send weir H or flume Ha."
    },
    "p": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Sill height in m. Required. Envelope p/y1∈[0.1, 0.9]. Alternatives: p_m, sill, sill_height. Do not send ogee P or Hd."
    },
    "Q1": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Approach discharge in m³/s. Required unless v1 is given. Alternatives: Q_1, approach, inflow, Q_in. Optional v1 as Q1=v1·B·y1."
    },
    "Q": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Lateral overflow in m³/s. Required for length invert. Alternatives: flow, Q_m3_s, Q_w."
    }
  },
  "required": [
    "B",
    "y1",
    "p"
  ],
  "description": "Borghei 1999 sharp-crested side weir Q from B, L, y1, p, and Q1. Not frontal thin-plate weir, not ogee, not sluice, not Manning, not Q=Av. (calculation_version 1.0.0)"
}
