Install from npm
@theerapat-s28/ts-structural-eng-tools
ts-structural-eng-tools
A TypeScript library of structural-engineering calculations — reinforced-concrete beam design per ACI 318-19 and strengthening methods — with typed inputs, code-clause warnings, and SI units throughout.
Overview
The package is organised into layered modules, each published as its own subpath export.
Every calculation returns a result object carrying the design value, the intermediate
calculationDetails, the unit, and a warnings array.
ℹ️
All inputs and outputs use SI units implicitly: MPa for stresses, mm / mm² for geometry, kN·m for moments and kN for forces. Each result object states its unit in the
unit field.
ℹ️
Code-provision violations that leave the calculation valid are returned as entries in the
warnings array, each citing the exact ACI clause. Broken calculation assumptions throw an RCDesignError instead — a result is never silently returned when its assumptions failed.
Modules
FN
rc
Flexural and shear capacity of rectangular RC beam sections, stirrup checks, rebar layer layout, and material helpers — all per ACI 318-19.
rectBeamMomentCapacity · concreteShearCapacity · stirrupShearCapacity ·
checkStirrupRequirement · rectBeamBarLayout · concreteBeta ·
concreteElasticModulus · psiToMpa
FN
strengthening
Steel-plate jacketing of existing beams and the plate-to-concrete interface bolting that transfers the shear flow between them.
calculateSteelJacketedBeamMomentCapacity · plateInterfaceShearFlow ·
boltShearCapacity · plateInterfaceBoltRequirement
Installation
Shell
# pnpm pnpm add @theerapat-s28/ts-structural-eng-tools # npm npm install @theerapat-s28/ts-structural-eng-tools
Import everything from the package root, or narrow to a module through its subpath export:
TypeScript
import { rectBeamMomentCapacity } from "@theerapat-s28/ts-structural-eng-tools"; import { rectBeamMomentCapacity } from "@theerapat-s28/ts-structural-eng-tools/rc"; import { calculateSteelJacketedBeamMomentCapacity } from "@theerapat-s28/ts-structural-eng-tools/strengthening"; import { RCDesignError } from "@theerapat-s28/ts-structural-eng-tools/core"; import { roundToDecimalPlaces } from "@theerapat-s28/ts-structural-eng-tools/utils";
Quick start
Design moment capacity of a singly reinforced rectangular section:
TypeScript
import { rectBeamMomentCapacity } from "@theerapat-s28/ts-structural-eng-tools/rc"; const result = rectBeamMomentCapacity({ Es: 200000, // MPa fy: 400, // MPa fc: 28, // MPa b: 300, // mm h: 500, // mm d: 440, // mm As: 1520, // mm² }); console.log(result.phiMn, result.unit); // design moment capacity, kN·m console.log(result.warnings); // code-clause warnings, if any
ℹ️
See the RC Beam Design and Strengthening reference pages for the full parameter tables, worked outputs, warnings, and error codes of every export.
Units & conventions
Units are implicit in the numbers — no unit objects, no conversion wrappers. Supply SI values and read the unit field of the result.
| Quantity | Unit | Notes |
|---|---|---|
| fc, fy, Es | MPa | Concrete strength, steel yield strength, elastic modulus |
| b, h, d, d′ | mm | Section geometry, measured from the compression face |
| As, As′ | mm² | Reinforcement areas |
| phiMn | kN·m | Design moment capacity (φ applied) |
| phiVc, phiVs | kN | Design shear capacity contributions (φ applied) |
⚠️
Values are rounded only for presentation. Intermediate arithmetic inside every calculation stays unrounded, so re-deriving a result from the rounded
calculationDetails may differ in the last digit.
Export Summary
| Subpath | Module | Contents |
|---|---|---|
| . | root barrel | Re-exports every public function, type, constant, and error below |
| ./rc | RC Beam Design | Moment and shear capacity, stirrup checks, bar layout, material helpers |
| ./strengthening | Strengthening | Steel-plate jacketing and plate-to-concrete interface bolting |
| ./core | Core | Section and result types, ACI constants, RCDesignError and Errors |
| ./utils | Utils | solveQuadratic, roundToDecimalPlaces, mergeWarnings |