{
  "schemaVersion": 1,
  "slug": "concrete-calculator",
  "category": "construction",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "e7580ac7376f7b9bc9a37d0504aacacd2b0c8c72a13d3825fee74595f627683c",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/concrete-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 × W × t ÷ 12 × (1 + w ÷ 100)",
    "vars": [
      [
        "L",
        "length in ft"
      ],
      [
        "W",
        "width in ft"
      ],
      [
        "t",
        "thickness in inches"
      ],
      [
        "w",
        "waste allowance in %"
      ],
      [
        "V",
        "volume in ft³"
      ]
    ],
    "note": "Rectangular slab/pad: V = L × W × t ÷ 12 × (1 + w/100). This does not model columns or narrow footings. Bag counts assume yields of 0.30, 0.45 and 0.60 ft³ for 40, 60 and 80 lb bags; check the selected product. Weight is a rough 145 lb/ft³ estimate."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const t = thicknessIn/12; const volume = length*width*t*(1+waste/100); const cy = volume/27; const yieldPerBag = (bagSize === 80 ? 0.6 : bagSize === 60 ? 0.45 : 0.3); return { cubicFeet: volume, cubicYards: cy, cubicMetres: cy*0.764555, bags: Math.ceil(volume/yieldPerBag), weightLb: volume*145 };",
    "inputs": [
      {
        "name": "length",
        "type": "number",
        "default": 10,
        "min": 0,
        "max": 1000,
        "step": 0.25,
        "slider": true
      },
      {
        "name": "width",
        "type": "number",
        "default": 10,
        "min": 0,
        "max": 1000,
        "step": 0.25,
        "slider": true
      },
      {
        "name": "thicknessIn",
        "type": "number",
        "default": 4,
        "min": 1,
        "max": 60,
        "step": 0.25,
        "slider": true
      },
      {
        "name": "waste",
        "type": "number",
        "default": 10,
        "min": 0,
        "max": 30,
        "step": 1,
        "slider": true
      },
      {
        "name": "bagSize",
        "type": "number",
        "default": 80,
        "min": 40,
        "max": 80,
        "step": 20
      }
    ],
    "outputs": [
      {
        "name": "cubicFeet",
        "precision": 2,
        "unit": "cu ft"
      },
      {
        "name": "cubicYards",
        "precision": 3,
        "unit": "cu yd"
      },
      {
        "name": "cubicMetres",
        "precision": 3,
        "unit": "m³"
      },
      {
        "name": "bags",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "weightLb",
        "precision": 0,
        "unit": "lb"
      }
    ],
    "interpret": null
  }
}
