{
  "capability_id": "physics.fluid.mitered_bend",
  "tool_id": "mitered-bend",
  "engine": "mitered-bend",
  "calculation_version": "1.0.0",
  "generated_at": "2026-09-17T14:46:34.520Z",
  "engine_build": "2026-09-17",
  "test_count": 15,
  "passed": 15,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 2,
      "passed": 2
    },
    "boundary": {
      "total": 8,
      "passed": 8
    },
    "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/mitered-bend",
  "api": "https://www.calculatorx.com/api/v1/calc/mitered-bend",
  "schema_input": "https://www.calculatorx.com/schemas/physics.fluid.mitered_bend.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/physics.fluid.mitered_bend.output.json",
  "assumptions": [
    "Sharp segmented miter: h = K v² / (2g); K = n [sin²(δ/2) + 2 sin⁴(δ/2)], δ = θ/n; K is reported, not an input",
    "Require n ≥ 1 integer, 0 < θ ≤ 180°, and each miter δ ≤ 90° (n=1 therefore θ ≤ 90°); default g=9.80665 m/s²; default ρ=1000 kg/m³; incompressible",
    "Not circular-arc R/D, not minor-loss K given, not Crane f_T, not Darcy f, not orifice C_d, not Q=Av"
  ],
  "limitations": [
    "Sharp segmented miter: h = K v² / (2g); K = n [sin²(δ/2) + 2 sin⁴(δ/2)], δ = θ/n; K is reported, not an input",
    "Require n ≥ 1 integer, 0 < θ ≤ 180°, and each miter δ ≤ 90° (n=1 therefore θ ≤ 90°); default g=9.80665; default ρ=1000 for Δp; incompressible",
    "Not circular-arc R/D, not minor-loss K given, not Crane f_T, not Darcy f, not orifice C_d, not Q=Av"
  ],
  "boundary_conditions": [
    "missing v_m_s, h, θ, or n_miters when required → MISSING_REQUIRED_INPUT",
    "v_m_s ≤ 0, h ≤ 0, θ ≤ 0, or n_miters ≤ 0 → VALUE_MUST_BE_POSITIVE",
    "non-integer n, each miter > 90°, or θ > 180° → VALUE_OUT_OF_RANGE",
    "K, k, rd, f/f_T/Re, Q, C_d, v1/v2, alpha_deg → MIXED_INPUT_ENCODING",
    "circular, 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": "Sharp-edged / mitered elbows",
      "supports": "Preliminary sharp-miter estimate ζ = sin²(δ/2) + 2 sin⁴(δ/2) per miter; n equal miters sum. Not circular-arc B1, not Crane f_T",
      "kind": "reference"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:99f9511326866f2162f5a6a1603582896c69b5adebc5d3e4db16e25ed2dd8fc4",
  "tests": [
    {
      "id": "golden-mit-h",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "v_m_s": 2,
        "theta_deg": 90,
        "n_miters": 1
      },
      "expect": {
        "h": 0.2039432425955856,
        "v": 2,
        "K": 0.9999999999999997,
        "n": 1,
        "dP": 1999.9999999999993,
        "mode": "head",
        "model": "segmented_miter"
      },
      "expectWarning": null,
      "actual": {
        "mode": "head",
        "h": 0.2039432425955856,
        "v": 2,
        "K": 0.9999999999999997,
        "theta": 1.5707963267948966,
        "theta_deg": 90,
        "n": 1,
        "g": 9.80665,
        "rho": 1000,
        "dP": 1999.9999999999993,
        "model": "segmented_miter"
      },
      "tol": 1e-12
    },
    {
      "id": "golden-mit-dP",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "pressure",
        "v_m_s": 2,
        "theta_deg": 90,
        "n_miters": 1
      },
      "expect": {
        "dP": 1999.9999999999993,
        "model": "segmented_miter"
      },
      "expectWarning": null,
      "actual": {
        "mode": "pressure",
        "h": 0.2039432425955856,
        "v": 2,
        "K": 0.9999999999999997,
        "theta": 1.5707963267948966,
        "theta_deg": 90,
        "n": 1,
        "g": 9.80665,
        "rho": 1000,
        "dP": 1999.9999999999993,
        "model": "segmented_miter"
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-mit-v",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "velocity",
        "h": 0.2039432425955856,
        "theta_deg": 90,
        "n_miters": 1
      },
      "expect": {
        "v": 2,
        "model": "segmented_miter"
      },
      "expectWarning": null,
      "actual": {
        "mode": "velocity",
        "h": 0.2039432425955856,
        "v": 2,
        "K": 0.9999999999999997,
        "theta": 1.5707963267948966,
        "theta_deg": 90,
        "n": 1,
        "g": 9.80665,
        "rho": 1000,
        "dP": 1999.9999999999993,
        "model": "segmented_miter"
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-mit-theta",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "angle",
        "v_m_s": 2,
        "h": 0.2039432425955856,
        "n_miters": 1
      },
      "expect": {
        "theta_deg": 90,
        "model": "segmented_miter"
      },
      "expectWarning": null,
      "actual": {
        "mode": "angle",
        "h": 0.2039432425955856,
        "v": 2,
        "K": 0.9999999999999997,
        "theta": 1.5707963267948963,
        "theta_deg": 89.99999999999999,
        "n": 1,
        "g": 9.80665,
        "rho": 1000,
        "dP": 1999.9999999999993,
        "model": "segmented_miter"
      },
      "tol": 1e-9
    },
    {
      "id": "boundary-mit-missing",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "v_m_s": 2,
        "theta_deg": 90
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "n_miters is required"
    },
    {
      "id": "boundary-mit-K",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "v_m_s": 2,
        "theta_deg": 90,
        "n_miters": 1,
        "K": 0.9
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Mitered bend does not take minor-loss K. That is /calc/physics/minor-loss. K = n [sin²(δ/2)+2 sin⁴(δ/2)] is reported"
    },
    {
      "id": "boundary-mit-rd",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "v_m_s": 2,
        "theta_deg": 90,
        "n_miters": 1,
        "rd": 2
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Mitered bend does not take R/D. Circular-arc is /calc/physics/pipe-bend. Send n_miters"
    },
    {
      "id": "boundary-mit-mode",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "v_m_s": 2,
        "theta_deg": 90,
        "n_miters": 1,
        "mode": "circular"
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "mode must be head|pressure|velocity|angle. Not circular-arc, minor-loss, Darcy, or Q=Av"
    },
    {
      "id": "boundary-mit-zero",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "v_m_s": 0,
        "theta_deg": 90,
        "n_miters": 1
      },
      "expectError": "VALUE_MUST_BE_POSITIVE",
      "code": "VALUE_MUST_BE_POSITIVE",
      "error": "v_m_s must be greater than zero"
    },
    {
      "id": "boundary-mit-wide",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "v_m_s": 2,
        "theta_deg": 91,
        "n_miters": 1
      },
      "expectError": "VALUE_OUT_OF_RANGE",
      "code": "VALUE_OUT_OF_RANGE",
      "error": "Each miter must be ≤ 90°. n=1 is a single miter, so θ ≤ 90°. Use more miters or /calc/physics/pipe-bend"
    },
    {
      "id": "property-mit-h",
      "ok": true,
      "kind": "property",
      "detail": "h=K v²/(2g)",
      "expect": 0.2039432425955856,
      "actual": 0.2039432425955856
    },
    {
      "id": "property-mit-K",
      "ok": true,
      "kind": "property",
      "detail": "K=n [sin²(δ/2)+2 sin⁴(δ/2)]",
      "expect": 0.9999999999999997,
      "actual": 0.9999999999999997
    },
    {
      "id": "property-mit-roundtrip-v",
      "ok": true,
      "kind": "property",
      "detail": "v invert",
      "expect": 2,
      "actual": 2
    },
    {
      "id": "property-mit-roundtrip-t",
      "ok": true,
      "kind": "property",
      "detail": "θ invert",
      "expect": 90,
      "actual": 89.99999999999999
    },
    {
      "id": "property-mit-model",
      "ok": true,
      "kind": "property",
      "detail": "segmented_miter",
      "expect": true,
      "actual": "segmented_miter"
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 15,
      "total": 15,
      "golden": 2,
      "boundary": 8,
      "property": 5
    },
    "contract_checks": {
      "passed": 3,
      "total": 3
    }
  },
  "evidence_core_generated_at": "2026-09-17T14:07:06.837Z",
  "rendered_at": "2026-09-17T14:46:34.520Z",
  "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": "2a585ff14b0fb55cb0fca1fbcb79a7b0a1bf7878c9933b4ae746e820b325be78",
      "output_schema_sha256": "dcdb1f5772e168f21be9b20a55b03a3221938604bcfd7843f5c05b99e5cc2528",
      "evidence_sha256": "bb5b3136daf79b4a0d3fe8a7b2d6fd6963345b5005a56ac263731480c9bf0b7f",
      "evidence_core_sha256": "bb5b3136daf79b4a0d3fe8a7b2d6fd6963345b5005a56ac263731480c9bf0b7f",
      "capability_sha256": "11669f9e1178fd8e3d20f87e4c2fa937eca8a249509d8d01ab26db9903d9bb53",
      "engine_sha256": "874f411844f83d688e44ba513ac5dfeedc8229a4d525047423a1adce688aecc0",
      "mcp_contract_sha256": "8e3f4d63fc73fac8f314b2f86fa538da1bbc4d670af5f11ee7a7d9cf66dca709"
    },
    "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"
  }
}
