{
  "capability_id": "chemistry.equilibrium.weak_acid",
  "tool_id": "weak-acid-equilibrium",
  "engine": "weak-acid-equilibrium",
  "calculation_version": "1.0.0",
  "generated_at": "2026-09-17T02:45:35.819Z",
  "engine_build": "2026-09-17",
  "test_count": 12,
  "passed": 12,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 2,
      "passed": 2
    },
    "boundary": {
      "total": 5,
      "passed": 5
    },
    "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/chemistry/weak-acid-equilibrium",
  "api": "https://www.calculatorx.com/api/v1/calc/weak-acid-equilibrium",
  "schema_input": "https://www.calculatorx.com/schemas/chemistry.equilibrium.weak_acid.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/chemistry.equilibrium.weak_acid.output.json",
  "assumptions": [
    "Monoprotic HA ⇌ H+ + A−",
    "Activity coefficients ≈ 1",
    "Kw = 1e-14 at 25 °C when mode=ice",
    "Not Henderson–Hasselbalch",
    "Not pH = −log10[H+] identities",
    "Not polyprotic, not a weak base, not titration"
  ],
  "limitations": [
    "Monoprotic HA only; not polyprotic, not a weak base, not activity coefficients",
    "Not Henderson–Hasselbalch (buffer pair as given)",
    "Not the water-ion identity page pH=−log10[H+]",
    "Kw = 1e-14 at 25 °C when mode=ice"
  ],
  "boundary_conditions": [
    "missing C → MISSING_REQUIRED_INPUT",
    "C ≤ 0 or Ka ≤ 0 → VALUE_MUST_BE_POSITIVE",
    "pKa and Ka together → MIXED_INPUT_ENCODING",
    "hh_ph is not a mode on this page"
  ],
  "sources": [
    {
      "title": "OpenStax Chemistry 2e — Weak Acids",
      "section": "Equilibrium of a weak acid",
      "url": "https://openstax.org/books/chemistry-2e/pages/14-3-relative-strengths-of-acids-and-bases",
      "supports": "Ka = [H+][A−]/[HA]; ICE from formal C; dilute water may include Kw",
      "kind": "reference"
    },
    {
      "title": "IUPAC Gold Book — acid dissociation constant",
      "section": "acidity constant",
      "url": "https://goldbook.iupac.org/terms/view/A00080",
      "supports": "Ka is the equilibrium constant for HA ⇌ H+ + A−",
      "kind": "standard"
    }
  ],
  "methods": [],
  "fingerprint": "sha256:0487fdb858a23b1d782f18415e706a34132a45f9e48fe10d08e4dfbbf371dd0c",
  "tests": [
    {
      "id": "golden-ice-no-water",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "C": 0.1,
        "Ka": 0.000018,
        "mode": "ice_no_water"
      },
      "expect": {
        "h": 0.001332670973077975,
        "A": 0.001332670973077975,
        "model": "weak_acid_ice",
        "include_water": false
      },
      "expectWarning": null,
      "actual": {
        "mode": "ice_no_water",
        "pH": 2.8752770612235934,
        "h": 0.00133267097408,
        "HA": 0.09866732902592,
        "A": 0.00133267097408,
        "oh": 7.503727622568977e-12,
        "C": 0.1,
        "Ka": 0.000018,
        "pKa": 4.7447274948966935,
        "fraction_dissociated": 0.0133267097408,
        "Kw": 1e-14,
        "pKw": 14,
        "T_C": 25,
        "model": "weak_acid_ice",
        "include_water": false,
        "solver": {
          "method": "bisection",
          "iterations": 33,
          "residual": 2.68775200867e-15
        }
      },
      "tol": 1e-8
    },
    {
      "id": "golden-ice-water",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "C": 0.1,
        "Ka": 0.000018
      },
      "expect": {
        "model": "weak_acid_ice",
        "include_water": true,
        "C": 0.1
      },
      "expectWarning": null,
      "actual": {
        "mode": "ice",
        "pH": 2.875276773863538,
        "h": 0.00133267185587,
        "HA": 0.09866732815163373,
        "A": 0.0013326718483662773,
        "oh": 7.503722657571816e-12,
        "C": 0.1,
        "Ka": 0.000018,
        "pKa": 4.7447274948966935,
        "fraction_dissociated": 0.013326718483662773,
        "Kw": 1e-14,
        "pKw": 14,
        "T_C": 25,
        "model": "weak_acid_ice",
        "include_water": true,
        "solver": {
          "method": "bisection",
          "iterations": 24,
          "residual": 3.14336051842e-15
        }
      },
      "tol": 1e-8
    },
    {
      "id": "boundary-ice-pka",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "C": 0.1,
        "pKa": 5
      },
      "expect": {
        "pKa": 5,
        "model": "weak_acid_ice"
      },
      "expectWarning": null,
      "actual": {
        "mode": "ice",
        "pH": 3.0021707531304345,
        "h": 0.000995014127135,
        "HA": 0.09900498588291512,
        "A": 0.0009950141170848915,
        "oh": 1.0050108563577444e-11,
        "C": 0.1,
        "Ka": 0.000009999999999999999,
        "pKa": 5,
        "fraction_dissociated": 0.009950141170848914,
        "Kw": 1e-14,
        "pKw": 14,
        "T_C": 25,
        "model": "weak_acid_ice",
        "include_water": true,
        "solver": {
          "method": "bisection",
          "iterations": 23,
          "residual": 3.22819381151e-15
        }
      },
      "tol": 1e-8
    },
    {
      "id": "boundary-ice-missing",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "Ka": 0.00001
      },
      "expectError": "MISSING_REQUIRED_INPUT",
      "code": "MISSING_REQUIRED_INPUT",
      "error": "C is required"
    },
    {
      "id": "boundary-ice-c",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "C": 0,
        "Ka": 0.00001
      },
      "expectError": "VALUE_MUST_BE_POSITIVE",
      "code": "VALUE_MUST_BE_POSITIVE",
      "error": "C must be greater than zero"
    },
    {
      "id": "boundary-ice-mixed",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "C": 0.1,
        "pKa": 5,
        "Ka": 0.00001
      },
      "expectError": "MIXED_INPUT_ENCODING",
      "code": "MIXED_INPUT_ENCODING",
      "error": "Use pKa or Ka, not both encodings"
    },
    {
      "id": "boundary-ice-hh",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "C": 0.1,
        "Ka": 0.00001,
        "mode": "hh_ph"
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "mode must be ice|ice_no_water"
    },
    {
      "id": "property-ice-quad",
      "ok": true,
      "kind": "property",
      "detail": "x^2+Ka x=Ka C",
      "expect": 0.001332670973077975,
      "actual": 0.00133267097408
    },
    {
      "id": "property-ice-mass",
      "ok": true,
      "kind": "property",
      "detail": "C=[HA]+[A−]",
      "expect": 0.1,
      "actual": 0.1
    },
    {
      "id": "property-ice-charge",
      "ok": true,
      "kind": "property",
      "detail": "[H+]=[A−]+[OH−]",
      "expect": 0.00133267185587,
      "actual": 0.00133267185587
    },
    {
      "id": "property-ice-model",
      "ok": true,
      "kind": "property",
      "detail": "weak_acid_ice",
      "expect": true,
      "actual": "weak_acid_ice"
    },
    {
      "id": "property-ice-pka",
      "ok": true,
      "kind": "property",
      "detail": "pKa encoding",
      "expect": 5,
      "actual": 5
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 12,
      "total": 12,
      "golden": 2,
      "boundary": 5,
      "property": 5
    },
    "contract_checks": {
      "passed": 4,
      "total": 4
    }
  },
  "evidence_core_generated_at": "2026-09-17T01:05:58.494Z",
  "rendered_at": "2026-09-17T02:45:35.819Z",
  "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": "60ff18a4d6d5899bf55418bf655d5702e0b089931be5ccb436fb0eafa61368bb",
      "output_schema_sha256": "3c2fb62806717f9fc7bcf1a90ffb2771dd11857fc3cb2809dae93fec150200b9",
      "evidence_sha256": "eafe1351c47fada6c85fddde4493eaac021c303eddb9a7f971ab91b4dae16c4e",
      "evidence_core_sha256": "eafe1351c47fada6c85fddde4493eaac021c303eddb9a7f971ab91b4dae16c4e",
      "capability_sha256": "0c3079f02e7993205a7c915760ce5bc636c5086b63878b1b5c14bf54a23b57af",
      "engine_sha256": "a3e8effccaf4677aec4d1da78c13b5dc595ff97e52b074d5de5ab5cb5a87b094",
      "mcp_contract_sha256": "a942c221699a25eb2b10fc462c0b321092558cb5ffda32cf521d31ee83e3fe87"
    },
    "contract_checks": {
      "total": 4,
      "passed": 4,
      "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"
        },
        {
          "id": "schema-rejects-incomplete-input",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
