{
  "schemaVersion": 1,
  "slug": "deep-fry-oil-calculator",
  "category": "cooking",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "0d745c26d85666bb5fb049690d14c207d074863030afe759b80c7263e17c2bec",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/deep-fry-oil-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": "O = V f ÷ 100; M = 0.918O; R = 1000O ÷ m",
    "vars": [
      [
        "V",
        "Pot volume (L)"
      ],
      [
        "f",
        "Fill percent"
      ],
      [
        "O",
        "Oil volume (L)"
      ],
      [
        "M",
        "Oil mass (kg)"
      ],
      [
        "m",
        "Food weight (g)"
      ],
      [
        "R",
        "Oil-to-food ratio"
      ]
    ],
    "note": "Oil mass = oil volume × 0.918 kg/L; assumed maximum food mass = oil mass ÷ 6. This is a planning ratio, not a safe fill limit."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "if(![potLitres,fillPercent,foodWeightGrams].every(Number.isFinite)||potLitres<=0||fillPercent<40||fillPercent>80||foodWeightGrams<0)return {oilLitres:null,oilKg:null,oilToFoodRatio:null,maxBatchGrams:null,__error:'inputError'};const oil = potLitres*fillPercent/100,oilKg=oil*0.918; return { oilLitres: oil, oilKg, oilToFoodRatio: foodWeightGrams>0 ? oilKg*1000/foodWeightGrams : 0, maxBatchGrams: oilKg*1000/6 };",
    "inputs": [
      {
        "name": "potLitres",
        "type": "number",
        "default": 4,
        "min": 0.5,
        "max": 100,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "fillPercent",
        "type": "number",
        "default": 60,
        "min": 40,
        "max": 80,
        "step": 5
      },
      {
        "name": "foodWeightGrams",
        "type": "number",
        "default": 500,
        "min": 0,
        "max": 10000,
        "step": 50,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "oilLitres",
        "precision": 2,
        "unit": "L"
      },
      {
        "name": "oilKg",
        "precision": 2,
        "unit": "kg"
      },
      {
        "name": "oilToFoodRatio",
        "precision": 1,
        "unit": "x"
      },
      {
        "name": "maxBatchGrams",
        "precision": 0,
        "unit": "g"
      }
    ],
    "interpret": null
  }
}
