{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/physics.fluid.weir.input.json",
  "title": "Weir discharge — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "rectangular",
        "triangular"
      ],
      "description": "rectangular (default) or triangular/V-notch. Not Francis, Cipolletti, Manning, or orifice."
    },
    "H": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Upstream head above the crest in m. Give H or Q, not both."
    },
    "Q": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Discharge in m³/s. Give H or Q, not both."
    },
    "L": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Crest length in m. Required for rectangular."
    },
    "theta_deg": {
      "type": "number",
      "exclusiveMinimum": 0,
      "exclusiveMaximum": 180,
      "description": "V-notch angle in degrees. Default 90. Alternative: theta_rad. Do not send both."
    },
    "theta_rad": {
      "type": "number",
      "exclusiveMinimum": 0,
      "exclusiveMaximum": 3.141592653589793,
      "description": "V-notch angle in radians. Alternative: theta_deg. Do not send both."
    },
    "Cd": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1,
      "description": "Discharge coefficient. Default 0.62 rectangular, 0.58 triangular. Francis 3.33 is out of scope."
    },
    "g": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Gravity in m/s². Default 9.80665."
    }
  },
  "description": "Thin-plate weir discharge. Rectangular Q=(2/3) C_d L √(2g) H^{3/2}. Triangular Q=(8/15) C_d √(2g) tan(θ/2) H^{5/2}. Not Manning, not Q=Av, not Darcy, not an orifice, not Francis contractions. (calculation_version 1.0.0)"
}
