{
  "capability_id": "physics.fluid.orifice",
  "tool_id": "orifice-discharge",
  "engine": "orifice-discharge",
  "calculation_version": "1.0.0",
  "generated_at": "2026-09-17T02:45:35.818Z",
  "engine_build": "2026-09-17",
  "test_count": 15,
  "passed": 15,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 1,
      "passed": 1
    },
    "boundary": {
      "total": 9,
      "passed": 9
    },
    "property": {
      "total": 5,
      "passed": 5
    }
  },
  "engine_tested": true,
  "expert_reviewed": false,
  "internally_reviewed": false,
  "review_kind": null,
  "source_checked": true,
  "reviewed_by": null,
  "reviewer_role": null,
  "last_reviewed": null,
  "expert_review": {
    "status": "optional_not_performed",
    "reviewer": null,
    "scope": [
      "formula",
      "input semantics",
      "assumptions",
      "limitations",
      "sources",
      "tests"
    ],
    "note": "Domain expert review is optional under CVP (CVP-EXP-01). Absence does not block CVP Verified. See Review policy for supplemental domain assurance."
  },
  "internal_review": {
    "status": "not_applicable",
    "reviewer": null
  },
  "page": "https://www.calculatorx.com/calc/physics/orifice-discharge",
  "api": "https://www.calculatorx.com/api/v1/calc/orifice-discharge",
  "schema_input": "https://www.calculatorx.com/schemas/physics.fluid.orifice.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/physics.fluid.orifice.output.json",
  "assumptions": [
    "Sharp-edged orifice; SI; default C_d=0.61; C_d in (0, 1]",
    "Tank: Q=C_d A √(2gH); not a weir H^{3/2}",
    "Meter: Q=C_d E A_t √(2Δp/ρ), E=1/√(1−β⁴); incompressible; user C_d",
    "Not weir, not Q=Av, not Darcy, not Manning, not compressible ISO ε(Re)"
  ],
  "limitations": [
    "Sharp-edged orifice; SI; default C_d=0.61",
    "Tank: Q=C_d A √(2gH); not a weir H^{3/2}",
    "Meter: Q=C_d E A_t √(2Δp/ρ); incompressible; user C_d; not ISO ε(Re)",
    "Not weir, not Q=Av, not Darcy, not Manning"
  ],
  "boundary_conditions": [
    "missing H, Q, d/A, D, Δp, or ρ when required → MISSING_REQUIRED_INPUT",
    "H, Q, d, D, A, Δp, ρ, or C_d ≤ 0 → VALUE_MUST_BE_POSITIVE",
    "d ≥ D → VALUE_OUT_OF_RANGE",
    "C_d > 1 → VALUE_OUT_OF_RANGE",
    "H and Q, Δp and Q, A and d, tank with D/Δp, meter with H, or crest L → MIXED_INPUT_ENCODING",
    "weir, rectangular, Manning, Darcy, or Q=Av as mode → INVALID_MODE"
  ],
  "sources": [
    {
      "title": "ISO 5167-2 — Measurement of fluid flow by means of pressure differential devices — Orifice plates",
      "section": "Incompressible discharge with velocity-of-approach factor",
      "url": "https://www.iso.org/standard/28064.html",
      "supports": "Q = C E (π/4) d² √(2Δp/ρ); E = 1/√(1−β⁴); this page takes C as an input",
      "kind": "standard"
    },
    {
      "title": "Munson, B.R., Young, D.F., and Okiishi, T.H. Fundamentals of Fluid Mechanics",
      "section": "Orifice discharge; Torricelli",
      "supports": "Free discharge Q = C_d A √(2gH) for a sharp-edged tank orifice",
      "kind": "reference"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:f247c55047c820d3ed072ec9243224d8c3aa5d5af4a66f94801978344266e2e6",
  "tests": [
    {
      "id": "golden-orifice-tank",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "d": 0.05,
        "H": 2
      },
      "expect": {
        "Q": 0.007501533593995419,
        "H": 2,
        "Cd": 0.61,
        "mode": "tank",
        "model": "orifice"
      },
      "expectWarning": null,
      "actual": {
        "mode": "tank",
        "Cd": 0.61,
        "g": 9.80665,
        "A": 0.001963495408493621,
        "model": "orifice",
        "d": 0.05,
        "Q": 0.007501533593995419,
        "H": 2
      },
      "tol": 1e-10
    },
    {
      "id": "boundary-orifice-invert",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "d": 0.05,
        "Q": 0.007501533593995419
      },
      "expect": {
        "H": 2,
        "model": "orifice"
      },
      "expectWarning": null,
      "actual": {
        "mode": "tank",
        "Cd": 0.61,
        "g": 9.80665,
        "A": 0.001963495408493621,
        "model": "orifice",
        "d": 0.05,
        "Q": 0.007501533593995419,
        "H": 1.9999999999999996
      },
      "tol": 1e-10
    },
    {
      "id": "boundary-orifice-meter",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "meter",
        "d": 0.05,
        "D": 0.1,
        "dP": 10000,
        "rho": 1000
      },
      "expect": {
        "Q": 0.005532088060914365,
        "beta": 0.5,
        "E": 1.0327955589886444,
        "mode": "meter"
      },
      "expectWarning": null,
      "actual": {
        "mode": "meter",
        "Cd": 0.61,
        "d": 0.05,
        "D": 0.1,
        "beta": 0.5,
        "E": 1.0327955589886444,
        "A": 0.001963495408493621,
        "rho": 1000,
        "model": "orifice",
        "Q": 0.005532088060914365,
        "dP": 10000
      },
      "tol": 1e-10
    },
    {
      "id": "boundary-orifice-meter-inv",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "meter",
        "d": 0.05,
        "D": 0.1,
        "Q": 0.005532088060914365,
        "rho": 1000
      },
      "expect": {
        "dP": 10000,
        "model": "orifice"
      },
      "expectWarning": null,
      "actual": {
        "mode": "meter",
        "Cd": 0.61,
        "d": 0.05,
        "D": 0.1,
        "beta": 0.5,
        "E": 1.0327955589886444,
        "A": 0.001963495408493621,
        "rho": 1000,
        "model": "orifice",
        "Q": 0.005532088060914365,
        "dP": 10000.000000000002
      },
      "tol": 1e-10
    },
    {
      "id": "boundary-orifice-missing",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "d": 0.05
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "H is required"
    },
    {
      "id": "boundary-orifice-h0",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "d": 0.05,
        "H": 0
      },
      "expectError": "VALUE_MUST_BE_POSITIVE",
      "code": "VALUE_MUST_BE_POSITIVE",
      "error": "H must be greater than zero"
    },
    {
      "id": "boundary-orifice-mixed",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "d": 0.05,
        "H": 2,
        "Q": 0.007501533593995419
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Give H or Q, not both"
    },
    {
      "id": "boundary-orifice-weir-L",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "d": 0.05,
        "H": 2,
        "L": 1
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Orifice does not take crest length L. That is a weir"
    },
    {
      "id": "boundary-orifice-cd",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "d": 0.05,
        "H": 2,
        "Cd": 1.2
      },
      "expectError": "VALUE_OUT_OF_RANGE",
      "code": "VALUE_OUT_OF_RANGE",
      "error": "Cd must be ≤ 1"
    },
    {
      "id": "boundary-orifice-weir",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "d": 0.05,
        "H": 2,
        "mode": "weir"
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "mode must be tank|meter. Not weir, Manning, Darcy, Colebrook, or Q=Av"
    },
    {
      "id": "property-orifice-q",
      "ok": true,
      "kind": "property",
      "detail": "tank Q=Cd A √(2gH)",
      "expect": 0.007501533593995419,
      "actual": 0.007501533593995419
    },
    {
      "id": "property-orifice-h",
      "ok": true,
      "kind": "property",
      "detail": "H round-trip",
      "expect": 2,
      "actual": 1.9999999999999996
    },
    {
      "id": "property-orifice-meter",
      "ok": true,
      "kind": "property",
      "detail": "meter Q=Cd E At √(2Δp/ρ)",
      "expect": 0.005532088060914365,
      "actual": 0.005532088060914365
    },
    {
      "id": "property-orifice-cd",
      "ok": true,
      "kind": "property",
      "detail": "default Cd 0.61",
      "expect": 0.61,
      "actual": 0.61
    },
    {
      "id": "property-orifice-model",
      "ok": true,
      "kind": "property",
      "detail": "orifice",
      "expect": true,
      "actual": "orifice"
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 15,
      "total": 15,
      "golden": 1,
      "boundary": 9,
      "property": 5
    },
    "contract_checks": {
      "passed": 3,
      "total": 3
    }
  },
  "evidence_core_generated_at": "2026-09-17T02:24:48.610Z",
  "rendered_at": "2026-09-17T02:45:35.818Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.0.0",
    "artifacts": {
      "engine": "1.0.0",
      "page": "1.0.0",
      "capability": "1.0.0",
      "evidence": "1.0.0",
      "input_schema": "1.0.0",
      "output_schema": "1.0.0",
      "mcp_contract": "1.0.0"
    },
    "digests": {
      "input_schema_sha256": "d8551d05b48e99a9d3b08efe16cb0d7e572b0ed5732c51bf4354fb167d7b9803",
      "output_schema_sha256": "311b9a157e98906228f1cb054519fb02a8930d12413e1aab86cc1ed23351eb8b",
      "evidence_sha256": "68d1fa89f29cdeeb230507e429a721343b6d38d7f66d79433396665ffb491db9",
      "evidence_core_sha256": "68d1fa89f29cdeeb230507e429a721343b6d38d7f66d79433396665ffb491db9",
      "capability_sha256": "d6b9280307722d88c5c06bfed181965a1c3d91788323d08f746a9a1c5e9b34e1",
      "engine_sha256": "a3e8effccaf4677aec4d1da78c13b5dc595ff97e52b074d5de5ab5cb5a87b094",
      "mcp_contract_sha256": "a942c221699a25eb2b10fc462c0b321092558cb5ffda32cf521d31ee83e3fe87"
    },
    "contract_checks": {
      "total": 3,
      "passed": 3,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.0.0"
        },
        {
          "id": "schema-valid-input-executes",
          "status": "pass"
        },
        {
          "id": "engine-success-output-validates-schema",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
