{
  "capability_id": "physics.fluid.minor_loss",
  "tool_id": "minor-loss",
  "engine": "minor-loss",
  "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/minor-loss",
  "api": "https://www.calculatorx.com/api/v1/calc/minor-loss",
  "schema_input": "https://www.calculatorx.com/schemas/physics.fluid.minor_loss.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/physics.fluid.minor_loss.output.json",
  "assumptions": [
    "h_m = K v² / (2g); g = 9.80665 m/s² unless given",
    "K is an empirical fitting coefficient; not Darcy f",
    "Not equivalent length L_eq = K D / f",
    "Not Hazen–Williams, not orifice, not Q=Av"
  ],
  "limitations": [
    "Minor loss h_m = K v² / (2g); optional Δp = ρ g h_m",
    "K is an empirical fitting coefficient; not Darcy f, not equivalent length",
    "Not Darcy–Weisbach, not Hazen–Williams, not orifice, not Q=Av"
  ],
  "boundary_conditions": [
    "missing K or v when required → MISSING_REQUIRED_INPUT",
    "v ≤ 0, or K < 0, or hm < 0 → VALUE_MUST_BE_POSITIVE or VALUE_OUT_OF_RANGE",
    "f, L, D, L_eq, C, n, C_d, Q, A, or Re → MIXED_INPUT_ENCODING",
    "darcy, hazen, orifice, or manning as mode → INVALID_MODE"
  ],
  "sources": [
    {
      "title": "ISO 80000-4 — Mechanics",
      "section": "Hydraulic head and kinetic energy",
      "url": "https://www.iso.org/standard/31895.html",
      "supports": "Head has dimension of length; dynamic head v²/(2g)",
      "kind": "standard"
    },
    {
      "title": "White, F.M. Fluid Mechanics",
      "section": "Minor losses in pipe systems",
      "supports": "h_m = K v²/(2g) for valves, bends, and fittings; K is empirical",
      "kind": "reference"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:33f090c0ef609888c5607ace8828864f3bb2f986b7d72cc111d73da15365e5d0",
  "tests": [
    {
      "id": "golden-ml-hm",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "K": 0.5,
        "v": 2
      },
      "expect": {
        "hm": 0.10197162129779283,
        "K": 0.5,
        "v": 2,
        "g": 9.80665,
        "mode": "head_loss",
        "model": "minor_loss"
      },
      "expectWarning": null,
      "actual": {
        "mode": "head_loss",
        "K": 0.5,
        "v": 2,
        "hm": 0.10197162129779283,
        "g": 9.80665,
        "model": "minor_loss"
      },
      "tol": 1e-12
    },
    {
      "id": "golden-ml-dp",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "K": 0.5,
        "v": 2,
        "rho": 1000
      },
      "expect": {
        "hm": 0.10197162129779283,
        "dP_Pa": 1000,
        "model": "minor_loss"
      },
      "expectWarning": null,
      "actual": {
        "mode": "head_loss",
        "K": 0.5,
        "v": 2,
        "hm": 0.10197162129779283,
        "g": 9.80665,
        "model": "minor_loss",
        "rho": 1000,
        "dP_Pa": 1000
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-ml-k",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "K",
        "v": 2,
        "hm": 0.10197162129779283
      },
      "expect": {
        "K": 0.5,
        "model": "minor_loss"
      },
      "expectWarning": null,
      "actual": {
        "mode": "K",
        "K": 0.5,
        "v": 2,
        "hm": 0.10197162129779283,
        "g": 9.80665,
        "model": "minor_loss"
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-ml-v",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "velocity",
        "K": 0.5,
        "hm": 0.10197162129779283
      },
      "expect": {
        "v": 2,
        "model": "minor_loss"
      },
      "expectWarning": null,
      "actual": {
        "mode": "velocity",
        "K": 0.5,
        "v": 2,
        "hm": 0.10197162129779283,
        "g": 9.80665,
        "model": "minor_loss"
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-ml-zero",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "K": 0,
        "v": 2
      },
      "expect": {
        "hm": 0,
        "model": "minor_loss"
      },
      "expectWarning": null,
      "actual": {
        "mode": "head_loss",
        "K": 0,
        "v": 2,
        "hm": 0,
        "g": 9.80665,
        "model": "minor_loss"
      },
      "tol": 1e-12
    },
    {
      "id": "boundary-ml-missing",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "K": 0.5
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "v is required"
    },
    {
      "id": "boundary-ml-v0",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "K": 0.5,
        "v": 0
      },
      "expectError": "VALUE_MUST_BE_POSITIVE",
      "code": "VALUE_MUST_BE_POSITIVE",
      "error": "v must be greater than zero"
    },
    {
      "id": "boundary-ml-kneg",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "K": -0.1,
        "v": 2
      },
      "expectError": "VALUE_OUT_OF_RANGE",
      "code": "VALUE_OUT_OF_RANGE",
      "error": "K must be ≥ 0"
    },
    {
      "id": "boundary-ml-f",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "K": 0.5,
        "v": 2,
        "f": 0.02
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Minor loss does not take Darcy f, L, D, or equivalent length. That is /calc/physics/darcy-weisbach"
    },
    {
      "id": "boundary-ml-c",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "K": 0.5,
        "v": 2,
        "C": 120
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Minor loss does not take Hazen–Williams C. Give K. That is /calc/physics/hazen-williams"
    },
    {
      "id": "boundary-ml-q",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "K": 0.5,
        "v": 2,
        "Q": 0.02
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Minor loss does not take Q or A. That is Q=Av. Give v"
    },
    {
      "id": "boundary-ml-darcy",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "K": 0.5,
        "v": 2,
        "mode": "darcy"
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "mode must be head_loss|K|velocity. Not Darcy, Hazen–Williams, orifice, or Q=Av"
    },
    {
      "id": "property-ml-hm",
      "ok": true,
      "kind": "property",
      "detail": "K v²/2g",
      "expect": 0.10197162129779283,
      "actual": 0.10197162129779283
    },
    {
      "id": "property-ml-dp",
      "ok": true,
      "kind": "property",
      "detail": "ρ K v²/2",
      "expect": 1000,
      "actual": 1000
    },
    {
      "id": "property-ml-roundtrip-k",
      "ok": true,
      "kind": "property",
      "detail": "K invert",
      "expect": 0.5,
      "actual": 0.5
    },
    {
      "id": "property-ml-v2",
      "ok": true,
      "kind": "property",
      "detail": "hm ∝ v²",
      "expect": 4,
      "actual": 4
    },
    {
      "id": "property-ml-model",
      "ok": true,
      "kind": "property",
      "detail": "minor_loss",
      "expect": true,
      "actual": "minor_loss"
    }
  ],
  "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-17T04:54:06.933Z",
  "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": "10e1af42f9870bab98a30432cd2130d4b540a9cd8f22704b4a56e1610014d442",
      "output_schema_sha256": "92bab7e73d2b4fe017c62d582bc2ccffa8ce7b804a5bf0e3b4289528fcaef9e2",
      "evidence_sha256": "489c8e83aabd18098830827bf3d2046ae73bb7c2f8453993bd85d82de9ab283d",
      "evidence_core_sha256": "489c8e83aabd18098830827bf3d2046ae73bb7c2f8453993bd85d82de9ab283d",
      "capability_sha256": "8efb4c0155f3a09af62715d95441dd66adacfb39be204685c3000cc016cabb0a",
      "engine_sha256": "577dd02827ddc989c9ec83548106b0de2da132cdaad4c2e72f4dc05cde6f3e07",
      "mcp_contract_sha256": "a0951a99ea7017485ae852239b46888380ab942a7571f6a90cc299bd18753be2"
    },
    "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"
  }
}
