@frame_lab/checks
v0.1.5
Published
Eurocode member checks as TypeScript: EN 1993-1-1 steel (incl. Annex B), EN 1992-1-1 concrete, EN 1993-1-8 hollow-section joints, with section and material libraries and the worked examples they are validated against.
Maintainers
Readme
@frame_lab/checks
Eurocode member checks in TypeScript, from FrameLab:
- EN 1993-1-1 steel. Section classification, the §6.2 cross-section resistances (N, V, M, M–V by (6.30), M–N, biaxial (6.41), torsion), flexural, torsional and lateral-torsional buckling (§6.3.1–6.3.2), and the Annex B interaction (Tables B.1/B.2, C_m from Table B.3), driven over the stations and combinations of a member.
- EN 1992-1-1 concrete (
Concrete): beams, columns, slabs. - EN 1993-1-8 ch. 7 welded hollow-section lattice joints (
Joints), and bolted/welded truss connections (Connections). - Libraries: IPE, HE and cold-formed RHS/SHS section tables; steel grades with the EN 1993-1-1 Table 3.1 or product-standard yield strengths.
- Validation (
Validation): the published worked examples the tests assert against.
Every check returns its clause, the formula's inputs and notes, so a result can be shown as a hand calculation. The package has no runtime dependencies.
Install
npm install @frame_lab/checksThe package ships TypeScript source (main: ./src/index.ts), not compiled JavaScript. Use it
from a bundler that compiles TS (Vite, esbuild, webpack with ts-loader) or from vitest/tsx. The
section tables are JSON imports: TypeScript needs "resolveJsonModule": true, and the source uses
only erasable syntax (no enums or namespaces), so erasableSyntaxOnly and verbatimModuleSyntax
work.
Conventions
- SI units at the boundary: N, m, Pa, N·m. Section properties are in m, m², m⁴…
- Signs: axial force tension positive; bending moment sagging positive.
- Axes: y–y is the major axis, z–z the minor.
MandVare M_y and V_z. For biaxial bending (a 3D frame) giveMzandVybeside them.
A member check
A 10 m IPE 240 S355 beam fixed at both ends, Finnish national annex, C1 typed:
import { checkSteelMember, findSection, findGrade, FI_STEEL, type MemberForcesInput } from "@frame_lab/checks";
const section = findSection("IPE 240")!;
const grade = findGrade("S355")!;
// one entry per combination; N/V/M (and Mz/Vy) at stations x (m) along the member
const forces: MemberForcesInput[] = [{
combination: "ULS-1",
N: [{ x: 0, v: 0 }],
V: [{ x: 0, v: 35.78e3 }], // N
M: [{ x: 0, v: -59.64e3 }], // N·m, hogging at the support
}];
const r = checkSteelMember(forces, {
section, grade, L: 10,
design: { sectionName: "IPE 240", grade: "S355", ltb: { C1: 2.58 } },
basis: FI_STEEL,
});
r.utilization; // 0.968 — the governing check's
r.governing; // "M_LT" — (6.54), M_b,Rd = 61.4 kN·m
r.combination; // "ULS-1", at r.position = 0 m
r.checks; // every check at that station: { check, utilization, applicable, detail }
r.checks.find((c) => c.check === "M_LT")!.detail.inputs; // Mcr, lambdaLT, chiLT, …checkSteelMember searches every station of every combination and returns the governing one,
with all checks at that station. checkMember is the same driver with explicit options
(fy, E, LcrY, LcrZ, ltb, …), and each clause is exported on its own
(sectionClass, bendingResistance, flexuralBucklingResistance, ltbResistance,
memberInteraction, …).
The design record (SteelDesign)
What an engineer sets per member; everything is optional except the section and grade.
| Field | Meaning |
|---|---|
| ky, kz / LcrY, LcrZ | buckling length factors on L, or typed lengths (m); LTB uses L_cr,z |
| curveY, curveZ | flexural buckling curve overrides (default Table 6.2) |
| classOverride | 1, 2 or 3 instead of the computed class |
| CmY, CmZ, CmLT | Annex B equivalent moment factors (default 1.0, or from the diagram) |
| sway | the member sways in its plane: C_my = 0.9 (Table B.3 note) |
| TEd | constant torsional moment (N·m) |
| ltb | C1, C2, zg or loadHeight, kw, curve, kc, method: "fe" |
| ltbRestrained | compression flange continuously restrained: no LTB check |
| deflection | { limit: n } for L/n under variable actions (needs sls series) |
| role, oopLength | truss chords and braces: the BB.1 buckling lengths |
National annex (SteelBasis)
FI_STEEL (Finnish NA: γ_M0 = γ_M1 = 1.0, η = 1.2, Table 3.1 f_y, no LTB f-factor) and
UK_STEEL (UK NA: η = 1.0, product-standard f_y, (6.58) f-factor). Both use the rolled LTB method
(§6.3.2.3) with λ̄_LT,0 = 0.4, β = 0.75. Build your own object for another annex.
Factors from the moment diagram
When the forces are a member's real diagram (a frame's stations, not one hand-typed station),
pass diagram. Then C_my / C_mz / C_mLT (Table B.3) and C1 (Lopez–Yong–Serna, from M at the
quarter points) come from it per combination, unless typed in design:
checkSteelMember(forces, { ...input, diagram: { loadShape: { "ULS-1": "uniform" } } });loadShape per combination ("uniform", "concentrated" or "both") picks Table B.3's column for a diagram
with a span moment. Give enough stations that the quarter points are on the curve.
Validation
Validation.VALIDATION_CASES holds the worked examples the tests assert against, each with its
book, page and the printed values; Validation.runCase(c) compares.
- SCI P364 and P374 (Steel Building Design: Worked Examples, open and hollow sections)
- The Designers' Guide to EN 1993-1-1
- TCC CCIP-041 (Worked Examples to Eurocode 2)
- SSAB Domex Tube (hollow-section joints and connections)
- SCIA Engineer (a beam ULS report)
A row passes within 2 % unless its note says otherwise; classes must match exactly.
Section data
The IPE and HE properties are converted from the ArcelorMittal Orange Book (UK NA) tables, the cold-formed RHS/SHS from the EC3 "blue book" tables. Check a property against the manufacturer's current table before relying on it.
License
PolyForm Noncommercial 1.0.0: free for any noncommercial purpose — study, research, personal projects, and use by charities, schools and public bodies. Commercial use needs a licence: contact Ilia Sukharev, [email protected].
This is engineering software: the results are your responsibility. Review every check as you would a colleague's hand calculation.
Issues: https://github.com/Suharevillya/FrameLab-issues
