GPL-3.0 · TypeScript

@edubeam/fem

A finite element solver for plane frames, written in TypeScript.

Get started GitHub

Run on this page

The code on the left, solved in your browser as the page loaded. The values on the right are what it returns, and the figure is drawn from the same solver by @edubeam/plot.

beam.ts
import { DofID, LinearStaticSolver } from '@edubeam/fem'

const solver = new LinearStaticSolver()
const { domain } = solver

// SI units throughout: m, N, Pa. Steel and an IPE 200.
domain.createMaterial('steel', { e: 210e9, g: 81e9 })
domain.createCrossSection('IPE200', { a: 28.5e-4, iy: 1943e-8, k: 5 / 6 })

domain.createNode('A', [0, 0, 0], [DofID.Dx, DofID.Dz]) // pin
domain.createNode('B', [6, 0, 0], [DofID.Dz]) // roller
const beam = domain.createBeam2D(1, ['A', 'B'], 'steel', 'IPE200')

// 12 kN/m, down
const lc = solver.loadCases[0]
lc.createBeamElementUniformEdgeLoad(1, [0, 12e3], true)
solver.solve()

What's in it

  • Analyses

    Linear statics with as many load cases as you need. Diagrams are exact between the nodes: no mesh to refine.

  • Elements

    A two-node Timoshenko beam in the x–z plane. Hinged at both ends it is a truss bar.

  • Loads

    Nodal forces and moments, point, uniform and trapezoidal loads along members, temperature, settlements.

  • Results

    N, V and M anywhere along a member, deflected shapes, end forces, displacements and reactions.

Every class and method

The solver behind EduBeam

Every diagram, reaction and deflection in EduBeam, and every figure on this site, is computed by @edubeam/fem.

See EduBeam