{
  "schemaVersion": 1,
  "slug": "heat-transfer-calculator",
  "category": "science",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "7fe2cf379b313da5b2d6b0eb772f809061261e9cb1f31fd1d58ed8e4ad1a448f",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/heat-transfer-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": "Q=m·c·(Tf−Ti); P=Q/t; Pin=P/(efficiency/100)",
    "vars": [
      [
        "m",
        "Mass, kg"
      ],
      [
        "c",
        "Specific heat capacity, J/(kg·K)"
      ],
      [
        "T_i",
        "Initial temperature"
      ],
      [
        "T_f",
        "Final temperature"
      ],
      [
        "t",
        "Time, s"
      ],
      [
        "Q",
        "Heat transferred, J"
      ]
    ],
    "note": "Q=m·c·ΔT; P=Q/t; input power=P/(efficiency/100). Use m in kg, c in J/(kg·K), t in seconds, and consistent temperature units; Δ°C and ΔK have equal numerical size."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-04",
    "sources": [
      {
        "name": "OpenStax University Physics — Heat and calorimetry",
        "url": "https://openstax.org/books/university-physics-volume-2/pages/1-4-heat-transfer-specific-heat-and-calorimetry"
      }
    ],
    "basis": "Q = mcΔT in joules; average power = Q/time; input power divides by the efficiency fraction.",
    "limitations": "Constant entered specific heat, no phase transition. Negative energy denotes cooling; heat loss is represented only by the entered efficiency.",
    "implementationHash": "7fe2cf379b313da5b2d6b0eb772f809061261e9cb1f31fd1d58ed8e4ad1a448f",
    "domain": "math"
  },
  "contract": {
    "compute": "const dT = finalTemp - initialTemp; const energy = mass*specificHeat*dT; const eff = Math.max(1, efficiency)/100; const power = time > 0 ? energy/time : 0; return { temperatureChange: dT, energyJoules: energy, energyKilojoules: energy/1000, energyKcal: energy/4184, powerWatts: power, powerWithEfficiency: power/eff, direction: dT > 0 ? 'Energy must be added' : dT < 0 ? 'Energy must be removed' : 'No change' };",
    "inputs": [
      {
        "name": "mass",
        "type": "number",
        "default": 2,
        "min": 0,
        "max": 1000000,
        "step": 0.01
      },
      {
        "name": "specificHeat",
        "type": "number",
        "default": 4186,
        "min": 0.1,
        "max": 100000,
        "step": 0.1
      },
      {
        "name": "initialTemp",
        "type": "number",
        "default": 20,
        "min": -273,
        "max": 3000,
        "step": 0.1
      },
      {
        "name": "finalTemp",
        "type": "number",
        "default": 80,
        "min": -273,
        "max": 3000,
        "step": 0.1
      },
      {
        "name": "time",
        "type": "number",
        "default": 300,
        "min": 0.001,
        "max": 1000000,
        "step": 0.1
      },
      {
        "name": "efficiency",
        "type": "number",
        "default": 100,
        "min": 1,
        "max": 100,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "energyJoules",
        "precision": 0,
        "unit": "J"
      },
      {
        "name": "powerWatts",
        "precision": 1,
        "unit": "W"
      },
      {
        "name": "temperatureChange",
        "precision": 2,
        "unit": "K"
      },
      {
        "name": "energyKilojoules",
        "precision": 2,
        "unit": "kJ"
      },
      {
        "name": "energyKcal",
        "precision": 2,
        "unit": "kcal"
      },
      {
        "name": "powerWithEfficiency",
        "precision": 1,
        "unit": "W"
      },
      {
        "name": "direction",
        "precision": 0,
        "unit": "",
        "type": "text"
      }
    ],
    "interpret": null
  }
}
