{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/physics.fluid.pipe_wye/1.0.0/input.json",
  "title": "Pipe wye — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "head",
        "pressure",
        "velocity"
      ],
      "description": "head (default), pressure, or velocity. Not catalog K, 90° tee, bend, or Q=Av."
    },
    "kind": {
      "type": "string",
      "enum": [
        "dividing",
        "combining"
      ],
      "description": "Flow pattern. dividing (default, split from the common inlet) or combining (merge into the common outlet). Alternative: pattern."
    },
    "path": {
      "type": "string",
      "enum": [
        "branch",
        "run"
      ],
      "description": "Leg. branch (default, angled takeoff) or run (straight through). Alternative: leg."
    },
    "q_ratio": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "description": "Q_path / Q_c. Required. Alternatives: q, flow_ratio. Not Q=Av."
    },
    "alpha_deg": {
      "type": "number",
      "exclusiveMinimum": 0,
      "exclusiveMaximum": 90,
      "description": "Branch angle in degrees, exclusive (0, 90). Required. 90° is pipe-tee. Alternatives: alpha, alpha_rad."
    },
    "alpha_rad": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Branch angle in radians. Alternative to alpha_deg. Do not send both."
    },
    "v_m_s": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Common-channel speed v_c in m/s. Required except velocity invert. Alternative: speed. Do not send query v (that is calculation_version)."
    },
    "speed": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Common-channel speed in m/s (REST alias of v_m_s)."
    },
    "h": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Head loss in m. Required for velocity 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."
    }
  },
  "required": [
    "q_ratio",
    "alpha_deg"
  ],
  "description": "Equal-area sharp wye h=K v_c²/(2g) from α∈(0,90°), dividing/combining, and branch/run split. Not a 90° tee, not catalog K, not circular-arc, not Q=Av. (calculation_version 1.0.0)"
}
