© 2026 MVC Software Ltd. All rights reserved. Free to download. AutoStruct 0.1, made from the source of 2026-11-21 (1ed71f970). The project’s data: the level documents and the project database

The project’s data:
the level documents and the project database

AutoStruct

24 October 2026

Abstract

Everything AutoStruct computes for a project is written down as it is computed: in a JSON document for each level, and in one database for the whole project. A script — yours, or one the assistant writes for you — can read both. This manual says where each is, when it is written and when it stops being true, what every field and every column means, in which unit and with which sign, and how to join one table to another without being misled. It ends with worked queries and a list of the traps that catch a first script.

Contents

1 Three places, and which to read
2 Where they are
3 When they are written, and when they stop being true
4 Coordinates and units
5 The level document
5.1 Its shape
5.2 Columns
5.3 Beams
5.4 Slabs
5.5 Footings and strips
5.6 Walls, slab edges, free nodes
5.7 The other files of a level
6 The project database
6.1 Runs: read only the live ones
6.2 Levels and storeys
6.3 Elements
6.4 Members and the forces at their ends
6.5 Load cases
6.6 The design
6.7 An existing building’s record
7 The analysis arrays
8 Worked examples
8.1 The axial force in each column of a level, under the permanent load
8.2 The storey shears: a check of the signs
8.3 The steel each slab of a level requires
8.4 The footings: their size, and whether they were designed
8.5 From a column’s forces to its design, across two runs
8.6 A slab’s span moments, from its level document
8.7 A column’s centre and size, from its level document
8.8 A beam’s ends, a slab’s load, steel and supports, a footing’s size
8.9 The beams of a level whose load is over a limit, from its level document
9 The traps
References
References

1 Three places, and which to read

The level documents

— one JSON file (Bray, 2017) per level, designs/json/<level>.json, written by the level’s Create Model. It holds the level as the computation understood it: its columns, beams, slabs and footings, with their sizes, loads, the slabs’ moments and their reinforcement. Units are engineering units: kN, kNm, metres, centimetres for bar spacings, millimetres for diameters.

The project database

— one SQLite file, database/project.sqlite, for the whole building. It holds what every stage computed: the elements of each level, the frame’s members and the forces at their ends under each load case, the design of every section, the bars, the checks made and the reasons. Every value in it is SI: newtons, newton-metres, pascals, metres.

The analysis arrays

— one HDF5 file (The HDF Group, 2026), database/analysis.h5, beside the database: the frame analysis’s arrays as the computation made them — every member’s record of end actions, every node’s displacements and reactions, every mode’s shape, the pushover’s curves, the response history’s peaks and storey displacements, the grids of a mat and of a raft — in the computation’s own units (§7).

The documents are the authority. They are what the next stage of the computation reads, and nothing in AutoStruct reads a number back out of the database to compute with. The database is filled by the same computation as it runs, and it is rebuilt by running it again. Read whichever answers your question more directly: a slab’s span moment is one field in its level document; the axial force in every column under the permanent load is one query in the database.

the question

read it in

where an element is: a beam’s ends, a column’s corners, a footing’s place

the level document

its size: a beam’s width and depth, a slab’s thickness, a footing’s sides

the level document

the loads on it: g and q of a beam (kN/m) or a slab (kN/m2)

the level document

a slab’s moments and its steel

the level document

a member’s length, its section’s E, A, I

the database, member

the forces at a member’s ends under a load case

the database, member_action

the design of a beam’s or a column’s sections, its bars

the database

a node’s displacements or reactions, a mode’s shape, every member at once

the arrays, analysis.h5

a pushover curve, a storey’s displacement through an earthquake, a raft’s settlement

the arrays, analysis.h5
Table 1: Which to read. The database holds no load: member_action has forces (N, Mz, My, T), and no column g or q. A question about the loads on beams or slabs is answered from the level document.

Both are read-only to a script. Neither is a place to change the building: changes are made on the boards or with the commands of Structural elements from TCL, and the next computation writes both again.

2 Where they are

A project is a folder. The parts a script reads are these:

[Picture]

Figure 1: The parts of a project a script reads. A script finds the folder with autostruct.project_dir().

From a script inside AutoStruct:

import json, sqlite3 
import autostruct 
 
folder = autostruct.project_dir()                       # a pathlib.Path 
document = json.load(open(folder / 'designs' / 'json' / 'First.json', 
                          encoding='utf-8', errors='replace')) 
path = folder / 'database' / 'project.sqlite' 
db = sqlite3.connect('file:%s?mode=ro' % path, uri=True)   # read-only

Open the database read-only, with the mode=ro URI (SQLite Consortium, 2026c; Python Software Foundation, 2026): AutoStruct writes to it while it computes, and a script that only reads can never disturb that. Read the documents with errors=’replace’: a label typed in another alphabet is kept as it was typed, and a script asking for numbers should not stop on one character.

3 When they are written, and when they stop being true

The computation runs in stages, and each writes its part (figure 2). A Create Model writes its level’s document and that level’s elements; gathering the levels into a frame and solving it writes the frame’s members, the load cases and the forces; the design of each level writes its sections, its checks and its bars.

[Picture]

Figure 2: What each stage writes, in the database and beside it. A Create Model of one level removes the frame’s results and every level’s design, because the frame was made of every level.

The rule that matters most to a script is the last line of the figure. The frame is built from every level, so a change to any one of them makes the whole frame — and every design that used it — out of date. AutoStruct does not keep the old numbers beside the new drawing: a level’s Create Model removes the frame’s results and every level’s design from the database, and they come back only when the rest of the computation is run again. A query that finds no forces is not wrong; it is telling you the frame has not been solved since the building last changed.

a run of

stage

first removes the runs of

Create Model of a level

’div1’

that level, and every gather, frame analysis and design

gathering the frame

’collect’

every gather, frame analysis and design

the frame analysis

’epilysi’

every frame analysis and design

the design of a level

’design’

that level’s design only

the record of an existing building’s level

’record’

that level’s record only; its Create Model removes it too

Table 2: The stages as the database names them. The names in the middle column are the values to put in a query; they are the computation’s own short names and mean what the first column says.

4 Coordinates and units

Coordinates are the drawing’s: metres, in the plan’s own axes, with x to the right and y up, from the origin the drawing was made about. A point in a level document is the same point on the Design board.

quantity in a level document in the database
length, coordinate m m
force kN N
moment kNm N m
load on a slab kN/m2 Pa (N/m2)
load on a beam kN/m N/m
load on a cantilever’s edge kN/m (Wedge) N/m
moment in a slab kNm/m N m/m
steel area of a slab m2/m (Asd) m2/m
steel area of a beam cm2 (As1, As2) m2
bar spacing cm m
bar diameter mm m
a footing’s turn degrees (orientation) —
elastic modulus — Pa
Table 3: Units. A level document says its own units in its units object; the database is SI throughout and has no unit columns except where a quantity is dimensionless.

Divide a database force by 1000 for kN and a moment by 1000 for kNm. Round only the answer you report, never a number you go on to compare or add.

5 The level document

5.1 Its shape

{ "units": { "force": "kN", "moment": "kNm", "length": "m", 
             "slabs": {...}, "beams": {...}, "coords": {...}, 
             "foots": {...}, "strips": {...} }, 
  "level": { "columns": [...], "beams": [...], "slabs": [...], 
             "foots": [...], "strips": [...], "walls": [...], 
             "boundarylines": [...], "freenodes": [...], "rigidStubs": [...] } }

Every list is present, empty when the level has none of that kind. Lengths are metres; the other units are in units, by kind (table 3); every key units names for a kind is a key that kind’s elements carry. A slab’s crossSection.h has no unit: it is no length but a mark the computation sets, − 0.5 or nought. Some fields are named in transliterated Greek — the computation’s own vocabulary — and each is translated where it appears below.

PIC

Figure 3: One bay of a level: columns 0.30 × 0.30 on a 5.00 × 4.00 grid, beams 0.25 wide drawn along their outer faces. A beam’s coordinates are its drawn line and b0 says on which side its body lies; a slab’s outline is on the drawn lines and its spans are along x and y. The inset enlarges the first corner.

5.2 Columns

A column is made of one or more rectangles, which the program calls orthos; a column of an L or a T is two or three of them. The column whose number is 5 is the one the boards label K5.

field

meaning

number

the column’s number; its label is K and this number

numberOfOrthos

how many rectangles make it; 0 for a round column

orthos[]

the rectangles: each a number and coords, four corner points {x, y} in order (figure 3): the first corner, then along the rectangle’s own x, then the opposite corner, then along its own y

cyclic

true for a round column, which then has diameter and centre instead of rectangles

fiteuto

planted: true when the column stands on a beam rather than continuing down to a foundation

loads.g, loads.q

a concentrated permanent and variable load put into the column at this level, kN — not the axial force coming down from above, which is the frame’s (§6.4)

The centre of a rectangular column is the mean of its corners. A column’s size is its rectangle’s sides, measured between corners; the database’s design rows (§6.6) give it directly as b and d.

5.3 Beams

The beam whose number is 5 is labelled B 5, with a space.

field

meaning

number

the beam’s number; its label is B and this number

length

its length, m — use it rather than measuring the coordinates

coords.x1, y1, x2, y2

the line it was drawn on, which is one of its faces, not its axis

crossSection.b0

its width, m, with a sign: negative when the body lies to the left of the line going from (x1, y1) to (x2, y2), positive when to the right. The width is abs(b0)

crossSection.d0

its total depth, m. Negative for an upturned beam

nodes.startNode, endNode

the frame’s joints at its two ends

loads.g, q, g+q

the line loads on it, kN/m: permanent, variable and their sum

loads.gBeton, gWall

the parts of g that are its own weight and the weight of a wall standing on it

loads.slabs[]

two entries, one for each of its sides: the slab there, no (0 for none, with every load 0), and the line load that slab passes onto the beam, kN/m — permanent g, variable q and their sum g+q. The beam’s own g is gBeton + gWall + the two slabs’ g; its q is the two slabs’ q

supportRole

the beam as the support between the slabs on its two sides: for each slab its moment there (Me, kNm/m), its span across the beam (length) and its thickness (h); the support moment Msd (kNm); the extra top steel As1 and bottom steel As2 (cm2); and the bars chosen, {space, diameter} in cm and mm

The axis is half the width from the drawn line, on the side b0 names. In figure 3 the first beam is drawn from (0,−0.125) to (5,−0.125) with b0 = −0.25: its body lies on the left of that direction, which is up, so it spans − 0.125 ≤ y ≤ 0.125 and its axis is y = 0, through the columns’ centres.

5.4 Slabs

The slab whose id.label is "3" is the one the boards label P 3.

field

meaning

id.label

its number, as text

id.uuid

an identifier made afresh by every Create Model — never use it to find the same slab again

kind.useType

0 a void (no slab), 1 an ordinary slab, 2 or 3 a stair, 10 and above a ribbed slab, which then carries a cherner object with its ribs

kind.structureType

how it is supported: 1 a cantilever, 2 on two opposite sides, 3 on three sides, 4 on four, 5 on two adjacent sides

dimensions.lx, ly

its spans, m: lx along x, ly along y — neither is “the shorter one”

crossSection.d

its thickness, m

crossSection.Hedge

a cantilever’s thickness at its free end

bearsDirectly

true for a flat slab: no stiff beam bounds it

onTheGrid

true when it is solved as part of a grid rather than by tables

loads.g, q

its own weight and the variable load, kN/m2

loads.gEpikl

the finishes (screed, tiles), kN/m2; G+Gepikl and Gepikl+Q are the two sums

loads.gWall

the weight of walls standing on it

loads.Wedge

a cantilever’s line load at its free end, kN/m

spanMoments.Mx, My

the design moments at mid-span, kNm/m, for the bars along x and along y

reinforcement. directionX, directionY

the steel each way: Asd, the area required (m2/m), and the bars chosen, bars.space (cm) and bars.diameter (mm)

boundaries. numberOfSupports

on how many sides it is supported: how many beams bound it, three for a triangle

boundaries.sides

the numbers of those beams

boundaries.outline

its shape: the corner points on the drawn lines

boundaries.centre

the outline’s centroid — the way to find the same slab again

boundaries.supports[4]

the four edges it is designed as (below)

Whatever its shape, a slab is designed as four edges. supports[0] and supports[2] are sides 1 and 3, the pair running along x, side 1 the lower; sides 2 and 4 run along y (figure 3). Each edge has:

field

meaning

stirixi

the edge’s support: 0 simply supported, 1 continuous (fixed), 2 free

supportStress.Me

the moment at the edge, kNm/m — non-zero where the edge is continuous, and on a cantilever

supportStress.Qe

the edge’s reaction, kN/m

xx1, yy1, xx2, yy2

its two ends, on the beams’ axes rather than their drawn lines

stc, sca[], ssca[]

how many elements make the edge, which, and how each supports it (0 simply, 1 continuous, 2 free)

5.5 Footings and strips

PIC

Figure 4: A pad’s coords are its first corner. Its centre is half its extents from there — here, under the column.

A pad footing (foots) has id.label (F 1, F 2, …), coords, dimensions.dx and dy (its extents along its own axes, m), orientation (degrees) and, once it has been designed, dimensions.depth (m). Its coords are its first corner, not its centre (figure 4).

A strip footing (strips) has id.label (S 1, …), coords (its axis, x1, y1, x2, y2), and dimensions.b0 and d0, its width and its depth.

The soil pressure under a footing and its steel are not in the level document: they are in the design results (§5.7) and in the database (§6.6).

5.6 Walls, slab edges, free nodes

walls are infill walls: a load on the beams and slabs under them, not a structural element. Each has coords, dimensions.b0 (its thickness) and d0 (its height). boundarylines are free slab edges, with the same fields and a line load. freenodes are beam ends that are not on a column. rigidStubs are the short rigid arms joining a column to the flat slab around it.

5.7 The other files of a level

file

what it holds

<level>.g.json

what was sent to Create Model: the drawing as it was then

<level>.jsonDraft, .jsonDetails

what the Draft and Details boards draw

<level>/slabsDesign.json

each slab’s design, edge by edge

<level>/membersDesign.json

each beam’s and column’s design

<level>/supportsDesign.json

the slabs’ steel over the beams they rest on: a list, one entry for each beam and each slab beside it — beam (its number), side, slab (the bare number, as text), the steel required there Asd (m2/m) and the bars added, bars {diameter, space} in mm and cm (Design results)

<level>/foundationsDesign.json

each footing’s design: its plan, depth, the soil’s allowable and actual pressure, its steel, and why it could not be designed when it could not

<level>/punching.json

the punching checks: {level, storey, source, units, columns, unread}. The checks are the list columns, one entry per column, its number in column (Punching, “Where to read the results”, names each entry’s fields); units gives each field’s unit; level is the path of the level document it read, storey the level’s storey; unread lists the columns that could not be read at all, each with its cause — a level with any is a level whose punching check is incomplete

<level>Cont*.json, <level>StructSolvers*.json

the continuous slab strips and the models solved for them

calcs/json/storeys.json

the storeys, foundation first, as the list level.storeys, each {name, elevation}: json.load(f)[’level’][’storeys’]

6 The project database

The database is SQLite, with STRICT tables (SQLite Consortium, 2026b): a column holds the type it says. JSON columns are read with SQLite’s own json_extract (SQLite Consortium, 2026a). Figure 5 shows the tables a script reads most and how they join.

[Picture]

Figure 5: The tables a script reads most, and their joins. Every row belongs to a run; a run belongs to a stage and, for a per-level stage, to a level.

6.1 Runs: read only the live ones

Every row belongs to a run: one execution of one stage (table 2). A run’s outcome is ’completed’ or, when the computation refused, ’refused’ with the reason in refusal_key and refusal_args. The view live_run has, for each stage and level, the latest run that completed — which, because of the removals in table 2, is also the valid one. Join through it and you never read a number from a superseded run:

SELECT ... FROM member m 
  JOIN live_run r ON r.run_id = m.run_id AND r.stage = 'epilysi'

6.2 Levels and storeys

level has one row per level: name, elevation (m) and storey, counted from the foundation, which is storey 1. Three things follow from how a frame is built, and each has caught a script:

6.3 Elements

element has one row for each element of a level, as a run saw it: kind (beam, column, slab, footing, strip, wall), label, number, a reference point x, y, a key geokey made of its coordinates, and its shape in geometry (JSON, metres).

kind label reference point (x, y) geometry
beam B 5 the middle of its line coords, section.b0, section.d0
column K5 its centre orthos[], cyclic
slab P 3 its outline’s centroid outline, crossSection.d
footing F 1 its first corner coords, dimensions.dx, dy, depth
strip, wall S 1, W 2 the middle of its line coords, dimensions
Table 9: Elements. Note the space in B 5 and P 3 and none in K5.

A level has two live sets of elements: the one its Create Model wrote, and a copy its design wrote. The frame’s members point to the first; the design’s rows (§6.6) to the second. An element_id and a number mean something only within the run that wrote them; to go from one run to another, match geokey, which is the same for the same element in both (example 8.5).

A trap. Labels are for display. Find an element by its label to report it, but never join two tables on a label: join on element_id within a run, and on geokey between runs.

6.4 Members and the forces at their ends

The frame analysis numbers what it solves as members. A member has kind (’K’ a column, ’D’ a beam, ’A’ a rigid link), storey (a column’s is its top level’s), number (its element’s number in that storey), length (m, centre to centre), the joints at its ends node_a and node_b, its section as JSON (E, G in Pa; A in m2; I1, I2, J in m4; and, on a member with an end released, releases: 1 and 2 the Mz at node_a and at node_b, 4 and 8 the My, 16 the torsion, summed — 12 a beam pinned at both ends), and element_id, the element it represents.

member_action holds the forces at a member’s two ends under one load case: N, T, and the moments My_a, My_b, Mz_a, Mz_b, where _a is the end at node_a and _b the end at node_b.

PIC

Figure 6: A column of a storey swaying under the earthquake along x. End a is its top. Its two end moments as stored, + 30 and − 33kNm, give the shear by their difference.
Axial force

N is negative in compression. A column’s compression is -N.

Which end is which

A column’s end a is its top and end b its bottom. A beam’s ends are in the order the frame formed them; find which is which from node_a and node_b.

Which moment is which

For a column, My is bending in the vertical plane through x — what the earthquake along x produces — and Mz in the plane through y. For a beam, My is its bending in the vertical plane, the one gravity produces; its Mz is in the plane of the floor, where a floor slab makes the frame’s numbers notional, and a beam’s design reads only My. I2 goes with My and I1 with Mz.

The shear

The end moments are stored so that their difference over the length is the shear they make:

V = Ma − Mb L ,

as figure 6 shows: (30 − (−33))∕3 = 21kN.

A beam’s moments

A beam’s stored end moments are the part made by the joints’ movements. The part made by the load on the beam itself — the fixed-end moments qL2∕12 — is not in them, so a stored beam moment is not the total moment at the support. The design results have the totals.

Distributed load

q is the load along the member, N/m, under that case: zero under an earthquake.

You can check your reading of the signs yourself, as every engineer should before believing a sign convention. The shears of a storey’s columns add up to the storey’s shear: zero under gravity, and under an earthquake the sum of the horizontal forces on the floors above (CEN, 2004). Example 8.2 is that check as a query.

6.5 Load cases

name role along

what it is

G permanent

the permanent loads

Q variable

the variable (imposed) loads

Ex, Ey seismic x, y

the earthquake along each axis — present only when the building is analysed for one

Tx, Ty seismic x, y

accidental torsion, when the code asks for it as separate cases

Table 10: The load cases. A combination of them is made by the design and is not stored as a case.

6.6 The design

Every design row carries its run and its element — the design’s own copy of the element (§6.3).

section_design One row for each place on an element that was designed: its section, its dimensions (JSON, m), the steel it requires steel_required (m2, or m2/m when per_metre is 1), and governing_id, the derivation of the moment that governed it.

element section dimensions steel_required
beam span, support b0, d0 m2
column ortho 1, ortho 2, … b, d m2 on each face
slab spanX, spanY, side1 … side4 thickness m2/m
footing x, y lx, ly, depth m2; empty when it could not be designed
Table 11: The sections each element is designed at.

bar_set A set of identical bars: role, section, diameter (m), and either count or spacing (m), with their area (m2, or m2/m for a spaced set) and, where known, one bar’s length and its schedule mark. The roles: a beam’s top, bottom, bentUp, hanger (a bar bent up under a carried beam), side and stirrup (whose area is one leg’s, per metre), and a coupling beam’s diagonal bars and their groups’ diagonalHoop; a column’s longitudinal bars column, its links and hoops link, and a wall’s bars wall; a pad’s padX and padY; a slab’s slab, additional and span — the last each direction’s mesh as the level document gives it, section spanX or spanY, at its spacing, the bars of both kinds the Details lay that way together; a mat’s matX and matY. A column’s bars are counted sets: count bars (or links) of one diameter, one bar’s length; a set whose section is lap lies in the zone where the bars are lapped above the floor, and one with no section in the rest of the column. So a column’s main bars are its rows of role column, and how many links it has is the sum of count over its rows of role link. A beam’s counted sets (top, bottom, bentUp, hanger, diagonal) are the Details’ bars, one row for each, on the beam the bar lies in, and so are a coupling beam’s diagonalHoop, both groups’ in one row along the span: a support’s extra bars at end 2 of the span before the support — end 1 of the span after it where a run starts there — and the rest along the span; its length and mark are the label’s. Its links and side bars are the Draft’s, by span. Bars are written once the boards have been drawn after a design.

growth_step Each time the design enlarged a section: its step, counting the element’s steps in the run 1, 2, … in the order they were made, whatever the dimension (so a footing grown in x and y in turn has steps 1 and 2 for one enlargement of each; a dimension’s next step starts from the to_value of its last); the dimension (b, h, dx, dy, depth, thickness, …), from_value and to_value (m), and why, trigger_key (growth.bending, growth.shear, growth.bearing, growth.overturning, …). It is the one place that tells a footing grown for bearing from one grown for overturning: grewFor in foundationsDesign.json says the soil for both.

decision A check made: its leg (slabs, members, punching, foundations, …), its outcome — verified (and holds 1 or 0), notApplicable, or insufficient when it could not be made — and the reason as a key with its arguments, reason_key and reason_args. A footing that could not be designed has a decision with outcome insufficient in the foundations leg.

derivation, quantity, parameter Every quantity a design computed, at which section, under which quantity (quantity.name_key: quantity.designMoment, quantity.designAxial, quantity.punchingShear, …, each with its SI unit), and its value; parameter holds the values a computation was given rather than computed, with where each came from (source, such as setting), and derivation_id names the derivation it went into: the allowable soil pressure, quantity.soilAllowable, is the parameter of each footing’s quantity.soilPressure at its section soil. A pad footing carries what it was designed for: the column’s axial force at section ultimate and service (quantity.designAxial, N) and its two moments at ultimateX, ultimateY, serviceX, serviceY (quantity.designMoment, Nm, the x one varying the pressure along x), the moment per metre at the column’s face each way at section x and y (quantity.designMoment, Nm/m), and, under the punching leg at section contour, its effective depth (quantity.effectiveDepth, m). A beam’s span moment is its sagging moment, the free moment less the mean of its two end moments: positive when the span sags, negative when the moments at its ends are larger and the span does not sag at all. Its support moment is the larger end moment, in size. A slab’s moments, quantity.slabMoment, are in size too. A column’s section ortho n carries its design axial force, design moment and resisting moment, so the design moment over the resisting moment is how near the column is to its capacity.

6.7 An existing building’s record

On a project assessed as it stands (Codes.line assessment) the Draft and the Details draw the surveyed bars, and the database holds them as the run of stage ’record’ of each level. One is written after every Create Model of the level and every change to its record, in place of the last, and holds its own copy of the level’s elements. Its rows are the bars of each member the boards draw from the record, in bar_set, with the design’s roles and sections — a column’s column and link (span for its links, end for those of its critical regions), a beam’s top and bottom at end 1, span and end 2 and its stirrups — and a concrete jacket’s bars as jacketColumn and jacketLink; the beams’ bars the Details lay, in bar_laid, each set’s first bar as a polyline shape and its step, the first bar to the last (JSON [dx, dy, dz], m; the bars between equally spaced) — or, where a hook stands inward of its run, a list of those, one for each point of the shape (from version 23); and two tables of its own:

recorded_member Each member drawn from the record: its survey mark (the record’s name for it, which need not be the label the computation gives the element), its uuid, and every field the survey holds, fields, in the record’s own form (JSON: bars [{n, d}], links {d, s}, lengths in mm, strengths in MPa).

intervention Each intervention on such a member: its kind (concreteJacket, steelJacket, frpWrap, or new for a member the works add) and its fields (JSON), as the record holds them.

A member the boards do not draw from the record — one with no record, or one whose record they cannot draw yet — has no rows here.

Not filled yet The tables combination, combination_term and bar_layout, and the columns steel_minimum and steel_provided, are part of the design of the database and are empty today. Read the bars from bar_set.

7 The analysis arrays

The frame analysis solves the whole building at once, and some of what it computes is an array too large to be useful as rows: the displacements of every node, the record of every member’s end actions under every case, the shape of every mode. So is much of what the pushover, the response history and the grids of a mat or a raft compute: a curve step by step, every storey’s displacement through an earthquake, every node of a raft’s grid under every combination. They are kept in database/analysis.h5, an HDF5 file (The HDF Group, 2026), written as each of those computations ends and read with any HDF5 library; from Python, with h5py (Collette, 2026), which AutoStruct’s own Python has.

One group for each run The file holds a group /run/<run_id> for each run the database still holds that left arrays, named by the same run_id as the run table: the frame analysis (with its pushover, when the pushover is part of the solve), a pushover run on its own, a response history, a level’s Create Model where the level is a mat, and the foundation’s design where it is a raft. When a later run removes that run from the database (table 2), its group goes from the file too. The group’s attributes stage, started and finished are the run’s own.

dataset

shape

what

frame/endActions/combined

members × 11 × 6

each member’s record, gravity and earthquake

frame/endActions/G, /Q

members × 11 × 6

the same under the permanent and the imposed load alone

frame/displacements/static

nodes × 6

under gravity

frame/displacements/Ex, /Ey

nodes × 6

under the earthquake along x, along y

frame/reactions/static, /Ex, /Ey, /Q

nodes × 6

the forces at each node, the same cases

modes/<direction>

modes × nodes

each mode’s translation along its direction

push/<k>/curve

steps × 8

the pushover’s k-th curve

push/rotations/<k>

members × 4 × 9

each member’s ends at a target displacement

history/<k>/translations

nodes × 2

each node’s largest displacement, x and y, in analysis k

history/<k>/basicForces

members × 6

each member’s largest forces

history/<k>/plasticRotations

members × 4

each hinge end’s largest plastic rotation

history/<k>/drifts

storeys × 2

each storey’s largest drift

history/<k>/storeyDisplacements

instants × storeys × 2

every storey’s displacement through the analysis

history/design/...

as above

the design values over the analyses, with driftRatios and damageUtilisations

grid/<level>/matField

members × 6

a mat’s grid, each member’s moments

grid/<level>/lattice/...

nodes or members × …

a raft’s grid: xy, ends, properties, nodal, restrained, rigid

grid/<level>/combinations/<k>/...

nodes or members × …

the raft under its k-th combination: loads, displacements, endActions

Table 12: The datasets of a run. The frame analysis has the first part, one modes/<direction> for each direction the earthquake’s modes were computed along; a pushover the push/ part, a response history the history/ part, a mat’s Create Model and design and a raft’s design their grid/ part.

Numbered datasets Where a dataset’s name has a number - a curve, a state at a target, an analysis, a combination - it is the place of that thing in its order, counted from one, and the dataset’s attribute label says what it is: x modal for a curve, x uniform A1 for the state at a limit state’s target, the combination’s own name, or for a history’s storey displacements how far apart its instants are (rows 0.0025 s apart; the first instant is at rest). A number the computation did not give - the hinge of a step at which none formed - is NaN, never nought.

The pushover’s and the history’s columns A curve’s row is a step: the load factor, the control node’s displacement (m), the base shear (kN), the number of hinges, and the hinge that step formed, its member, its component, the force that reached the capacity and the capacity (kNm). A state at a target gives each end of a member, the pair about one axis and then the other, as its moment, shear and axial force, its basic and plastic rotations, whether it has yielded and unloaded (1 or 0), and gravity’s moment and axial force. A history’s basicForces are a member’s axial force, its four end moments and its torsion (kN, kNm); its storeyDisplacements are, at each instant, every storey’s mean horizontal displacement from the lowest storey up, the displacement under gravity alone taken off, so that a storey’s drift is the largest difference between its own and the one below it.

A raft’s grid A raft is solved as a grid of members on the soil. lattice/xy gives each node’s place (m), lattice/ends each member’s two nodes (counted from one), lattice/properties its bending and torsional stiffness (kNm2) and the soil’s support under it, and each combination its loads at the nodes (the vertical force, downward positive, and two moments), the displacements of the nodes (the settlement and two rotations) and each member’s six end actions in its own axes.

Rows and columns The member whose record in the member table is n is row n − 1 of the first axis, since the records count from one and an array from nought; likewise the node numbered n (node_a, node_b) is row n − 1. A node’s six values are the three translations, x, y, z, then the three rotations about them. A member’s record has eleven rows: the first is the gravity case; the second to the ninth are eight directions of the earthquake, each already combined with gravity; the tenth and eleventh are the displacements of the member’s first node under the earthquake along x and along y. Its six columns are the axial force, the moment about one axis at the first end and at the second, the moment about the other axis at the first end and at the second, and the torsion. The record is the computation’s own, signs and all: for a member’s forces in a stated convention, and in SI, read member_action (§6).

Units Unlike the database, the arrays are kept in the computation’s own units, exactly as it computed them - tonne-force and metres for the frame analysis, kN and metres for the pushover, the history and the grids - so that an array read here is the array the computation used, to the last digit. Each dataset says its units in its attribute units, one for each of its last axis’s columns: tf, tf m, m, rad, or 1 for a mode’s shape, which is scaled to one at its largest, and for a count or a ratio. Multiply a frame analysis’s tf by 10 to have kN: AutoStruct takes 1 tf as 10 kN exactly, in every document it writes.

Finding a dataset, and knowing it is the one The database’s table array_ref has a row for each dataset of a run: its name (’displacements/Ex’), the file, the dataset’s full path and its sha256. The same hash is the dataset’s attribute sha256, and it is of the values themselves, as 8-byte little-endian numbers in row order; a script can compute it to be sure the array is the run’s. Each dataset also names the computation’s file it was read from, in its attribute source.

import h5py, hashlib, numpy, sqlite3 
import autostruct 
 
folder = autostruct.project_dir() 
db = sqlite3.connect('file:%s?mode=ro' % (folder / 'database' / 'project.sqlite'), uri=True) 
(dataset, sha256), = db.execute( 
    "SELECT a.dataset, a.sha256 FROM array_ref a JOIN live_run r USING (run_id)" 
    " WHERE r.stage = 'epilysi' AND a.name = 'displacements/Ex'") 
with h5py.File(folder / 'database' / 'analysis.h5', 'r') as h5:      # read-only 
    ux = h5[dataset][:, 0]                                             # m, every node 
    assert hashlib.sha256(numpy.ascontiguousarray(h5[dataset][()], '<f8').tobytes()).hexdigest() == sha256 
print('the largest sway along x is %.1f mm' % (1000 * abs(ux).max()))

The file is written a moment after each computation has answered, by AutoStruct’s Python; a script that has just started a solve waits for it with autostruct::database::wait, which returns once the database and the arrays are both written. Open it read-only, ’r’, as above.

8 Worked examples

Each is a query to run with db.execute(...) on the read-only connection of §2. Put the level’s name where the examples have ’First’.

8.1 The axial force in each column of a level, under the permanent load

SELECT e.label, a.N / 1000.0 AS N_kN 
  FROM member m 
  JOIN live_run r      ON r.run_id = m.run_id AND r.stage = 'epilysi' 
  JOIN element e       ON e.element_id = m.element_id 
  JOIN level l         ON l.level_id = e.level_id AND l.name = 'First' 
  JOIN member_action a ON a.member_id = m.member_id 
  JOIN load_case c     ON c.case_id = a.case_id AND c.name = 'G' 
 WHERE m.kind = 'K' 
 ORDER BY e.number;

These are the columns below First (§6.2), in kN and with the program’s sign: a compression is negative. Asked for a force “as the program gives it”, keep that sign; turn it (-a.N) only when the compression is asked for as a positive number. The most compressed column is the one with the most negative N.

8.2 The storey shears: a check of the signs

SELECT m.storey, c.name, 
       sum((a.My_a - a.My_b) / m.length) / 1000.0 AS shear_x_kN, 
       sum((a.Mz_a - a.Mz_b) / m.length) / 1000.0 AS shear_y_kN 
  FROM member m 
  JOIN live_run r      ON r.run_id = m.run_id AND r.stage = 'epilysi' 
  JOIN member_action a ON a.member_id = m.member_id 
  JOIN load_case c     ON c.case_id = a.case_id 
 WHERE m.kind = 'K' 
 GROUP BY m.storey, c.name;

Under G and Q both shears are zero. Under Ex the x shear of each storey is the sum of the earthquake’s forces on the floors above it, and it grows downward; Ey likewise along y.

8.3 The steel each slab of a level requires

SELECT e.label, s.section, 
       json_extract(s.dimensions, '$.thickness') AS thickness_m, 
       s.steel_required * 1e4 AS required_cm2_per_m 
  FROM section_design s 
  JOIN live_run r ON r.run_id = s.run_id AND r.stage = 'design' 
  JOIN element e  ON e.element_id = s.element_id AND e.kind = 'slab' 
  JOIN level l    ON l.level_id = e.level_id AND l.name = 'First' 
 ORDER BY e.number, s.section;

8.4 The footings: their size, and whether they were designed

SELECT e.label, 
       json_extract(s.dimensions, '$.lx')    AS lx_m, 
       json_extract(s.dimensions, '$.ly')    AS ly_m, 
       json_extract(s.dimensions, '$.depth') AS depth_m, 
       EXISTS (SELECT 1 FROM decision d 
                WHERE d.run_id = s.run_id AND d.element_id = s.element_id 
                  AND d.leg = 'foundations' AND d.outcome = 'insufficient') 
         AS not_designed 
  FROM section_design s 
  JOIN live_run r ON r.run_id = s.run_id AND r.stage = 'design' 
  JOIN element e  ON e.element_id = s.element_id AND e.kind = 'footing' 
 WHERE s.section = 'x' 
 ORDER BY e.number;

The size here is the designed one; the element’s geometry has the size drawn. They differ where the design enlarged the pad, and growth_step says each step and why.

8.5 From a column’s forces to its design, across two runs

The frame’s members point to the elements of the level’s Create Model; the design’s rows point to the design’s copy. geokey carries one to the other:

WITH col AS ( 
  SELECT m.member_id, e.level_id, e.geokey, e.label 
    FROM member m 
    JOIN live_run r ON r.run_id = m.run_id AND r.stage = 'epilysi' 
    JOIN element e  ON e.element_id = m.element_id 
    JOIN level l    ON l.level_id = e.level_id AND l.name = 'First' 
   WHERE m.kind = 'K') 
SELECT col.label, 
       max(abs(a.My_a), abs(a.My_b)) / 1000.0     AS Ex_moment_kNm, 
       json_extract(s.dimensions, '$.b')          AS b_m, 
       json_extract(s.dimensions, '$.d')          AS d_m, 
       s.steel_required * 1e4                     AS steel_per_face_cm2 
  FROM col 
  JOIN member_action a ON a.member_id = col.member_id 
  JOIN load_case c     ON c.case_id = a.case_id AND c.name = 'Ex' 
  JOIN live_run rd     ON rd.stage = 'design' AND rd.level_id = col.level_id 
  JOIN element ed      ON ed.run_id = rd.run_id AND ed.geokey = col.geokey 
  JOIN section_design s ON s.run_id = rd.run_id AND s.element_id = ed.element_id 
 ORDER BY col.label;

8.6 A slab’s span moments, from its level document

slabs = document['level']['slabs'] 
result = {'P ' + s['id']['label']: (s['spanMoments']['Mx'], s['spanMoments']['My']) 
          for s in slabs if s['kind']['useType'] != 0} 
print(result)

Voids (useType 0) have no moments worth reporting and are left out.

8.7 A column’s centre and size, from its level document

A column’s corners are in its orthos; its extent is the smallest and largest of them, which serves a column of one rectangle or of several.

def box(column): 
    xs = [p['x'] for o in column['orthos'] for p in o['coords']] 
    ys = [p['y'] for o in column['orthos'] for p in o['coords']] 
    return min(xs), min(ys), max(xs), max(ys) 
 
k5 = [c for c in document['level']['columns'] if c['number'] == 5][0] 
x0, y0, x1, y1 = box(k5) 
centre = ((x0 + x1) / 2, (y0 + y1) / 2)              # m 
size = (round((x1 - x0) * 100), round((y1 - y0) * 100))   # cm along x and y 
on_x0 = sorted(c['number'] for c in document['level']['columns'] 
               if abs((box(c)[0] + box(c)[2]) / 2) <= 0.01)

Each corner is a point {’x’: ..., ’y’: ...}; there is no x2 in a column. A round column (cyclic) has centre and diameter instead.

8.8 A beam’s ends, a slab’s load, steel and supports, a footing’s size

level = document['level'] 
b9 = [b for b in level['beams'] if b['number'] == 9][0]['coords'] 
ends = ((b9['x1'], b9['y1']), (b9['x2'], b9['y2']))      # its drawn line, m 
 
p2 = [s for s in level['slabs'] if s['id']['label'] == '2'][0] 
g = p2['loads']['g']                                     # kN/m2 
asd_x = p2['reinforcement']['directionX']['Asd'] * 1e4   # m2/m to cm2/m 
sides = p2['boundaries']['numberOfSupports']             # how many beams bound it

And from the foundation’s level document:

foots = document['level']['foots'] 
deepest = max(f['dimensions']['depth'] for f in foots) * 100      # cm 
small = sum(1 for f in foots                          # under 1 m by 1 m 
            if f['dimensions']['dx'] < 1 - 0.001 and f['dimensions']['dy'] < 1 - 0.001)

A size the program stores is a computed number: a footing of 1.00m may be held as 0.9999999999999973. Compare it with a millimetre to spare, as above, or round it first.

None of these is in the database: a beam’s line, a slab’s loads and its Asd, a footing’s plan, are the level document’s.

8.9 The beams of a level whose load is over a limit, from its level document

A beam’s line loads g, q and g+q, in kN/m, are in the level document (§5.3), not in the database: the database’s q is the frame’s load along a member under one load case, and there is no case named g+q.

beams = document['level']['beams'] 
result = sorted(b['number'] for b in beams if b['loads']['g+q'] > 15) 
print(result)

9 The traps

  1. A query of an old run. Join through live_run; a run whose stage was run again is gone, and a frame result is gone after any level’s Create Model until the frame is solved again.
  2. A join on a label. Labels are for display; join on element_id within a run and on geokey across runs.
  3. A number from one run used in another. element_id, member_id and an element’s number mean nothing outside their run.
  4. The wrong level’s columns. In the database a level’s columns are the ones below it; the foundation has no column members.
  5. Units. The database is SI; a level document is kN, kNm, cm and mm, except a slab’s Asd, which is m2/m: multiply by 104 for cm2/m. Divide newtons by 1000 for kN.
  6. The sign of N. Compression is negative.
  7. The shear from the end moments. It is their difference over the length, not their sum.
  8. A beam’s stored end moment taken as the support moment. It leaves out qL2∕12; read the design’s moment.
  9. b0 taken as a width. Its sign is a side; its width is abs(b0).
  10. A pad’s coords taken as its centre. They are a corner.
  11. A slab found by its uuid. It is made afresh every time; use boundaries.centre.
  12. A slab looked for as ’P 3’ in a level document. There its id.label is the bare number, ’3’; the P is added only on the boards and in the database. A footing’s id.label does carry its letter: ’F 1’.
  13. lxtaken as the shorter span. It is the span along x.
  14. A column’s steel taken as the whole section’s. A column’s steel_required is per face.
  15. A number rounded before it is compared. Round only the answer.

References

Bray, T. (2017). The JavaScript Object Notation (JSON) Data Interchange Format. RFC 8259. Internet Engineering Task Force. url: https://www.rfc-editor.org/rfc/rfc8259.

Collette, A. (2026). HDF5 for Python. h5py. url: https://docs.h5py.org/ (visited on 11/08/2026).

Comité Européen de Normalisation (2004). Eurocode 8: Design of structures for earthquake resistance – Part 1: General rules, seismic actions and rules for buildings. EN 1998-1. CEN. Brussels.

Python Software Foundation (2026). sqlite3 — DB-API 2.0 interface for SQLite databases. The Python Standard Library. url: https://docs.python.org/3/library/sqlite3.html (visited on 10/24/2026).

SQLite Consortium (2026a). JSON Functions And Operators. SQLite. url: https://www.sqlite.org/json1.html (visited on 10/24/2026).

SQLite Consortium (2026b). STRICT Tables. SQLite. url: https://www.sqlite.org/stricttables.html (visited on 10/24/2026).

SQLite Consortium (2026c). Uniform Resource Identifiers. SQLite. url: https://www.sqlite.org/uri.html (visited on 10/24/2026).

The HDF Group (2026). HDF5. The HDF Group. url: https://www.hdfgroup.org/solutions/hdf5/ (visited on 11/08/2026).