{
  "capability_id": "electrical.power_factor",
  "tool_id": "power-factor",
  "engine": "power-factor",
  "calculation_version": "1.5.1",
  "generated_at": "2026-09-16T22:03:43.700Z",
  "engine_build": "2026-09-10",
  "test_count": 26,
  "passed": 26,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 10,
      "passed": 10
    },
    "boundary": {
      "total": 8,
      "passed": 8
    },
    "property": {
      "total": 8,
      "passed": 8
    }
  },
  "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/electric/power-factor",
  "api": "https://www.calculatorx.com/api/v1/calc/power-factor",
  "schema_input": "https://www.calculatorx.com/schemas/electrical.power_factor.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/electrical.power_factor.output.json",
  "assumptions": [
    "Sinusoidal RMS voltage and current magnitudes.",
    "Balanced three-phase when 3φ L-L or L-N modes are selected.",
    "Correction capacitor estimate (UI) fully offsets computed Q toward unity PF (idealized)."
  ],
  "limitations": [
    "Correction capacitor estimate is UI-only (not part of the API result)",
    "Not for harmonic-rich or engineered bank design",
    "When P > S, PF is capped at 1 and Q = 0 (soft clamp)",
    "Voltage must be > 0 (VOLTAGE_MUST_BE_POSITIVE); zero volts is not a valid S=0 shortcut"
  ],
  "boundary_conditions": [
    "V ≤ 0 → VOLTAGE_MUST_BE_POSITIVE",
    "Missing V/I/P_kW → MISSING_REQUIRED_INPUT",
    "Negative I or P_kW → VALUE_MUST_BE_NON_NEGATIVE",
    "Unknown mode → INVALID_MODE",
    "When P > S, PF capped at 1 and Q = 0 (soft clamp)",
    "I = 0 and P = 0 → S = 0, pf = 0 (valid)"
  ],
  "sources": [
    {
      "title": "IEC 60050 — International Electrotechnical Vocabulary",
      "section": "Apparent power (IEV 131-11-41)",
      "url": "https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=131-11-41",
      "supports": "S = U × I definition of apparent power; unit volt-ampere (VA / kVA)",
      "kind": "standard",
      "accessed": "2026-09-05",
      "clause": "IEV 131-11-41"
    },
    {
      "title": "IEC 60050 — International Electrotechnical Vocabulary",
      "section": "Reactive power (IEV 131-11-44)",
      "url": "https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=131-11-44",
      "supports": "Q = S sin φ under sinusoidal conditions; unit var / kVAR",
      "kind": "standard",
      "accessed": "2026-09-05",
      "clause": "IEV 131-11-44"
    },
    {
      "title": "IEC 60050 — International Electrotechnical Vocabulary",
      "section": "Power factor (IEV 131-11-46)",
      "url": "https://www.electropedia.org/iev/iev.nsf/display?openform&ievref=131-11-46",
      "supports": "λ = |P| / S; PF displayed as P/S (sinusoidal displacement factor cos φ when applicable)",
      "kind": "standard",
      "accessed": "2026-09-05",
      "clause": "IEV 131-11-46"
    },
    {
      "title": "IEEE Std 1459-2025",
      "section": "Power factor as P/S; apparent, active, and reactive power (S² = P² + Q²)",
      "url": "https://standards.ieee.org/ieee/1459/7578/",
      "supports": "PF = P/S; Q = √(S² − P²); capacitor sizing from Q and f",
      "kind": "standard",
      "accessed": "2026-09-05",
      "publisher": "IEEE",
      "published": "2025-05-16",
      "errata_checked": true
    },
    {
      "title": "BIPM SI Brochure (9th edition, version 4.01)",
      "section": "SI units related to electrical power",
      "url": "https://www.bipm.org/en/publications/si-brochure",
      "supports": "V, A, W relationships underlying kVA/kVAR scaling",
      "kind": "reference",
      "accessed": "2026-09-05",
      "published": "2026-06",
      "doi": "https://doi.org/10.59161/AUEZ1291"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:89a1b805a2d9a8d0f73adb83ec59a9c4dfad86e163aed81299e4e6b03b3972db",
  "tests": [
    {
      "id": "1phi-default",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "single",
        "V": 230,
        "I": 10,
        "P_kW": 1.8
      },
      "expect": {
        "S": 2.3,
        "pf": 0.7826
      },
      "expectWarning": null,
      "actual": {
        "S": 2.3,
        "pf": 0.782608695652174,
        "Q": 1.4317821063276353
      },
      "tol": 0.005
    },
    {
      "id": "1phi-unity",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "single",
        "V": 230,
        "I": 10,
        "P_kW": 2.3
      },
      "expect": {
        "S": 2.3,
        "pf": 1,
        "Q": 0
      },
      "expectWarning": null,
      "actual": {
        "S": 2.3,
        "pf": 1,
        "Q": 0
      },
      "tol": 0.005
    },
    {
      "id": "1phi-half-pf",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "single",
        "V": 230,
        "I": 10,
        "P_kW": 1.15
      },
      "expect": {
        "S": 2.3,
        "pf": 0.5
      },
      "expectWarning": null,
      "actual": {
        "S": 2.3,
        "pf": 0.5,
        "Q": 1.9918584287042087
      },
      "tol": 0.005
    },
    {
      "id": "1phi-p-gt-s-cap",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "single",
        "V": 230,
        "I": 10,
        "P_kW": 2.5
      },
      "expect": {
        "S": 2.3,
        "pf": 1,
        "Q": 0
      },
      "expectWarning": null,
      "actual": {
        "S": 2.3,
        "pf": 1,
        "Q": 0
      },
      "tol": 0.005
    },
    {
      "id": "error-zero-volts",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "single",
        "V": 0,
        "I": 10,
        "P_kW": 1.8
      },
      "expectError": "VOLTAGE_MUST_BE_POSITIVE",
      "code": "VOLTAGE_MUST_BE_POSITIVE",
      "error": "Voltage must be greater than zero"
    },
    {
      "id": "error-neg-P",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "single",
        "V": 230,
        "I": 10,
        "P_kW": -1
      },
      "expectError": "VALUE_MUST_BE_NON_NEGATIVE",
      "code": "VALUE_MUST_BE_NON_NEGATIVE",
      "error": "P_kW must be greater than or equal to 0"
    },
    {
      "id": "error-invalid-mode",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "dc",
        "V": 230,
        "I": 10,
        "P_kW": 1.8
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "mode must be \"single\", \"three-ll\", or \"three-ln\""
    },
    {
      "id": "error-missing-I",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "single",
        "V": 230,
        "P_kW": 1.8
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "I is required"
    },
    {
      "id": "soft-zero-power",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "single",
        "V": 230,
        "I": 10,
        "P_kW": 0
      },
      "expect": {
        "S": 2.3,
        "pf": 0
      },
      "expectWarning": null,
      "actual": {
        "S": 2.3,
        "pf": 0,
        "Q": 2.3
      },
      "tol": 0.005
    },
    {
      "id": "3phi-ll-half-current",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "three-ll",
        "V": 400,
        "I": 25,
        "P_kW": 15
      },
      "expect": {
        "S": 17.321,
        "pf": 0.866
      },
      "expectWarning": null,
      "actual": {
        "S": 17.32050807568877,
        "pf": 0.8660254037844387,
        "Q": 8.660254037844386
      },
      "tol": 0.01
    },
    {
      "id": "3phi-ll",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "three-ll",
        "V": 400,
        "I": 50,
        "P_kW": 30
      },
      "expect": {
        "S": 34.641,
        "pf": 0.866
      },
      "expectWarning": null,
      "actual": {
        "S": 34.64101615137754,
        "pf": 0.8660254037844387,
        "Q": 17.32050807568877
      },
      "tol": 0.01
    },
    {
      "id": "scale-2x-I-P",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "single",
        "V": 230,
        "I": 20,
        "P_kW": 3.6
      },
      "expect": {
        "S": 4.6,
        "pf": 0.7826
      },
      "expectWarning": null,
      "actual": {
        "S": 4.6,
        "pf": 0.782608695652174,
        "Q": 2.8635642126552705
      },
      "tol": 0.005
    },
    {
      "id": "3phi-ln",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "three-ln",
        "V": 230,
        "I": 10,
        "P_kW": 6
      },
      "expect": {
        "S": 6.9,
        "pf": 0.8696
      },
      "expectWarning": null,
      "actual": {
        "S": 6.9,
        "pf": 0.8695652173913043,
        "Q": 3.407345007480164
      },
      "tol": 0.005
    },
    {
      "id": "soft-zero-current",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "single",
        "V": 230,
        "I": 0,
        "P_kW": 0
      },
      "expect": {
        "S": 0,
        "pf": 0
      },
      "expectWarning": null,
      "actual": {
        "S": 0,
        "pf": 0,
        "Q": 0
      },
      "tol": 0.005
    },
    {
      "id": "boundary-zero-v-pf",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "single",
        "V": 0,
        "I": 10,
        "P_kW": 1
      },
      "expectError": "VOLTAGE_MUST_BE_POSITIVE",
      "code": "VOLTAGE_MUST_BE_POSITIVE",
      "error": "Voltage must be greater than zero"
    },
    {
      "id": "boundary-neg-v",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "single",
        "V": -230,
        "I": 10,
        "P_kW": 1.8
      },
      "expectError": "VOLTAGE_MUST_BE_POSITIVE",
      "code": "VOLTAGE_MUST_BE_POSITIVE",
      "error": "Voltage must be greater than zero"
    },
    {
      "id": "boundary-neg-I",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "single",
        "V": 230,
        "I": -10,
        "P_kW": 1.8
      },
      "expectError": "VALUE_MUST_BE_NON_NEGATIVE",
      "code": "VALUE_MUST_BE_NON_NEGATIVE",
      "error": "I must be greater than or equal to 0"
    },
    {
      "id": "boundary-missing-P",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "single",
        "V": 230,
        "I": 10
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "P_kW is required"
    },
    {
      "id": "property-unity-pf",
      "ok": true,
      "kind": "property",
      "detail": "P=S → λ=1",
      "expect": 1,
      "actual": 1
    },
    {
      "id": "property-half-pf",
      "ok": true,
      "kind": "property",
      "detail": "P=S/2 → λ=0.5",
      "expect": 0.5,
      "actual": 0.5
    },
    {
      "id": "property-3phi-S",
      "ok": true,
      "kind": "property",
      "detail": "3φ L-L: S=√3·V·I/1000",
      "expect": 6.928203230275509,
      "actual": 6.928203230275509
    },
    {
      "id": "property-power-triangle",
      "ok": true,
      "kind": "property",
      "detail": "Q² + P² = S²",
      "expect": 5.289999999999999,
      "actual": 5.289999999999999
    },
    {
      "id": "property-pf-cap",
      "ok": true,
      "kind": "property",
      "detail": "P>S → λ=1, Q=0",
      "expect": 1,
      "actual": 1
    },
    {
      "id": "property-scale-invariant-pf",
      "ok": true,
      "kind": "property",
      "detail": "2×I & 2×P keeps λ",
      "expect": 0.782608695652174,
      "actual": 0.782608695652174
    },
    {
      "id": "property-3phi-ln-S",
      "ok": true,
      "kind": "property",
      "detail": "3φ L-N: S=3·V·I/1000",
      "expect": 6.9,
      "actual": 6.9
    },
    {
      "id": "property-pf-grid",
      "ok": true,
      "kind": "property",
      "detail": "PF grid 9/9",
      "expect": 9,
      "actual": 9
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 26,
      "total": 26,
      "golden": 10,
      "boundary": 8,
      "property": 8
    },
    "contract_checks": {
      "passed": 4,
      "total": 4
    }
  },
  "evidence_core_generated_at": "2026-09-10T22:48:17.762Z",
  "rendered_at": "2026-09-16T22:03:43.700Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.5.1",
    "artifacts": {
      "engine": "1.5.1",
      "page": "1.5.1",
      "capability": "1.5.1",
      "evidence": "1.5.1",
      "input_schema": "1.5.1",
      "output_schema": "1.5.1",
      "mcp_contract": "1.5.1"
    },
    "digests": {
      "input_schema_sha256": "58f7124c7fa45a14a497899c2e332e231b44ed54732eafc036000d910742d5cb",
      "output_schema_sha256": "033f5d62f827aa868e68783f3c570dd404f88eb2ad51504f45fb99dbbd307933",
      "evidence_sha256": "b85468f059cdbd97e78e62032b69261981f343cca92a2f62c5d0954af1016054",
      "evidence_core_sha256": "b85468f059cdbd97e78e62032b69261981f343cca92a2f62c5d0954af1016054",
      "capability_sha256": "51cb87442e726828edd21f7ee48a8e5babc40bc090485bece1282978ee5b00fa",
      "engine_sha256": "c8d4ccdbfeaf61d7b024d4e1babb0c2ba3b324c1b37bd0cb456a526d8d2b1bd1",
      "mcp_contract_sha256": "863098b311a7b17dc4b229a6302b90b3545b175f716e5d84772c7be8e9716b86"
    },
    "contract_checks": {
      "total": 4,
      "passed": 4,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.5.1"
        },
        {
          "id": "schema-valid-input-executes",
          "status": "pass"
        },
        {
          "id": "engine-success-output-validates-schema",
          "status": "pass"
        },
        {
          "id": "schema-rejects-incomplete-input",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
