{
  "schemaVersion": 1,
  "slug": "epoxy-calculator",
  "category": "diy-craft",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "20c67a4e2d23434f3239c3ad9a18050e812df891658848332a81ee4ab6525a36",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/epoxy-calculator.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "V(L) = A(ft²) × 0.092903 × T(mm) × (1 + w ÷ 100)",
    "vars": [
      [
        "A",
        "Area (ft²)"
      ],
      [
        "T",
        "Thickness (mm)"
      ],
      [
        "w",
        "Waste allowance (%)"
      ],
      [
        "V",
        "Total mixed volume (L)"
      ]
    ],
    "note": "A:B parts are by volume and must match the product label. A weight ratio needs density conversion; defaults are examples."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const sqm = area*0.092903; const litres = sqm*thickness*(1 + wastePct/100); const totalParts = ratioA + ratioB; return { volumeLitres: litres, volumeMillilitres: litres*1000, resinPart: litres*ratioA/totalParts, hardenerPart: litres*ratioB/totalParts, totalCost: litres*pricePerLitre, costPerSqFt: area > 0 ? litres*pricePerLitre/area : 0 };",
    "inputs": [
      {
        "name": "area",
        "type": "number",
        "default": 20,
        "min": 0.1,
        "max": 100000,
        "step": 0.1
      },
      {
        "name": "thickness",
        "type": "number",
        "default": 2,
        "min": 0.1,
        "max": 100,
        "step": 0.1,
        "slider": true
      },
      {
        "name": "ratioA",
        "type": "number",
        "default": 2,
        "min": 1,
        "max": 20,
        "step": 1,
        "slider": true
      },
      {
        "name": "ratioB",
        "type": "number",
        "default": 1,
        "min": 1,
        "max": 20,
        "step": 1,
        "slider": true
      },
      {
        "name": "pricePerLitre",
        "type": "number",
        "default": 30,
        "min": 0,
        "max": 10000,
        "step": 0.01
      },
      {
        "name": "wastePct",
        "type": "number",
        "default": 10,
        "min": 0,
        "max": 100,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "volumeLitres",
        "precision": 3,
        "unit": "l"
      },
      {
        "name": "volumeMillilitres",
        "precision": 0,
        "unit": "ml"
      },
      {
        "name": "resinPart",
        "precision": 3,
        "unit": "l"
      },
      {
        "name": "hardenerPart",
        "precision": 3,
        "unit": "l"
      },
      {
        "name": "totalCost",
        "precision": 2,
        "unit": "$"
      },
      {
        "name": "costPerSqFt",
        "precision": 2,
        "unit": "$"
      }
    ],
    "interpret": null
  }
}
