{
  "schemaVersion": 1,
  "slug": "drip-faucet-calculator",
  "category": "household",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "28235b64f6a4dc53782056c084936128afdd2f855237d4e82d8670eb75101c10",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/drip-faucet-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": "G = d × 1440 × v ÷ 3785.41; C = G × 365 ÷ 1000 × r",
    "vars": [
      [
        "d",
        "drips per minute"
      ],
      [
        "v",
        "drop volume, mL"
      ],
      [
        "G",
        "water per day, gallons"
      ],
      [
        "r",
        "rate per 1000 gallons"
      ],
      [
        "C",
        "yearly cost"
      ]
    ],
    "note": "1 US gallon = 3,785.41 mL; liters/day = gallons/day × 3.78541. Annual charge uses only the entered water rate."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const gallonsPerDay = dripsPerMinute*1440*dropSize/3785.411784; const gallonsPerYear = gallonsPerDay*365; return { gallonsPerDay, gallonsPerYear, litresPerDay: gallonsPerDay*3.785411784, yearlyCost: gallonsPerYear/1000*rate };",
    "inputs": [
      {
        "name": "dripsPerMinute",
        "type": "number",
        "default": 60,
        "min": 1,
        "max": 600,
        "step": 1,
        "slider": true
      },
      {
        "name": "dropSize",
        "type": "number",
        "default": 0.25,
        "min": 0.01,
        "max": 1,
        "step": 0.01,
        "slider": true
      },
      {
        "name": "rate",
        "type": "number",
        "default": 4.5,
        "min": 0,
        "max": 50,
        "step": 0.1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "gallonsPerDay",
        "precision": 2,
        "unit": "gal"
      },
      {
        "name": "gallonsPerYear",
        "precision": 0,
        "unit": "gal"
      },
      {
        "name": "litresPerDay",
        "precision": 2,
        "unit": "L"
      },
      {
        "name": "yearlyCost",
        "precision": 2,
        "unit": "$"
      }
    ],
    "interpret": null
  }
}
