Asap.jl

Asap is...
- Another Structural Analysis Package
- results As Soon As Possible
- Analysis of Structures Avec Programming
- A Simple Analysis Please
Fast, differentiable structural analysis for trusses and frames in Julia — designed first-and-foremost for information-rich data structures and ease of querying, but always with performance in mind.
Asap solves linear elastic truss and frame structures with the direct stiffness method, recovers exact internal force and displacement fields along members, handles load cases and combinations from a single factorization, and exposes a pure functional analysis path that automatic differentiation engines traverse natively — the same engine that powers gradient-based structural optimization through AsapOptim.
See also: AsapToolkit, AsapHarmonics.
Installation
pkg> add AsapQuick start
using Asap
steel = Material(200e6, 80.0, 0.3) # E [kN/m²], ρ [kg/m³], ν
column = Section(steel, 1e-2, 8e-5, 3e-5, 5e-7) # A, Ix, Iy, J
n1 = Node([0.0, 0.0, 0.0], :fixed)
n2 = Node([0.0, 0.0, 3.0], :free)
el = FrameElement(n1, n2, column)
model = Model([n1, n2], [el], [NodeForce(n2, [10.0, 0.0, 0.0])])
solve!(model)
displacement(model.results, n2) # SVector{6}: (ux, uy, uz, θx, θy, θz)6-element StaticArraysCore.SVector{6, Float64} with indices SOneTo(6):
0.005624999999999996
5.740531871003215e-19
0.0
-2.870265935501607e-19
0.0028124999999999986
0.0moment_z(model, el, 0.0) # bending moment at the base-29.999999999999975Design
Three separated layers, so each does one job:
- Definition —
Model,Node, elements, loads, springs: what you build. Pure data; nothing analysis-related is cached on it. - Analysis structure — built once per topology by
process!: DOF classification, a frozen sparsity pattern, scatter maps, a cached factorization. Repeated solves reuse everything. - Results — returned by
solve!, queried through accessor functions. Results never live on nodes or elements — which is also what lets dual numbers flow through the differentiable path.
Asap is units-agnostic: pick any consistent system (kN–m, N–mm, kip–in) and use it everywhere. Docstrings state dimensions in bracket notation ([force/length²]).
Every type prints an engineer-readable summary in the REPL — try typing steel or el from the example above.
Where to go from here
The Guide walks through every feature with executable examples — start with Materials and sections and read in order, or jump straight to the topic you need. Coming from the legacy v0.2.x API? See Migrating from v0.2. The API reference documents every exported type and function, grouped by concept.
Verification
The test suite (2,500+ tests) pins: textbook solutions (Kassimali), the exact numerics of the legacy v0.2.x implementation (characterization fixtures), the DiffAnalysis_2024 publication structures and gradients, classic closed-form beam formulas, calculus identities of the recovered force fields, AD-vs-finite-difference gradient checks, and zero-allocation guarantees on the hot paths.
Citing
When using or extending this software for research purposes, please cite using the following:
@software{lee_2024_10581560,
author = {Lee, Keith Janghyun},
title = {Asap.jl},
month = jan,
year = 2024,
publisher = {Zenodo},
version = {v0.1},
doi = {10.5281/zenodo.10581560},
url = {https://doi.org/10.5281/zenodo.10581560}
}Or find a pre-written citation in the style of your choice here (see the Citation box on the right side). E.g., for APA:
Lee, K. J. (2024). Asap.jl (v0.1). Zenodo. https://doi.org/10.5281/zenodo.10581560Module reference
Asap — Module
AsapStructural analysis for trusses and frames — the v1.0 core.
Three separated layers: definition (Model, Node, elements, loads, springs), analysis structure (AnalysisCache, built by process!), and results (LinearResults, returned by solve!). One set of pure element kernels feeds both an in-place zero-allocation assembly path and a pure functional path (ModelState → solve) that automatic differentiation engines traverse natively (see ext/AsapChainRulesExt.jl).
See docs/MODERNIZATION.md for the architecture and roadmap.