Skip to content

Model JSON schema

The input to every solver entry point. All values are SI (N, m, Pa, rad).

json
{
  "nodes": [ ... ],
  "members": [ ... ],
  "plates": [ ... ],
  "materials": [ ... ],
  "sections": [ ... ],
  "load_cases": [ ... ],
  "nodal_loads": [ ... ],
  "member_loads": [ ... ],
  "plate_loads": [ ... ]
}

plates / plate_loads are optional (serde(default) -> empty), so older beam/truss models stay valid.

nodes

json
{ "id": 1, "x": 0.0, "y": 0.0, "z": 0.0, "restraint_flags": 63 }

restraint_flags is a bitmask of the restrained DOFs:

DOFTxTyTzRxRyRz
bit12481632

So 63 = fully fixed; 0 = free. Y is the vertical axis. For a 2D problem in the global X-Y plane, lock the out-of-plane DOFs (Tz|Rx|Ry = 28) on every node.

Spring supports & settlements (optional)

A node may also carry two 6-element arrays, indexed [Tx, Ty, Tz, Rx, Ry, Rz]:

json
{ "id": 1, "x": 0, "y": 0, "z": 0, "restraint_flags": 31,
  "spring_stiffness": [0, 1e6, 0, 0, 0, 0],
  "settlement":       [0, -0.005, 0, 0, 0, 0] }
FieldTypeDefaultMeaning
spring_stiffness[f64; 6]zerosElastic support stiffness per DOF (N/m translations, N·m/rad rotations). On a free DOF it acts as an elastic foundation; on a restrained DOF it resists the prescribed settlement.
settlement[f64; 6]zerosPrescribed displacement of a restrained DOF (m / rad). Ignored on free DOFs.

Both default to zero arrays (serde(default)), so existing models stay valid. The spring force appears in that node's reactions. (e.g. above: a 1 MN/m vertical spring at a node restrained in Y, with a 5 mm imposed settlement.)

members

json
{ "id": 1, "node_a": 1, "node_b": 2, "material_id": 1, "section_id": 1,
  "member_type": 0, "beta": 0.0 }

member_type: 0 = beam (frame), 1 = truss (axial only). beta is the section-roll angle in radians.

plates

4-node quadrilateral shell elements (SI metres):

json
{ "id": 1, "node_ids": [1, 2, 3, 4], "material_id": 1, "thickness": 0.01 }

materials

json
{ "id": 1, "e": 200e9, "g": 80e9, "nu": 0.3, "rho": 7850.0 }

nu (Poisson) and rho (density) are optional - default 0.3 / 7850. nu is needed for plate bending; rho for self-weight and modal mass.

sections

json
{ "id": 1, "a": 0.01, "iyy": 1.0e-4, "izz": 1.0e-4, "j": 2.0e-4 }

Area and second moments about the local principal axes, and the torsion constant.

load_cases

json
{ "id": 1, "name": "Dead", "self_weight_factor": 1.0 }

self_weight_factor (optional, default 0) auto-generates gravity loads from member/plate mass for that case.

load_combinations (optional)

Factored combinations of load cases (e.g. AS/NZS 1170 1.2G + 1.5Q). Each terms entry is [load_case_id, factor]:

json
{ "id": 1, "name": "1.2G + 1.5Q", "terms": [[1, 1.2], [2, 1.5]] }

When load_combinations is present, solve_model returns combinations and an envelope (max/min over all combinations) - see the results schema.

nodal_loads

json
{ "node_id": 2, "load_case_id": 1, "fx": 0, "fy": -12000, "fz": 0,
  "mx": 0, "my": 0, "mz": 0 }

Moments mx/my/mz are optional (default 0).

member_loads

Uniformly distributed load (force per length) in global directions:

json
{ "member_id": 1, "load_case_id": 1, "qx": 0, "qy": -5000, "qz": 0 }

A load_type field also supports point loads and partial/trapezoidal spans (start_ratio/end_ratio, qx2/qy2/qz2); plain qx/qy/qz stays a full-span UDL. The omitted fields default so existing inputs are unchanged.

plate_loads

Uniform pressure (Pa) over a plate:

json
{ "plate_id": 1, "load_case_id": 1, "pressure": 5000.0 }

Pressure sign

The plate pressure sign convention (which face a positive pressure pushes) is being pinned down in the solver - see the internal notes. Treat the magnitude as authoritative for now.