heat-transfer-1d
v0.3.1
Published
Steady-state 1-D heat transfer: conduction, convection, radiation and series thermal resistance networks.
Downloads
129
Maintainers
Readme
heat-transfer-1d
Steady-state, one-dimensional heat transfer. The three modes — conduction, convection, radiation — plus the "thermal circuit" trick of adding resistances in series to model a composite wall.
No dependencies, SI units (W, m, K).
The three modes
import {
conductionRate, // Fourier: q = k A ΔT / L
convectionRate, // Newton: q = h A ΔT
radiationRate, // grey body: q = εσA(Ts⁴ − Tsurr⁴), T in kelvin
} from 'heat-transfer-1d';
conductionRate(0.8, 2, 20, 0.1); // 320 W
convectionRate(25, 3, 10); // 750 W
radiationRate(1, 1, 1000, 0); // ~56.7 kWThermal circuits
Treat each layer / film as a resistance and add them up. Then the heat flow is just the temperature drop divided by the total resistance — Ohm's law for heat.
import {
convectionResistance,
conductionResistance,
circuitHeatFlow,
overallU,
seriesResistance,
} from 'heat-transfer-1d';
const A = 1;
const R = [
convectionResistance(10, A), // inside film
conductionResistance(0.2, 0.5, A), // wall
convectionResistance(40, A), // outside film
];
circuitHeatFlow(30, ...R); // ~57.1 W for a 30 K drop
overallU(seriesResistance(...R), A); // overall U valueNotes
- Radiation temperatures must be absolute (kelvin). The library will happily compute nonsense if you pass celsius.
- The wall temperature profile assumes constant conductivity and no internal heat generation, so it is linear.
- Radial (cylindrical / pipe insulation) conduction is not implemented yet.
License
Released into the public domain under the Unlicense.
