{
  "capability_id": "physics.fluid.gradual_contraction",
  "tool_id": "gradual-contraction",
  "engine": "gradual-contraction",
  "calculation_version": "1.0.0",
  "generated_at": "2026-09-17T12:57:09.950Z",
  "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/gradual-contraction",
  "api": "https://www.calculatorx.com/api/v1/calc/gradual-contraction",
  "schema_input": "https://www.calculatorx.com/schemas/physics.fluid.gradual_contraction.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/physics.fluid.gradual_contraction.output.json",
  "assumptions": [
    "Conical contraction: h = K v2² / (2g); K = 0.5 sin(α) (1 − v1/v2); α wall half-angle; k and K reported, not inputs",
    "Require 0 < α < 90°; α=90° is sudden contraction; default g=9.80665 m/s²; default ρ=1000 kg/m³; incompressible; v2 > v1",
    "Not sudden contraction (C_c), not gradual expansion (v1−v2)², not minor-loss K given, not Darcy f, not orifice C_d, not Q=Av"
  ],
  "limitations": [
    "Conical contraction: h = K v2² / (2g); K = 0.5 sin(α) (1 − v1/v2); α is wall half-angle; k and K are reported, not inputs",
    "Require 0 < α < 90°; α=90° is sudden contraction, not this page; default g=9.80665; default ρ=1000 for Δp; v2 > v1",
    "Not sudden contraction (C_c), not gradual expansion (v1−v2)², not minor-loss K given, not Darcy f, not orifice C_d, not Q=Av"
  ],
  "boundary_conditions": [
    "missing v1, v2, h, or α when required → MISSING_REQUIRED_INPUT",
    "v1 ≤ 0, h ≤ 0, or α ≤ 0 → VALUE_MUST_BE_POSITIVE",
    "v2 ≤ v1 or α ≥ 90° → VALUE_OUT_OF_RANGE",
    "K, k, C_c, f/Re, Q, C_d → MIXED_INPUT_ENCODING",
    "sudden, expansion, vena, minor, darcy, or orifice as mode → INVALID_MODE"
  ],
  "sources": [
    {
      "title": "ISO 80000-4 — Mechanics",
      "section": "Length, speed, pressure, plane angle",
      "url": "https://www.iso.org/standard/31895.html",
      "supports": "h is a head; v is a speed; Δp is a pressure; α is a plane angle",
      "kind": "standard"
    },
    {
      "title": "Idelchik — Handbook of Hydraulic Resistance",
      "section": "Conical contractions",
      "supports": "ζ = 0.5 sin(α) (1 − A2/A1) for a conical reducer, α wall half-angle from the axis",
      "kind": "reference"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:8c949a2cd78f6bdb29996178dab05dc8a10ba51f1e81fd21849416b8adaa04f9",
  "tests": [
    {
      "id": "golden-gct-h",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "v1": 1,
        "v2": 2,
        "alpha_deg": 7
      },
      "expect": {
        "h": 0.006213607266760182,
        "v1": 1,
        "v2": 2,
        "k": 0.06093467170257374,
        "K": 0.03046733585128687,
        "dP": 60.93467170257374,
        "mode": "head",
        "model": "conical_contraction"
      },
      "expectWarning": null,
      "actual": {
        "mode": "head",
        "h": 0.006213607266760182,
        "v1": 1,
        "v2": 2,
        "k": 0.06093467170257374,
        "K": 0.03046733585128687,
        "alpha": 0.12217304763960307,
        "alpha_deg": 7,
        "g": 9.80665,
        "rho": 1000,
        "dP": 60.93467170257374,
        "model": "conical_contraction"
      },
      "tol": 1e-12
    },
    {
      "id": "golden-gct-dP",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "pressure",
        "v1": 1,
        "v2": 2,
        "alpha_deg": 7
      },
      "expect": {
        "dP": 60.93467170257374,
        "model": "conical_contraction"
      },
      "expectWarning": null,
      "actual": {
        "mode": "pressure",
        "h": 0.006213607266760182,
        "v1": 1,
        "v2": 2,
        "k": 0.06093467170257374,
        "K": 0.03046733585128687,
        "alpha": 0.12217304763960307,
        "alpha_deg": 7,
        "g": 9.80665,
        "rho": 1000,
        "dP": 60.93467170257374,
        "model": "conical_contraction"
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-gct-v2",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "velocity",
        "v1": 1,
        "h": 0.006213607266760182,
        "alpha_deg": 7
      },
      "expect": {
        "v2": 2,
        "model": "conical_contraction"
      },
      "expectWarning": null,
      "actual": {
        "mode": "velocity",
        "h": 0.006213607266760182,
        "v1": 1,
        "v2": 2,
        "k": 0.06093467170257374,
        "K": 0.03046733585128687,
        "alpha": 0.12217304763960307,
        "alpha_deg": 7,
        "g": 9.80665,
        "rho": 1000,
        "dP": 60.93467170257374,
        "model": "conical_contraction"
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-gct-alpha",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "angle",
        "v1": 1,
        "v2": 2,
        "h": 0.006213607266760182
      },
      "expect": {
        "alpha_deg": 7,
        "model": "conical_contraction"
      },
      "expectWarning": null,
      "actual": {
        "mode": "angle",
        "h": 0.006213607266760182,
        "v1": 1,
        "v2": 2,
        "k": 0.06093467170257374,
        "K": 0.03046733585128687,
        "alpha": 0.12217304763960307,
        "alpha_deg": 7,
        "g": 9.80665,
        "rho": 1000,
        "dP": 60.93467170257374,
        "model": "conical_contraction"
      },
      "tol": 1e-9
    },
    {
      "id": "boundary-gct-missing",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "v1": 1,
        "v2": 2
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "alpha_deg is required"
    },
    {
      "id": "boundary-gct-K",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "v1": 1,
        "v2": 2,
        "alpha_deg": 7,
        "K": 0.03
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Gradual contraction does not take minor-loss K. That is /calc/physics/minor-loss. K=0.5 sin(α)(1−v1/v2) is reported"
    },
    {
      "id": "boundary-gct-k",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "v1": 1,
        "v2": 2,
        "alpha_deg": 7,
        "k": 0.06
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Gradual contraction does not take k as an input. k=0.5 sin(α) is reported. Not sudden contraction"
    },
    {
      "id": "boundary-gct-Cc",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "v1": 1,
        "v2": 2,
        "alpha_deg": 7,
        "C_c": 0.62
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Gradual contraction does not take C_c. Sudden contraction is /calc/physics/sudden-contraction"
    },
    {
      "id": "boundary-gct-Q",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "v1": 1,
        "v2": 2,
        "alpha_deg": 7,
        "Q": 1
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Gradual contraction does not take Q or A. That is /calc/physics/flow-rate. Give v1, v2, and α"
    },
    {
      "id": "boundary-gct-mode",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "v1": 1,
        "v2": 2,
        "alpha_deg": 7,
        "mode": "sudden"
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "mode must be head|pressure|velocity|angle. Not sudden contraction, expansion, minor-loss, Darcy, or Q=Av"
    },
    {
      "id": "boundary-gct-zero",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "v1": 0,
        "v2": 2,
        "alpha_deg": 7
      },
      "expectError": "VALUE_MUST_BE_POSITIVE",
      "code": "VALUE_MUST_BE_POSITIVE",
      "error": "v1 must be greater than zero"
    },
    {
      "id": "boundary-gct-wide",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "v1": 1,
        "v2": 2,
        "alpha_deg": 90
      },
      "expectError": "VALUE_OUT_OF_RANGE",
      "code": "VALUE_OUT_OF_RANGE",
      "error": "Half-angle ≥ 90° is a sudden wall. That is /calc/physics/sudden-contraction"
    },
    {
      "id": "property-gct-h",
      "ok": true,
      "kind": "property",
      "detail": "h=K v2²/(2g)",
      "expect": 0.006213607266760182,
      "actual": 0.006213607266760182
    },
    {
      "id": "property-gct-K",
      "ok": true,
      "kind": "property",
      "detail": "K=0.5 sin(α)(1−v1/v2)",
      "expect": 0.03046733585128687,
      "actual": 0.03046733585128687
    },
    {
      "id": "property-gct-roundtrip-v2",
      "ok": true,
      "kind": "property",
      "detail": "v2 invert",
      "expect": 2,
      "actual": 2
    },
    {
      "id": "property-gct-roundtrip-a",
      "ok": true,
      "kind": "property",
      "detail": "α invert",
      "expect": 7,
      "actual": 7
    },
    {
      "id": "property-gct-model",
      "ok": true,
      "kind": "property",
      "detail": "conical_contraction",
      "expect": true,
      "actual": "conical_contraction"
    }
  ],
  "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-17T11:28:31.444Z",
  "rendered_at": "2026-09-17T12:57:09.950Z",
  "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": "0a98a436c7ed1874662c57bbc57d7b0c8b8ea185ac938829de8b6e4821ae7cf2",
      "output_schema_sha256": "be306b8b13ebad159fcb431f1d9ba3cdfacf9249ee684ec496d558e55a43da25",
      "evidence_sha256": "d99efbff881b220ac787c8ebf6c7ec33d3818cec2ff469fb400a2f9d724b3616",
      "evidence_core_sha256": "d99efbff881b220ac787c8ebf6c7ec33d3818cec2ff469fb400a2f9d724b3616",
      "capability_sha256": "b0113459bf0afc4f910f031e95af35993724f301a981c144f083ee9239118994",
      "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"
  }
}
