{
  "capability_id": "electrical.battery_runtime",
  "tool_id": "battery-runtime",
  "engine": "battery-runtime",
  "calculation_version": "1.2.1",
  "generated_at": "2026-09-16T22:03:43.711Z",
  "engine_build": "2026-09-12",
  "test_count": 25,
  "passed": 25,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 5,
      "passed": 5
    },
    "boundary": {
      "total": 10,
      "passed": 10
    },
    "property": {
      "total": 10,
      "passed": 10
    }
  },
  "engine_tested": true,
  "expert_reviewed": false,
  "internally_reviewed": true,
  "review_kind": "internal",
  "source_checked": true,
  "reviewed_by": "CalculatorX electrical review",
  "reviewer_role": "electrical-engineer",
  "last_reviewed": "2026-08-12",
  "expert_review": {
    "status": "not_applicable",
    "reviewer": null,
    "note": "Internal domain review completed; not a named external expert review.",
    "kind": "internal"
  },
  "internal_review": {
    "status": "approved",
    "reviewer": {
      "name": "CalculatorX electrical review",
      "role": "electrical-engineer"
    },
    "reviewed_at": "2026-08-12",
    "scope": [
      "formula",
      "input semantics",
      "assumptions",
      "limitations",
      "sources",
      "tests"
    ],
    "kind": "internal"
  },
  "page": "https://www.calculatorx.com/calc/electric/battery-runtime",
  "api": "https://www.calculatorx.com/api/v1/calc/battery-runtime",
  "schema_input": "https://www.calculatorx.com/schemas/electrical.battery_runtime.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/electrical.battery_runtime.output.json",
  "assumptions": [
    "Constant load; ideal flat voltage until capacity is exhausted.",
    "DoD and η are independent planning knobs, not chemistry models.",
    "Amps mode I_A is battery-side discharge current; η does not enter t_h.",
    "When u_* are set, first-order GUM sensitivity with independent inputs (no ρ on this page)."
  ],
  "limitations": [
    "Constant-load idealization only — not Peukert, temperature, or BMS cutoffs",
    "Not a substitute for manufacturer runtime curves or pack design",
    "Amps mode = battery-side discharge current; η does not enter runtime",
    "capacity_Ah XOR capacity_mAh; both → INVALID_INPUT",
    "Missing capacity → MISSING_REQUIRED_INPUT; P_W/I_A ≤ 0 → LOAD_MUST_BE_POSITIVE",
    "dod/eta outside (0,1] → FRACTION_OUT_OF_RANGE",
    "mode=watts requires P_W; mode=amps requires I_A",
    "Optional u_* use GUM sensitivity only (no MC/ρ/νeff UI); empty u_* preserves nominal-only result",
    "Response inputs[] is mode-canonical (capacity_Ah only; amps omits eta)",
    "Basic frozen at calculation_version 1.2.1 — Agent schema requires u_* when uncertainty_k/confidence is set; do not stack Peukert/temperature/duty-cycle into this capability"
  ],
  "boundary_conditions": [
    "Missing capacity → MISSING_REQUIRED_INPUT",
    "Both capacity_Ah and capacity_mAh → INVALID_INPUT",
    "V ≤ 0 → VOLTAGE_MUST_BE_POSITIVE",
    "P_W/I_A ≤ 0 → LOAD_MUST_BE_POSITIVE",
    "dod/eta outside (0,1] → FRACTION_OUT_OF_RANGE",
    "Unknown mode → INVALID_MODE",
    "uncertainty_k without any u_* → INVALID_INPUT",
    "uncertainty_k and confidence together → INVALID_INPUT"
  ],
  "sources": [
    {
      "title": "IEC 60050 — International Electrotechnical Vocabulary",
      "section": "Electric battery capacity and related quantities",
      "supports": "Ah capacity and Wh energy relationship E ≈ Q·V for nominal estimates",
      "kind": "standard"
    },
    {
      "title": "IEC 61960 series (portable secondary lithium)",
      "section": "Capacity / performance concepts for portable Li cells and batteries",
      "supports": "Nameplate capacity language for portable secondary lithium; not a lead-acid Peukert model",
      "kind": "standard"
    },
    {
      "title": "Victron Energy — Battery capacity and Peukert exponent",
      "section": "Battery monitor documentation (BMV)",
      "url": "https://www.victronenergy.com/media/pg/BMV-700H/en/battery-capacity-and-peukert-exponent.html",
      "supports": "Why usable Ah falls with discharge rate; Peukert as reason simple Ah×V estimates differ from field runtime",
      "kind": "reference"
    },
    {
      "title": "NIST Guide to the SI (SP 811)",
      "section": "Coherent derived units for energy and time",
      "url": "https://www.nist.gov/pml/special-publication-811",
      "supports": "Wh and hour as energy/time units in estimates",
      "kind": "reference"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:3b0e76941fc911bb9e5160ec017c84886abbc569b41622121932a6d930cc0583",
  "tests": [
    {
      "id": "ideal-6h",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "watts",
        "capacity_Ah": 10,
        "V": 12,
        "P_W": 20,
        "dod": 1,
        "eta": 1
      },
      "expect": {
        "t_h": 6,
        "t_d": 0.25,
        "E_Wh": 120
      },
      "expectWarning": null,
      "actual": {
        "t_h": 6,
        "t_d": 0.25,
        "E_Wh": 120
      },
      "tol": 1e-9
    },
    {
      "id": "dod-eta-4.32h",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "watts",
        "capacity_Ah": 10,
        "V": 12,
        "P_W": 20,
        "dod": 0.8,
        "eta": 0.9
      },
      "expect": {
        "t_h": 4.32,
        "E_Wh": 86.4
      },
      "expectWarning": null,
      "actual": {
        "t_h": 4.32,
        "t_d": 0.18000000000000002,
        "E_Wh": 86.4
      },
      "tol": 1e-9
    },
    {
      "id": "mah-alias",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "watts",
        "capacity_mAh": 5000,
        "V": 3.7,
        "P_W": 1
      },
      "expect": {
        "t_h": 18.5,
        "E_Wh": 18.5
      },
      "expectWarning": null,
      "actual": {
        "t_h": 18.5,
        "t_d": 0.7708333333333334,
        "E_Wh": 18.5
      },
      "tol": 1e-9
    },
    {
      "id": "amps-5h",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "amps",
        "capacity_Ah": 10,
        "V": 12,
        "I_A": 2
      },
      "expect": {
        "t_h": 5,
        "E_Wh": 120
      },
      "expectWarning": null,
      "actual": {
        "t_h": 5,
        "t_d": 0.20833333333333334,
        "E_Wh": 120
      },
      "tol": 1e-9
    },
    {
      "id": "amps-eta-ignored",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "amps",
        "capacity_Ah": 10,
        "V": 12,
        "I_A": 2,
        "dod": 0.8,
        "eta": 0.9
      },
      "expect": {
        "t_h": 4,
        "E_Wh": 96
      },
      "expectWarning": null,
      "actual": {
        "t_h": 4,
        "t_d": 0.16666666666666666,
        "E_Wh": 96,
        "warnings": [
          {
            "code": "ETA_IGNORED_IN_AMPS_MODE",
            "severity": "info",
            "detail": "Amps mode treats I_A as battery-side discharge current; η does not enter runtime (avoids double-counting converter loss).",
            "suggestion": "Use watts mode with load-side P_W when applying system efficiency η."
          }
        ]
      },
      "tol": 1e-9
    },
    {
      "id": "both-capacities",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "watts",
        "capacity_Ah": 10,
        "capacity_mAh": 5000,
        "V": 12,
        "P_W": 20
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "provide either capacity_Ah or capacity_mAh, not both"
    },
    {
      "id": "missing-capacity",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "watts",
        "V": 12,
        "P_W": 20
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "capacity_Ah is required"
    },
    {
      "id": "zero-V",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "watts",
        "capacity_Ah": 10,
        "V": 0,
        "P_W": 20
      },
      "expectError": "VOLTAGE_MUST_BE_POSITIVE",
      "code": "VOLTAGE_MUST_BE_POSITIVE",
      "error": "V must be greater than zero"
    },
    {
      "id": "zero-load",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "watts",
        "capacity_Ah": 10,
        "V": 12,
        "P_W": 0
      },
      "expectError": "LOAD_MUST_BE_POSITIVE",
      "code": "LOAD_MUST_BE_POSITIVE",
      "error": "P_W must be greater than zero"
    },
    {
      "id": "dod-out",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "watts",
        "capacity_Ah": 10,
        "V": 12,
        "P_W": 20,
        "dod": 1.2
      },
      "expectError": "FRACTION_OUT_OF_RANGE",
      "code": "FRACTION_OUT_OF_RANGE",
      "error": "dod must be in (0, 1]"
    },
    {
      "id": "invalid-mode",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "dc",
        "capacity_Ah": 10,
        "V": 12,
        "P_W": 20
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "mode must be \"watts\" or \"amps\""
    },
    {
      "id": "boundary-dod-eta",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "watts",
        "capacity_Ah": 10,
        "V": 12,
        "P_W": 20,
        "dod": 0.8,
        "eta": 0.9
      },
      "expect": {
        "t_h": 4.32,
        "t_d": 0.18000000000000002,
        "E_Wh": 86.4
      },
      "expectWarning": null,
      "actual": {
        "t_h": 4.32,
        "t_d": 0.18000000000000002,
        "E_Wh": 86.4
      },
      "tol": 1e-9
    },
    {
      "id": "boundary-amps-mode",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "amps",
        "capacity_Ah": 10,
        "V": 12,
        "I_A": 2,
        "dod": 1,
        "eta": 1
      },
      "expect": {
        "t_h": 5,
        "E_Wh": 120
      },
      "expectWarning": null,
      "actual": {
        "t_h": 5,
        "t_d": 0.20833333333333334,
        "E_Wh": 120
      },
      "tol": 1e-9
    },
    {
      "id": "boundary-unc-capacity",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "watts",
        "capacity_Ah": 10,
        "V": 12,
        "P_W": 20,
        "dod": 0.8,
        "eta": 0.9,
        "u_capacity_Ah": 0.5,
        "u_P_W": 1
      },
      "expect": {
        "t_h": 4.32,
        "E_Wh": 86.4
      },
      "expectWarning": null,
      "actual": {
        "t_h": 4.32,
        "t_d": 0.18000000000000002,
        "E_Wh": 86.4,
        "uncertainty": {
          "y": 4.32,
          "u_c": 0.30547012947258856,
          "U": 0.6109402589451771,
          "k": 2,
          "k_source": "user",
          "coverage": null,
          "unit": "h",
          "u_rel": 0.07071067811865475,
          "mode": "sensitivity",
          "contributions": [
            {
              "i": 0,
              "label": "capacity_Ah",
              "c": 0.43200000000000005,
              "u": 0.5,
              "variance": 0.04665600000000001,
              "percent": 50,
              "type": null,
              "nu": null
            },
            {
              "i": 1,
              "label": "P_W",
              "c": -0.21600000000000003,
              "u": 1,
              "variance": 0.04665600000000001,
              "percent": 50,
              "type": null,
              "nu": null
            }
          ],
          "largest": {
            "i": 0,
            "label": "capacity_Ah",
            "percent": 50
          },
          "reported": {
            "u_c": 0.31,
            "y": 4.32,
            "significant_digits": 2,
            "decimal_places": 2,
            "formatted_u_c": "0.31",
            "formatted_y": "4.32",
            "k": 2,
            "U": 0.61,
            "formatted_U": "0.61"
          },
          "capability_id": "engineering.uncertainty.propagate"
        }
      },
      "tol": 1e-9
    },
    {
      "id": "boundary-unc-k-without-u",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "watts",
        "capacity_Ah": 10,
        "V": 12,
        "P_W": 20,
        "uncertainty_k": 2
      },
      "expectError": "INVALID_INPUT",
      "code": "INVALID_INPUT",
      "error": "uncertainty_k requires at least one u_* input"
    },
    {
      "id": "property-ideal",
      "ok": true,
      "kind": "property",
      "detail": "10Ah·12V·20W → 6h",
      "expect": {
        "t_h": 6,
        "E_Wh": 120
      },
      "actual": {
        "t_h": 6,
        "t_d": 0.25,
        "E_Wh": 120
      }
    },
    {
      "id": "property-double-load",
      "ok": true,
      "kind": "property",
      "detail": "2×P → ½t",
      "expect": 3,
      "actual": 3
    },
    {
      "id": "property-double-cap",
      "ok": true,
      "kind": "property",
      "detail": "2×Ah → 2×t",
      "expect": 12,
      "actual": 12
    },
    {
      "id": "property-amps",
      "ok": true,
      "kind": "property",
      "detail": "10Ah / 2A → 5h",
      "expect": {
        "t_h": 5,
        "E_Wh": 120
      },
      "actual": {
        "t_h": 5,
        "t_d": 0.20833333333333334,
        "E_Wh": 120
      }
    },
    {
      "id": "property-amps-eta-ignored",
      "ok": true,
      "kind": "property",
      "detail": "amps: η ignored → t=(Ah·DoD)/I",
      "expect": {
        "t_h": 4,
        "E_Wh": 96
      },
      "actual": {
        "t_h": 4,
        "t_d": 0.16666666666666666,
        "E_Wh": 96,
        "warnings": [
          {
            "code": "ETA_IGNORED_IN_AMPS_MODE",
            "severity": "info",
            "detail": "Amps mode treats I_A as battery-side discharge current; η does not enter runtime (avoids double-counting converter loss).",
            "suggestion": "Use watts mode with load-side P_W when applying system efficiency η."
          }
        ]
      }
    },
    {
      "id": "property-mah-alias",
      "ok": true,
      "kind": "property",
      "detail": "10000 mAh ≡ 10 Ah",
      "expect": 6,
      "actual": 6
    },
    {
      "id": "property-days",
      "ok": true,
      "kind": "property",
      "detail": "t_d = t_h/24",
      "expect": 0.25,
      "actual": 0.25
    },
    {
      "id": "property-capacity-xor",
      "ok": true,
      "kind": "property",
      "detail": "capacity_Ah XOR capacity_mAh",
      "expect": "INVALID_INPUT",
      "actual": "INVALID_INPUT"
    },
    {
      "id": "property-uncertainty-compose",
      "ok": true,
      "kind": "property",
      "detail": "u_* → sensitivity U=k·u_c on t_h",
      "expect": {
        "t_h": 4.32,
        "u_c": 0.3054701294725885,
        "U": 0.610940258945177
      },
      "actual": {
        "y": 4.32,
        "u_c": 0.30547012947258856,
        "U": 0.6109402589451771,
        "k": 2,
        "k_source": "user",
        "coverage": null,
        "unit": "h",
        "u_rel": 0.07071067811865475,
        "mode": "sensitivity",
        "contributions": [
          {
            "i": 0,
            "label": "capacity_Ah",
            "c": 0.43200000000000005,
            "u": 0.5,
            "variance": 0.04665600000000001,
            "percent": 50,
            "type": null,
            "nu": null
          },
          {
            "i": 1,
            "label": "P_W",
            "c": -0.21600000000000003,
            "u": 1,
            "variance": 0.04665600000000001,
            "percent": 50,
            "type": null,
            "nu": null
          }
        ],
        "largest": {
          "i": 0,
          "label": "capacity_Ah",
          "percent": 50
        },
        "reported": {
          "u_c": 0.31,
          "y": 4.32,
          "significant_digits": 2,
          "decimal_places": 2,
          "formatted_u_c": "0.31",
          "formatted_y": "4.32",
          "k": 2,
          "U": 0.61,
          "formatted_U": "0.61"
        },
        "capability_id": "engineering.uncertainty.propagate"
      }
    },
    {
      "id": "property-no-unc-omit",
      "ok": true,
      "kind": "property",
      "detail": "no u_* → no uncertainty object",
      "expect": null
    }
  ],
  "tier": "internally_reviewed",
  "verification": {
    "tests": {
      "passed": 25,
      "total": 25,
      "golden": 5,
      "boundary": 10,
      "property": 10
    },
    "contract_checks": {
      "passed": 6,
      "total": 6
    }
  },
  "evidence_core_generated_at": "2026-09-12T08:31:40.839Z",
  "rendered_at": "2026-09-16T22:03:43.711Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.2.1",
    "artifacts": {
      "engine": "1.2.1",
      "page": "1.2.1",
      "capability": "1.2.1",
      "evidence": "1.2.1",
      "input_schema": "1.2.1",
      "output_schema": "1.2.1",
      "mcp_contract": "1.2.1"
    },
    "digests": {
      "input_schema_sha256": "5673a4cc4dd654ce3bdd613dc2174cd5d5591604a43e73681c464862ffec5733",
      "output_schema_sha256": "86500ba515b67ff0044fb2eb13ae1eee5034f456be67655a1d650620b5010ee0",
      "evidence_sha256": "4a24a545607a874bdeda67fea9100bb59615dd7ff6a173c784814681612c8342",
      "evidence_core_sha256": "4a24a545607a874bdeda67fea9100bb59615dd7ff6a173c784814681612c8342",
      "capability_sha256": "a6dd6e482d6f1487f82ac58867aa33e49fa6e79de42c672f01b1b3603c9379ef",
      "engine_sha256": "c8d4ccdbfeaf61d7b024d4e1babb0c2ba3b324c1b37bd0cb456a526d8d2b1bd1",
      "mcp_contract_sha256": "863098b311a7b17dc4b229a6302b90b3545b175f716e5d84772c7be8e9716b86"
    },
    "contract_checks": {
      "total": 6,
      "passed": 6,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.2.1"
        },
        {
          "id": "schema-valid-input-executes",
          "status": "pass"
        },
        {
          "id": "engine-success-output-validates-schema",
          "status": "pass"
        },
        {
          "id": "schema-rejects-incomplete-input",
          "status": "pass"
        },
        {
          "id": "schema-coverage-requires-u",
          "status": "pass"
        },
        {
          "id": "schema-rejects-boundary-unc-k-without-u",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
