{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/physics.fluid.mitered_bend.input.json",
  "title": "Mitered bend — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "head",
        "pressure",
        "velocity",
        "angle"
      ],
      "description": "head (default), pressure, velocity, or angle. Not circular-arc, minor-loss, Darcy, or Q=Av."
    },
    "v_m_s": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Mean speed in m/s. Required except velocity invert. Alternative: speed. Do not send query v (that is calculation_version)."
    },
    "speed": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Mean speed in m/s (REST alias of v_m_s)."
    },
    "theta_deg": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Total deflection in degrees. Required except angle invert. Alternative: theta_rad. Do not send both. Each miter θ/n ≤ 90°."
    },
    "theta_rad": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Total deflection in radians. Alternative: theta_deg. Do not send both."
    },
    "n_miters": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "description": "Number of miter welds. Required. Alternatives: miters, n. Positive integer."
    },
    "n": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "description": "Miter-count alias of n_miters. Not Manning n."
    },
    "h": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Head loss in m. Required for velocity and angle invert. Alternatives: hm, h_m."
    },
    "h_m": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Head loss in m (query/UI). REST may send h."
    },
    "rho": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Density in kg/m³. Optional; default 1000."
    },
    "g": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Gravity in m/s². Optional; default 9.80665."
    }
  },
  "description": "Sharp miter h=K v²/(2g), K=n [sin²(δ/2)+2 sin⁴(δ/2)], δ=θ/n. Not circular-arc R/D, not minor-loss K given, not Crane f_T, not Q=Av. (calculation_version 1.0.0)"
}
