{
  "schemaVersion": 1,
  "slug": "firewood-calculator",
  "category": "household",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "47565274a964dd25b37c7bb68bd38a76c8eb48854475dab418d2bf6b760a0001",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/firewood-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": "C = (A × c × i ÷ 1000) ÷ (B × e ÷ 100); V_stack = 128 × C",
    "vars": [
      [
        "A",
        "heated area (sq ft)"
      ],
      [
        "c",
        "climate factor"
      ],
      [
        "i",
        "insulation factor"
      ],
      [
        "B",
        "million BTU per cord"
      ],
      [
        "e",
        "stove efficiency (%)"
      ],
      [
        "C",
        "cords needed"
      ]
    ],
    "note": "Illustrative dry-cord heat assumptions: softwood 16, mixed 20, hardwood 24 million BTU; actual species and moisture content vary. Climate/insulation factors are planning estimates, not a building heat-loss calculation. A full cord is 128 cu ft stacked; monthly cords = total ÷ heating months."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const insul = { poor: 1.6, average: 1.0, good: 0.7, excellent: 0.5 }[insulation] || 1; const clim = { mild: 20, moderate: 40, cold: 60, severe: 85 }[climate] || 40; const btuPerCord = { softwood: 16, mixed: 20, hardwood: 24 }[woodType] || 20; const demand = area*clim*insul/1000; const effective = btuPerCord*stoveEfficiency/100; const cords = effective > 0 ? demand/effective : 0; const monthly = monthsHeating > 0 ? cords/monthsHeating : 0; return { btuDemand: demand, cordsNeeded: cords, cost: cords*pricePerCord, btuPerCord: btuPerCord, monthlyCords: monthly, storageSpace: cords*128 };",
    "inputs": [
      {
        "name": "area",
        "type": "number",
        "default": 1800,
        "min": 100,
        "max": 20000,
        "step": 50,
        "slider": true
      },
      {
        "name": "insulation",
        "type": "select",
        "default": "average",
        "options": [
          {
            "value": "poor"
          },
          {
            "value": "average"
          },
          {
            "value": "good"
          },
          {
            "value": "excellent"
          }
        ]
      },
      {
        "name": "climate",
        "type": "select",
        "default": "moderate",
        "options": [
          {
            "value": "mild"
          },
          {
            "value": "moderate"
          },
          {
            "value": "cold"
          },
          {
            "value": "severe"
          }
        ]
      },
      {
        "name": "stoveEfficiency",
        "type": "number",
        "default": 70,
        "min": 10,
        "max": 100,
        "step": 5,
        "slider": true
      },
      {
        "name": "monthsHeating",
        "type": "number",
        "default": 6,
        "min": 1,
        "max": 12,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "pricePerCord",
        "type": "number",
        "default": 350,
        "min": 0,
        "max": 10000,
        "step": 1
      },
      {
        "name": "woodType",
        "type": "select",
        "default": "mixed",
        "options": [
          {
            "value": "softwood"
          },
          {
            "value": "mixed"
          },
          {
            "value": "hardwood"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "btuDemand",
        "precision": 1,
        "unit": "million BTU"
      },
      {
        "name": "cordsNeeded",
        "precision": 2,
        "unit": "cords"
      },
      {
        "name": "cost",
        "precision": 2,
        "unit": "$"
      },
      {
        "name": "btuPerCord",
        "precision": 1,
        "unit": "million BTU"
      },
      {
        "name": "monthlyCords",
        "precision": 3,
        "unit": "cords"
      },
      {
        "name": "storageSpace",
        "precision": 0,
        "unit": "cu ft"
      }
    ],
    "interpret": null
  }
}
