{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/physics.fluid.orifice/1.0.0/input.json",
  "title": "Orifice discharge — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "tank",
        "meter"
      ],
      "description": "tank (default, free discharge) or incompressible meter. Not weir, Manning, Darcy, or Q=Av."
    },
    "d": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Orifice diameter in m. Tank may use A instead of d. Meter requires d and D."
    },
    "D": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Pipe inner diameter in m. Meter only. d must be smaller than D."
    },
    "A": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Orifice area in m². Tank alternative to d. Do not send both."
    },
    "H": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Tank head on the orifice in m. Give H or Q, not both. Not used on meter."
    },
    "dP": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Meter differential pressure in Pa. Give Δp or Q, not both."
    },
    "Q": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Discharge in m³/s. Inverts H (tank) or Δp (meter)."
    },
    "rho": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Density in kg/m³. Required for meter."
    },
    "Cd": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1,
      "description": "Discharge coefficient. Default 0.61. Must be in (0, 1]."
    },
    "g": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Gravity in m/s². Default 9.80665. Tank only."
    }
  },
  "description": "Sharp-edged orifice. Tank Q=C_d A √(2gH). Meter Q=C_d E A_t √(2Δp/ρ) with E=1/√(1−β⁴). Not a weir, not Q=Av, not Darcy, not Manning, not compressible ISO ε. (calculation_version 1.0.0)"
}
