{
  "capability_id": "physics.fluid.hazen_williams",
  "tool_id": "hazen-williams",
  "engine": "hazen-williams",
  "calculation_version": "1.0.0",
  "generated_at": "2026-09-17T06:35:12.146Z",
  "engine_build": "2026-09-17",
  "test_count": 17,
  "passed": 17,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 2,
      "passed": 2
    },
    "boundary": {
      "total": 10,
      "passed": 10
    },
    "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/hazen-williams",
  "api": "https://www.calculatorx.com/api/v1/calc/hazen-williams",
  "schema_input": "https://www.calculatorx.com/schemas/physics.fluid.hazen_williams.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/physics.fluid.hazen_williams.output.json",
  "assumptions": [
    "SI Hazen–Williams k=10.67",
    "Circular full-flow water pipe",
    "Empirical C; not Darcy f, not Colebrook, not Manning n",
    "Not Q=Av identities",
    "Not US customary gpm/in"
  ],
  "limitations": [
    "SI Hazen–Williams: hf = 10.67 L Q^{1.852} / (C^{1.852} D^{4.87})",
    "Circular full-flow water pipe; empirical C; k=10.67; not US gpm/in",
    "Not Darcy–Weisbach, not Colebrook, not Manning, not Q=Av"
  ],
  "boundary_conditions": [
    "missing C, L, Q, D, or hf/S when required → MISSING_REQUIRED_INPUT",
    "C, L, Q, D, hf, or S ≤ 0 → VALUE_MUST_BE_POSITIVE",
    "hf and S together → MIXED_INPUT_ENCODING",
    "f, Re, n, v, ρ, R, or C_d → MIXED_INPUT_ENCODING",
    "k given and k ≠ 10.67 → INVALID_MODE",
    "darcy, colebrook, or manning as mode → INVALID_MODE"
  ],
  "sources": [
    {
      "title": "ISO 80000-4 — Mechanics",
      "section": "Volume flow rate and hydraulic head",
      "url": "https://www.iso.org/standard/31895.html",
      "supports": "Q is volume flow; hf is a length of hydraulic head",
      "kind": "standard"
    },
    {
      "title": "Williams, G.S. and Hazen, A. Hydraulic Tables",
      "section": "Empirical pipe formula",
      "supports": "Hazen–Williams C correlation for water pipes; SI form uses k=10.67 with Q in m³/s and D in m",
      "kind": "reference"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:d408aa5ed3f1e0fa778bb51ce68fefeb2a63dd1d69468db502bd68867c116c51",
  "tests": [
    {
      "id": "golden-hw-hf",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "C": 120,
        "L": 100,
        "Q": 0.02,
        "D": 0.2
      },
      "expect": {
        "hf": 0.27227779496920657,
        "Q": 0.02,
        "C": 120,
        "L": 100,
        "D": 0.2,
        "k": 10.67,
        "mode": "head_loss",
        "model": "hazen_williams"
      },
      "expectWarning": null,
      "actual": {
        "mode": "head_loss",
        "hf": 0.27227779496920657,
        "Q": 0.02,
        "v": 0.6366197723675813,
        "C": 120,
        "L": 100,
        "D": 0.2,
        "A": 0.031415926535897934,
        "S": 0.0027227779496920654,
        "k": 10.67,
        "model": "hazen_williams"
      },
      "tol": 1e-12
    },
    {
      "id": "golden-hw-flow",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "flow",
        "C": 120,
        "L": 100,
        "D": 0.2,
        "hf": 0.27227779496920657
      },
      "expect": {
        "Q": 0.02,
        "hf": 0.27227779496920657,
        "model": "hazen_williams"
      },
      "expectWarning": null,
      "actual": {
        "mode": "flow",
        "hf": 0.27227779496920657,
        "Q": 0.020000000000000004,
        "v": 0.6366197723675814,
        "C": 120,
        "L": 100,
        "D": 0.2,
        "A": 0.031415926535897934,
        "S": 0.0027227779496920654,
        "k": 10.67,
        "model": "hazen_williams"
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-hw-diameter",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "diameter",
        "C": 120,
        "L": 100,
        "Q": 0.02,
        "hf": 0.27227779496920657
      },
      "expect": {
        "D": 0.2,
        "model": "hazen_williams"
      },
      "expectWarning": null,
      "actual": {
        "mode": "diameter",
        "hf": 0.27227779496920657,
        "Q": 0.02,
        "v": 0.6366197723675813,
        "C": 120,
        "L": 100,
        "D": 0.2,
        "A": 0.031415926535897934,
        "S": 0.0027227779496920654,
        "k": 10.67,
        "model": "hazen_williams"
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-hw-c",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "C",
        "L": 100,
        "Q": 0.02,
        "D": 0.2,
        "hf": 0.27227779496920657
      },
      "expect": {
        "C": 120,
        "model": "hazen_williams"
      },
      "expectWarning": null,
      "actual": {
        "mode": "C",
        "hf": 0.27227779496920657,
        "Q": 0.02,
        "v": 0.6366197723675813,
        "C": 119.99999999999999,
        "L": 100,
        "D": 0.2,
        "A": 0.031415926535897934,
        "S": 0.0027227779496920654,
        "k": 10.67,
        "model": "hazen_williams"
      },
      "tol": 1e-10
    },
    {
      "id": "boundary-hw-slope",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "flow",
        "C": 120,
        "L": 100,
        "D": 0.2,
        "S": 0.0027227779496920654
      },
      "expect": {
        "Q": 0.02,
        "model": "hazen_williams"
      },
      "expectWarning": null,
      "actual": {
        "mode": "flow",
        "hf": 0.27227779496920657,
        "Q": 0.020000000000000004,
        "v": 0.6366197723675814,
        "C": 120,
        "L": 100,
        "D": 0.2,
        "A": 0.031415926535897934,
        "S": 0.0027227779496920654,
        "k": 10.67,
        "model": "hazen_williams"
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-hw-missing",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "C": 120,
        "L": 100,
        "Q": 0.02
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "D is required"
    },
    {
      "id": "boundary-hw-c0",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "C": 0,
        "L": 100,
        "Q": 0.02,
        "D": 0.2
      },
      "expectError": "VALUE_MUST_BE_POSITIVE",
      "code": "VALUE_MUST_BE_POSITIVE",
      "error": "C must be greater than zero"
    },
    {
      "id": "boundary-hw-f",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "C": 120,
        "L": 100,
        "Q": 0.02,
        "D": 0.2,
        "f": 0.02
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Hazen–Williams does not take Darcy f. That is /calc/physics/darcy-weisbach"
    },
    {
      "id": "boundary-hw-n",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "C": 120,
        "L": 100,
        "Q": 0.02,
        "D": 0.2,
        "n": 0.013
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Hazen–Williams does not take Manning n. That is /calc/physics/manning-formula"
    },
    {
      "id": "boundary-hw-v",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "C": 120,
        "L": 100,
        "Q": 0.02,
        "D": 0.2,
        "v": 2
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Hazen–Williams does not take v. That is Q=Av. Give Q"
    },
    {
      "id": "boundary-hw-darcy",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "C": 120,
        "L": 100,
        "Q": 0.02,
        "D": 0.2,
        "mode": "darcy"
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "mode must be head_loss|flow|diameter|C. Not Darcy, Colebrook, Manning, or Q=Av"
    },
    {
      "id": "boundary-hw-k",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "C": 120,
        "L": 100,
        "Q": 0.02,
        "D": 0.2,
        "k": 1.318
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "SI Hazen–Williams only (k=10.67). US customary gpm/in is out of scope"
    },
    {
      "id": "property-hw-hf",
      "ok": true,
      "kind": "property",
      "detail": "SI k=10.67 hf",
      "expect": 0.27227779496920657,
      "actual": 0.27227779496920657
    },
    {
      "id": "property-hw-s",
      "ok": true,
      "kind": "property",
      "detail": "S=hf/L",
      "expect": 0.0027227779496920654,
      "actual": 0.0027227779496920654
    },
    {
      "id": "property-hw-roundtrip-q",
      "ok": true,
      "kind": "property",
      "detail": "flow invert Q",
      "expect": 0.02,
      "actual": 0.020000000000000004
    },
    {
      "id": "property-hw-length",
      "ok": true,
      "kind": "property",
      "detail": "hf ∝ L",
      "expect": 2,
      "actual": 2
    },
    {
      "id": "property-hw-model",
      "ok": true,
      "kind": "property",
      "detail": "hazen_williams",
      "expect": true,
      "actual": "hazen_williams"
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 17,
      "total": 17,
      "golden": 2,
      "boundary": 10,
      "property": 5
    },
    "contract_checks": {
      "passed": 4,
      "total": 4
    }
  },
  "evidence_core_generated_at": "2026-09-17T04:33:23.369Z",
  "rendered_at": "2026-09-17T06:35:12.146Z",
  "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": "1ba406f7d6fa954f4e1167326caf3a5e5413a77d4616742d63a9e3e51cf6cb25",
      "output_schema_sha256": "63a1653c24addc4ac4815a5458b81ac356d07614b73de617595f162be7a86808",
      "evidence_sha256": "c77a1115a577905a90df213e68d0d0f556806369a05f3f0cdfa8906595f3d7c4",
      "evidence_core_sha256": "c77a1115a577905a90df213e68d0d0f556806369a05f3f0cdfa8906595f3d7c4",
      "capability_sha256": "7e2d5e18f69a580da3375ebf84ad5a08a3b64aae02ea46ef13f134061e13fa8e",
      "engine_sha256": "577dd02827ddc989c9ec83548106b0de2da132cdaad4c2e72f4dc05cde6f3e07",
      "mcp_contract_sha256": "a0951a99ea7017485ae852239b46888380ab942a7571f6a90cc299bd18753be2"
    },
    "contract_checks": {
      "total": 4,
      "passed": 4,
      "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"
        },
        {
          "id": "schema-rejects-incomplete-input",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
