engicalc-core
v0.1.2
Published
Engineering formulas for mechanical and plant engineering: pipe pressure drop (Darcy-Weisbach, Colebrook), heat transfer, beams and buckling, bolts, pumps and NPSH, acoustics. Zero dependencies, Node and browser.
Maintainers
Readme
engicalc-core
24 engineering formulas for mechanical and plant engineering as one small JavaScript library: pipe pressure drop, heat transfer, beams and buckling, bolted joints, pumps and NPSH, acoustics. Zero dependencies, no build step, runs in Node and the browser, unit tested.
const { stroemung } = require("engicalc-core");
// Pressure drop: 10 m³/h of water through 100 m of DN50 steel pipe plus fittings (Σζ = 5)
stroemung.druckverlust({ q: 10, d: 50, l: 100, k: 0.05, rho: 998, nu: 1.0, zeta: 5 });
// → { v: 1.415, Re: 70740, laminar: false, lambda: 0.0230, dp: 50920, ... } v in m/s, dp in Pa (0.51 bar)Live demo: engicalc.tkai.tech/en runs exactly this code, with the formula and the theory next to every calculator.
Install
npm install engicalc-coreIn the browser, include a single module, e.g. <script src="stroemung.js"></script>,
then use EngiCalc.stroemung.
Every function takes one object with inputs in the units engineers actually use (mm, bar, m³/h …)
and returns intermediate and final values. Units are documented in the comment above each function.
null means inputs are missing or invalid.
Modules
The API names are German (the library grew out of a German calculator site). The table maps them.
| Module | Function | What it calculates |
|---|---|---|
| stroemung (fluid mechanics) | druckverlust | pipe pressure drop, Darcy-Weisbach with Colebrook friction factor and loss coefficients ζ |
| | reynolds | Reynolds number and flow regime |
| | bernoulli | Bernoulli equation with losses, pressure at point 2 |
| | kv | valve flow coefficient Kv and recommended Kvs |
| | ausfluss | tank discharge (Torricelli) with discharge coefficient |
| waerme (heat transfer) | rohrisolierung | heat loss of an insulated pipe, surface temperature |
| | uWert | U-value of a wall with up to three layers |
| | waermetauscher | heat exchanger area via LMTD, counterflow ("gegen") or parallel flow ("gleich") |
| | strahlung | thermal radiation, Stefan-Boltzmann |
| | aufheizen | heat and power to heat up a mass |
| festigkeit (strength) | biegung | beam deflection, bending moment and stress, 4 load cases |
| | spannung | tension, bending, torsion and von Mises equivalent stress |
| | knickung | Euler buckling load, slenderness ratio, safety factor |
| | querschnitt | area, second moment of area, section modulus (rectangle, circle, tube, box) |
| maschinenelemente (machine elements) | schraube | bolt preload and tightening torque M6 to M24, simplified VDI 2230 |
| | pressverbindung | interference fit: transmissible torque and axial force |
| | passfeder | parallel key: surface pressure, required length |
| | schweissnaht | weld stress and required weld length |
| pumpen (pumps) | pumpe | hydraulic, shaft and electrical power |
| | foerderhoehe | system head |
| | npsh | NPSH available and margin to NPSH required |
| | dampfdruckWasser | vapor pressure of water, Antoine equation |
| akustik (acoustics) | pegeladdition | adding sound levels |
| | entfernung | level reduction with distance, point or line source |
| | schallleistung | sound pressure level from sound power level |
Examples
const { waerme, festigkeit, maschinenelemente, pumpen, akustik } = require("engicalc-core");
// Counterflow heat exchanger, water 90 → 60 °C heats water 20 → 50 °C, 3600 kg/h, U = 1000 W/m²K
waerme.waermetauscher({ typ: "gegen", th1: 90, th2: 60, tk1: 20, tk2: 50, m: 3600, cp: 4.19, U: 1000 });
// → { Q: 125700, lmtd: 40, A: 3.143, gueltig: true } Q in W, A in m²
// IPE 200 beam, 2 m span, 5 kN point load at midspan
festigkeit.biegung({ fall: "1", F: 5000, L: 2000, E: 210000, I: 1943, W: 194, sigmaZul: 156 });
// → { f: 0.2042, M: 2500000, sigma: 12.89, auslastung: 0.0826 } f in mm, M in Nmm, auslastung = utilization
// M12 bolt, property class 8.8, 90 % of yield, friction 0.12
maschinenelemente.schraube({ gewinde: "M12", rp: 640, nu: 0.9, mu: 0.12 });
// → { As: 84.3, Fv: 39980, Ma: 80990, Fq: 5997 } preload Fv in N, tightening torque Ma in Nmm (81 Nm)
// NPSH available for water at 60 °C, 2 m positive suction head, 1.5 m suction losses
pumpen.npsh({ pe: 1, t: 60, z: 2, hv: 1.5, rho: 983, erf: 2.5 });
// → { pd: 19870, vorhanden: 8.809, reserve: 5.809 } vapor pressure in Pa, NPSHa and margin in m
// Three machines at 85, 82 and 78 dB
akustik.pegeladdition([85, 82, 78]);
// → { L: 87.31, zuwachs: 2.306 } total level and increase over the loudest source, dBTests
npm testChecks the formulas against hand-calculated reference values, e.g. the Colebrook friction factor against the Moody chart, the vapor pressure at 100 °C against standard atmospheric pressure, and the Euler buckling load.
Scope
The formulas are meant for preliminary design and plausibility checks. They do not replace a code-compliant design calculation. Found a mistake? Open an issue or a pull request, ideally with a source.
Auf Deutsch: Die Rechner gibt es auch auf Deutsch unter engicalc.tkai.tech. Fragen und Issues gern auch auf Deutsch.
MIT License, © 2026 tkai.tech

