{
  "capability_id": "physics.fluid.water_hammer",
  "tool_id": "water-hammer",
  "engine": "water-hammer",
  "calculation_version": "1.0.0",
  "generated_at": "2026-09-17T12:57:09.947Z",
  "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/water-hammer",
  "api": "https://www.calculatorx.com/api/v1/calc/water-hammer",
  "schema_input": "https://www.calculatorx.com/schemas/physics.fluid.water_hammer.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/physics.fluid.water_hammer.output.json",
  "assumptions": [
    "Joukowsky water hammer: Δp = ρ c Δv; h = Δp/(ρ g); default ρ=1000 kg/m³; default g=9.80665 m/s²",
    "c is the given celerity, not Moens–Korteweg from bulk modulus K, D, e, E",
    "Not Darcy f, not Colebrook, not minor-loss K, not Q=Av"
  ],
  "limitations": [
    "Joukowsky water hammer: Δp = ρ c Δv; h = Δp/(ρ g); default ρ=1000 kg/m³; default g=9.80665 m/s²",
    "c is the given celerity, not Moens–Korteweg from bulk modulus K, D, e, E",
    "Not Darcy f, not Colebrook, not minor-loss K, not Q=Av"
  ],
  "boundary_conditions": [
    "missing c, Δv, or Δp when required → MISSING_REQUIRED_INPUT",
    "c, Δv, Δp, ρ, or g ≤ 0 → VALUE_MUST_BE_POSITIVE",
    "f/Re, K, L/D/e/E, n, A/Q, v → MIXED_INPUT_ENCODING",
    "darcy, minor, or manning as mode → INVALID_MODE"
  ],
  "sources": [
    {
      "title": "ISO 80000-4 — Mechanics",
      "section": "Pressure, density, speed",
      "supports": "Δp is a pressure; ρ is a density; c and Δv are speeds",
      "kind": "standard"
    },
    {
      "title": "Wylie, E.B. and Streeter, V.L. Fluid Transients",
      "section": "Joukowsky equation",
      "supports": "Δp = ρ c Δv for a rapid velocity change in a liquid-filled pipe",
      "kind": "reference"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:65b7d175dbd32dfa6504a357891cb0e9340be7681517fd7b1299c923235512b2",
  "tests": [
    {
      "id": "golden-wh-dP",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "c": 1000,
        "dV": 1
      },
      "expect": {
        "dP": 1000000,
        "c": 1000,
        "dV": 1,
        "rho": 1000,
        "mode": "pressure",
        "model": "joukowsky"
      },
      "expectWarning": null,
      "actual": {
        "mode": "pressure",
        "dP": 1000000,
        "rho": 1000,
        "c": 1000,
        "dV": 1,
        "h": 101.97162129779282,
        "g": 9.80665,
        "model": "joukowsky"
      },
      "tol": 1e-12
    },
    {
      "id": "golden-wh-dV",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "velocity",
        "dP": 1000000,
        "c": 1000
      },
      "expect": {
        "dV": 1,
        "model": "joukowsky"
      },
      "expectWarning": null,
      "actual": {
        "mode": "velocity",
        "dP": 1000000,
        "rho": 1000,
        "c": 1000,
        "dV": 1,
        "h": 101.97162129779282,
        "g": 9.80665,
        "model": "joukowsky"
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-wh-c",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "celerity",
        "dP": 1000000,
        "dV": 1
      },
      "expect": {
        "c": 1000,
        "model": "joukowsky"
      },
      "expectWarning": null,
      "actual": {
        "mode": "celerity",
        "dP": 1000000,
        "rho": 1000,
        "c": 1000,
        "dV": 1,
        "h": 101.97162129779282,
        "g": 9.80665,
        "model": "joukowsky"
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-wh-missing",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "c": 1000
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "dV is required"
    },
    {
      "id": "boundary-wh-f",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "c": 1000,
        "dV": 1,
        "f": 0.02
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Water hammer does not take Darcy f, Re, or roughness. That is /calc/physics/darcy-weisbach or /calc/physics/colebrook"
    },
    {
      "id": "boundary-wh-K",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "c": 1000,
        "dV": 1,
        "K": 0.5
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Water hammer does not take minor-loss K or bulk modulus K. Give celerity c. Wave speed is /calc/physics/wave-celerity; fitting K is /calc/physics/minor-loss"
    },
    {
      "id": "boundary-wh-L",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "c": 1000,
        "dV": 1,
        "L": 100
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Water hammer does not take L, D, wall e, or E. Give c; wave speed from K, D, e, E is /calc/physics/wave-celerity"
    },
    {
      "id": "boundary-wh-A",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "c": 1000,
        "dV": 1,
        "A": 1
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Water hammer does not take Q=Av A/Q. Use Δv, not Q"
    },
    {
      "id": "boundary-wh-n",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "c": 1000,
        "dV": 1,
        "n": 0.013
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Water hammer does not take Manning n or Chezy C/R/S"
    },
    {
      "id": "boundary-wh-v",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "c": 1000,
        "dV": 1,
        "v": 1
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Water hammer uses dV, not v. That is /calc/physics/pitot-tube or /calc/physics/froude-number"
    },
    {
      "id": "boundary-wh-darcy",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "c": 1000,
        "dV": 1,
        "mode": "darcy"
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "mode must be pressure|velocity|celerity. Not Darcy, minor-loss, Manning, or Q=Av"
    },
    {
      "id": "boundary-wh-zero",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "c": 1000,
        "dV": 0
      },
      "expectError": "VALUE_MUST_BE_POSITIVE",
      "code": "VALUE_MUST_BE_POSITIVE",
      "error": "dV must be greater than zero"
    },
    {
      "id": "property-wh-dP",
      "ok": true,
      "kind": "property",
      "detail": "Δp=ρcΔv",
      "expect": 1000000,
      "actual": 1000000
    },
    {
      "id": "property-wh-roundtrip-dV",
      "ok": true,
      "kind": "property",
      "detail": "Δv invert",
      "expect": 1,
      "actual": 1
    },
    {
      "id": "property-wh-roundtrip-c",
      "ok": true,
      "kind": "property",
      "detail": "c invert",
      "expect": 1000,
      "actual": 1000
    },
    {
      "id": "property-wh-h",
      "ok": true,
      "kind": "property",
      "detail": "h=Δp/(ρg)",
      "expect": 101.97162129779282,
      "actual": 101.97162129779282
    },
    {
      "id": "property-wh-model",
      "ok": true,
      "kind": "property",
      "detail": "joukowsky",
      "expect": true,
      "actual": "joukowsky"
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 17,
      "total": 17,
      "golden": 2,
      "boundary": 10,
      "property": 5
    },
    "contract_checks": {
      "passed": 3,
      "total": 3
    }
  },
  "evidence_core_generated_at": "2026-09-17T09:45:11.688Z",
  "rendered_at": "2026-09-17T12:57:09.947Z",
  "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": "316c31fd08bed589e6ee4bcb648c719e32eab3bc355546ee6346828e8c13e71a",
      "output_schema_sha256": "153e5d1a248cdfcd527793193daf0c77f323ac6a061abc9315bbb16fa2ed500a",
      "evidence_sha256": "606f43505d8f2eff08b30e899b10003476d0df6f359a8cdbcf765112497a50fb",
      "evidence_core_sha256": "606f43505d8f2eff08b30e899b10003476d0df6f359a8cdbcf765112497a50fb",
      "capability_sha256": "dc2342ba3d044478747a86ac36448d581977c9f2d2febfc0b66f29633e87da30",
      "engine_sha256": "3a274e9526e8ef09a42dd9a5a2173db0d5ed2458a9b92192df103930b4e43523",
      "mcp_contract_sha256": "c77a372e41c0e20baf484d40ec69bc5e915f0921b6c896f8723c29434c676171"
    },
    "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"
  }
}
