Skip to content

WASM API Reference ​

A narrative guide to the 57 WASM exports it covers, out of the 167 the Rust boundary exposes.
Each function takes a JSON string argument and returns a JSON string.
Units are SI throughout (m, N, Pa, N·m) unless explicitly noted.

This page is a guide, not the whole boundary. The complete reference is WASM exports: every one of the 167 exports, its signature, and the fields of the JSON it reads and returns, with each type on WASM types. Those pages are generated from the Rust source and its types by npm run docs:wasm and checked in CI, so they cannot fall behind the code; this page is written by hand and can. Where the two disagree, the generated pages are right. Both numbers above are checked against the manifest by scripts/gen_wasm_manifest.mjs.


Table of Contents ​


Units & Conventions ​

QuantityUnitNotes
LengthmSome concrete/steel design modules convert to mm internally.
ForceN
StressPaConcrete design modules convert to MPa internally.
MomentN·m
Aream²
MasskgNode mass field.
Angleradbeta, rotations.
TimesModal / time-history only.

Internal scaling notes:

  • pad_footing_design: b/d/h in m → mm internally, fPrimeC Pa → MPa internally.
  • retaining_wall_design: gammaSoil/gammaConc in N/m³, qAllowable in Pa. Core converts footing dimensions m→mm, fPrimeC Pa→MPa.
  • rc_shear_torsion_combined: vStar [N], tStar [N·m] (converted to N·mm internally), b/d/h [m], fPrimeC [Pa], aSt [m²].
  • Concrete beam/column/slab exports: dimensions m→mm, stress Pa→MPa, steel area m²→mm²; moments returned in N·m.
  • Connection exports (fin_plate_check, end_plate_check, base_plate_check): lengths m→mm, stresses Pa→MPa internally; capacities returned as forces (N) or moments (N·m).
  • aisc360_member_check & ec3_member_check: SI inputs converted to mm/MPa internally; capacities returned in N / N·m.
  • as5100_member_check: section geometry in mm, material in MPa, effective lengths in m; capacities returned in N / N·m.

Common Types ​

Many exports share the following input/output structs.

WasmModel ​

Standard FEM model definition used by solver exports.

json
{
  "nodes": [WasmNode],
  "members": [WasmMember],
  "materials": [WasmMaterial],
  "sections": [WasmSection],
  "load_cases": [WasmLoadCase],
  "nodal_loads": [WasmNodalLoad],
  "member_loads": [WasmMemberLoad],
  "plates": [WasmPlate],
  "plate_loads": [WasmPlateLoad],
  "load_combinations": [WasmLoadCombination]
}
FieldTypeDescription
nodes[WasmNode]Structural nodes.
members[WasmMember]1D members (beams / trusses).
materials[WasmMaterial]Linear-elastic material definitions.
sections[WasmSection]Cross-section properties.
load_cases[WasmLoadCase]Load case definitions.
nodal_loads[WasmNodalLoad]Concentrated nodal loads.
member_loads[WasmMemberLoad]Distributed / point member loads.
plates[WasmPlate]Quad shell elements (optional).
plate_loads[WasmPlateLoad]Pressure loads on plates (optional).
load_combinations[WasmLoadCombination]Linear combination definitions (optional).

WasmNode ​

json
{
  "id": 1,
  "x": 0.0,
  "y": 0.0,
  "z": 0.0,
  "restraint_flags": 63,
  "mass": 0.0,
  "spring_stiffness": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
  "settlement": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
}
FieldTypeDescription
idi32Unique node identifier.
x / y / zf64Global coordinates (m).
restraint_flagsu32Bit mask: Tx(1) Ty(2) Tz(4) Rx(8) Ry(16) Rz(32).
massf64Lumped nodal mass (kg). Default 0.
spring_stiffness[f64; 6]Ground spring stiffness per DOF (N/m or N·m/rad). Default all 0.
settlement[f64; 6]Prescribed support settlement per DOF. Default all 0.

WasmMember ​

json
{
  "id": 1,
  "node_a": 1,
  "node_b": 2,
  "material_id": 1,
  "section_id": 1,
  "member_type": 0,
  "beta": 0.0,
  "fixity_a": 0,
  "fixity_b": 0,
  "offset_a": [0.0, 0.0, 0.0],
  "offset_b": [0.0, 0.0, 0.0],
  "ke_x": 1.0,
  "ke_y": 1.0
}
FieldTypeDescription
idi32Unique member identifier.
node_a / node_bi32End-node IDs.
material_idi32Reference to WasmMaterial.id.
section_idi32Reference to WasmSection.id.
member_typei320=Beam, 1=Truss, 4=TensionOnly, 5=CompressionOnly.
betaf64Roll angle about local x-axis (rad).
fixity_a / fixity_bu32End-release bit mask (same bits as restraint_flags). Default 0.
offset_a / offset_b[f64; 3]Rigid end offsets in global coordinates (m). Default all 0.
ke_xf64Effective-length factor for major-axis buckling / LTB. Default 1.0.
ke_yf64Effective-length factor for minor-axis compression buckling. Default 1.0.

WasmMaterial ​

json
{
  "id": 1,
  "name": "Steel",
  "e": 200e9,
  "g": 80e9,
  "nu": 0.3,
  "rho": 7850.0,
  "alpha": 1.2e-5,
  "fy": 250e6,
  "fu": 400e6
}
FieldTypeDescription
idi32Unique material identifier.
nameStringHuman-readable name. Default "".
ef64Young's modulus (Pa).
gf64Shear modulus (Pa).
nuf64Poisson's ratio. Default 0.3.
rhof64Density (kg/m³). Default 7850.
alphaf64Thermal expansion coefficient (/°C). Default 1.2e-5.
fyf64Yield strength (Pa). Default 250e6.
fuf64Ultimate strength (Pa). Default 400e6.

WasmSection ​

json
{
  "id": 1,
  "a": 0.01,
  "iyy": 1e-4,
  "izz": 1e-4,
  "j": 2e-4,
  "zyy": 0.0,
  "zzz": 0.0,
  "syy": 0.0,
  "szz": 0.0,
  "d": 0.0,
  "bf": 0.0,
  "tf": 0.0,
  "tw": 0.0,
  "fy": 0.0,
  "name": ""
}
FieldTypeDescription
idi32Unique section identifier.
af64Cross-sectional area (m²).
iyyf64Minor-axis second moment of area (m⁴).
izzf64Major-axis second moment of area (m⁴).
jf64Torsion constant (m⁴).
zyy / zzzf64Elastic section moduli (m³). Default 0.
syy / szzf64Plastic section moduli (m³). Default 0.
d / bf / tf / twf64Section geometry for steel design (m). Default 0.
fyf64Section-specific yield strength override (Pa). Default 0 (use material).
nameStringSection name. Default "".

WasmLoadCase ​

json
{
  "id": 1,
  "name": "Dead",
  "self_weight_factor": 0.0,
  "load_case_type": 0
}
FieldTypeDescription
idi32Unique load-case identifier.
nameStringHuman-readable name.
self_weight_factorf64Self-weight multiplier. Default 0.
load_case_typei320=Dead, 1=Live, 2=Wind, 3=Seismic, 4=Snow, 5=Other, 6=WindUltimate, 7=WindServiceability, 8=SeismicServiceability. Default 0.

WasmNodalLoad ​

json
{
  "node_id": 1,
  "load_case_id": 1,
  "fx": 0.0,
  "fy": 0.0,
  "fz": -1000.0,
  "mx": 0.0,
  "my": 0.0,
  "mz": 0.0
}
FieldTypeDescription
node_idi32Target node.
load_case_idi32Load case.
fx / fy / fzf64Force components (N).
mx / my / mzf64Moment components (N·m). Default 0.

WasmMemberLoad ​

json
{
  "member_id": 1,
  "load_case_id": 1,
  "load_type": 0,
  "qx": 0.0,
  "qy": 0.0,
  "qz": -5000.0,
  "qx2": 0.0,
  "qy2": 0.0,
  "qz2": 0.0,
  "start_ratio": 0.0,
  "end_ratio": 1.0
}
FieldTypeDescription
member_idi32Target member.
load_case_idi32Load case.
load_typei320=UniformDistributed, 1=PointLoad, 2=Trapezoidal. Default 0.
qx / qy / qzf64Start / uniform load intensities (N/m).
qx2 / qy2 / qz2f64End load intensities for trapezoidal (N/m). Default 0.
start_ratiof64Normalised start position along member [0, 1]. Default 0.
end_ratiof64Normalised end position. For UDL, if <= start_ratio it defaults to 1.0 (whole member). Default 0.

WasmPlate ​

json
{
  "id": 1,
  "node_ids": [1, 2, 3, 4],
  "material_id": 1,
  "thickness": 0.01
}
FieldTypeDescription
idi32Unique plate identifier.
node_ids[i32; 4]Corner node IDs (quad only).
material_idi32Reference to WasmMaterial.id.
thicknessf64Plate thickness (m).

WasmPlateLoad ​

json
{
  "plate_id": 1,
  "load_case_id": 1,
  "pressure": -5000.0
}
FieldTypeDescription
plate_idi32Target plate.
load_case_idi32Load case.
pressuref64Normal pressure (Pa, positive = toward plate local -Z).

WasmLoadCombination ​

json
{
  "id": 101,
  "name": "1.2D+1.5L",
  "terms": [
    { "load_case_id": 1, "factor": 1.2 },
    { "load_case_id": 2, "factor": 1.5 }
  ]
}
FieldTypeDescription
idi32Unique combination identifier.
nameStringHuman-readable name.
terms[WasmComboTerm]Constituent load cases and factors.

WasmComboTerm ​

FieldTypeDescription
load_case_idi32Load case to factor.
factorf64Load factor.

WasmResults ​

Top-level results returned by solve_model and related solver exports.

json
{
  "load_cases": [WasmLoadCaseResults],
  "combinations": [WasmCombinationResults],
  "envelope": WasmEnvelopeResults | null
}
FieldTypeDescription
load_cases[WasmLoadCaseResults]Per load-case results.
combinations[WasmCombinationResults]Per combination results (empty if none defined).
envelopeWasmEnvelopeResults | nullMax/min envelopes over combinations (null if none).

WasmLoadCaseResults ​

json
{
  "load_case_id": 1,
  "displacements": [WasmNodeDisplacement],
  "member_forces": [WasmMemberForce],
  "reactions": [WasmReaction],
  "plate_results": [WasmPlateResult],
  "member_station_forces": [WasmMemberStationForces],
  "member_capacities": [WasmMemberCapacity]
}
FieldTypeDescription
load_case_idi32Echo of load case ID.
displacements[WasmNodeDisplacement]Nodal displacements.
member_forces[WasmMemberForce]End forces for each member.
reactions[WasmReaction]Support reactions.
plate_results[WasmPlateResult]Plate stress / moment results.
member_station_forces[WasmMemberStationForces]Internal forces at stations along each member.
member_capacities[WasmMemberCapacity]AS 4100 capacity check results (populated when steel design is enabled).

WasmNodeDisplacement ​

FieldTypeDescription
node_idi32Node identifier.
ux / uy / uzf64Translations (m).
rx / ry / rzf64Rotations (rad).

WasmMemberForce ​

FieldTypeDescription
member_idi32Member identifier.
fx1 / fy1 / fz1f64Force at end A (N).
mx1 / my1 / mz1f64Moment at end A (N·m).
fx2 / fy2 / fz2f64Force at end B (N).
mx2 / my2 / mz2f64Moment at end B (N·m).

WasmReaction ​

FieldTypeDescription
node_idi32Restrained node.
rx / ry / rzf64Reaction forces (N).
mx / my / mzf64Reaction moments (N·m).

WasmPlateResult ​

FieldTypeDescription
plate_idi32Plate identifier.
sx / sy / txyf64Membrane stresses at centroid (Pa).
mx / my / mxyf64Bending / twisting moments per unit width (N·m/m).
mx_star_bottom / my_star_bottomf64Design moments at bottom face (N·m/m).
mx_star_top / my_star_topf64Design moments at top face (N·m/m).
vonMisesf64von Mises stress (Pa).
bucklingFactorf64 | nullCritical buckling load factor (if computed).
sxTop / syTop / sxBottom / syBottomf64Membrane stresses at top / bottom faces (Pa).
sigma1Top / sigma2Top / thetaPTopf64Principal stresses & angle at top face (Pa, rad).
sigma1Bottom / sigma2Bottom / thetaPBottomf64Principal stresses & angle at bottom face (Pa, rad).

WasmMemberStationForces ​

FieldTypeDescription
member_idi32Member identifier.
stations[WasmStationForce]Internal forces at evaluation points.

WasmStationForce ​

FieldTypeDescription
s_normf64Normalised position [0, 1] along member.
sf64Absolute distance from end A (m).
nf64Axial force (N).
vy / vzf64Shear forces (N).
mx / my / mzf64Moments (N·m).
dy / dzf64Local deflections (m).

WasmMemberCapacity ​

json
{
  "member_id": 1,
  "fy": 300e6,
  "phi": 0.9,
  "axis_x": WasmAxisCapacity,
  "axis_y": WasmAxisCapacity,
  "compression": WasmCompressionCapacity,
  "phiNt": 1200e3,
  "phiVv": 450e3,
  "utilBiaxialSection": 0.42,
  "utilBiaxialMember": 0.38,
  "utilMax": 0.42,
  "assumptions": WasmCapacityAssumptions
}
FieldTypeDescription
member_idi32Member identifier.
fyf64Yield strength used (Pa).
phif64Capacity reduction factor.
axis_x / axis_yWasmAxisCapacityMajor / minor axis capacities.
compressionWasmCompressionCapacityCompression buckling capacity.
phiNtf64Tension capacity φNt (N).
phiVvf64Shear capacity φVv (N).
utilBiaxialSectionf64Section-level biaxial utilisation.
utilBiaxialMemberf64Member-level biaxial utilisation.
utilMaxf64Maximum utilisation across all checks.
assumptionsWasmCapacityAssumptionsAssumptions used (Le, kt, kl, kr, αm, αs, αb).

WasmAxisCapacity ​

FieldTypeDescription
compactnessWasmAxisCompactnessSection compactness classification.
Zef64Effective section modulus (m³).
phiMsf64Section moment capacity φMs (N·m).
phiMbf64Member moment capacity φMb (N·m).

WasmAxisCompactness ​

FieldTypeDescription
flange / webWasmPlateCompactnessSlenderness limits.
classString"compact", "non-compact", "slender".

WasmPlateCompactness ​

FieldTypeDescription
lambda_ef64Element slenderness.
lambda_epf64Plastic limit.
lambda_eyf64Yield limit.

WasmCompressionCapacity ​

FieldTypeDescription
kff64Form factor.
Nsf64Squash capacity (N).
phiNcx / phiNcyf64Compression capacities about x / y (N).
lambda_nf64Modified slenderness.
alpha_cf64Member slenderness reduction factor.

WasmCapacityAssumptions ​

FieldTypeDescription
le_x / le_yf64Effective lengths (m).
kt / kl / krf64Twist / load / rotation restraint factors.
alpha_m / alpha_s / alpha_bf64Moment modification, slenderness reduction, and residual-stress factors.

WasmCombinationResults ​

Same fields as WasmLoadCaseResults but with combination_id and name instead of load_case_id.

FieldTypeDescription
combination_idi32Combination identifier.
nameStringCombination name.
displacements[WasmNodeDisplacement]Combined displacements.
member_forces[WasmMemberForce]Combined member end forces.
reactions[WasmReaction]Combined reactions.

WasmEnvelopeResults ​

FieldTypeDescription
displacements_max / displacements_min[WasmNodeDisplacement]Envelope extremes.
member_forces_max / member_forces_min[WasmMemberForce]Envelope extremes.
reactions_max / reactions_min[WasmReaction]Envelope extremes.

WasmBucklingResults / WasmBucklingMode ​

json
{
  "modes": [
    { "index": 1, "load_factor": 15.3, "mode_shape": [WasmNodeDisplacement] }
  ]
}
FieldTypeDescription
indexusizeMode number (1-based).
load_factorf64Buckling load factor.
mode_shape[WasmNodeDisplacement]Normalised buckled shape.

WasmModalResults / WasmModalMode ​

json
{
  "modes": [
    { "index": 1, "frequency_hz": 3.45, "eigenvalue": 21.7, "mode_shape": [WasmNodeDisplacement] }
  ]
}
FieldTypeDescription
indexusizeMode number (1-based).
frequency_hzf64Natural frequency (Hz).
eigenvaluef64Eigenvalue (rad/s).
mode_shape[WasmNodeDisplacement]Normalised mode shape.

Other Shared Types ​

WasmStoreyDefinition ​

FieldTypeDescription
elevationf64Storey height above datum (m).
nodeIds[i32]Node IDs whose tributary mass contributes to this storey.

WasmStoreyForce ​

FieldTypeDescription
elevationf64Storey elevation (m).
weightf64Lumped storey weight (N).
forcef64Lateral force assigned to this storey (N).
cvf64Distribution coefficient w·h^k / Σ(w·h^k).

Solver / Analysis ​

solve_model ​

Performs a full linear static analysis for all load cases in the model.

Input: WasmModel JSON

Output: WasmResults JSON (see Common Types).

Notes:

  • Automatically subdivides physical members at intermediate nodes before solving.
  • If load_combinations are provided, they are solved and an envelope is computed.
  • Returns {"error": "..."} on parse or solve failure.

solve_model_pdelta ​

Iterative P-Delta (geometric stiffness) analysis for the first load case.

Input: WasmModel JSON + extra arguments:

json
{
  "model": { ... },
  "max_iterations": 10,
  "tolerance": 1e-6
}

Wait - the actual WASM signature is solve_model_pdelta(json_input: &str, max_iterations: usize, tolerance: f64).
The caller must pass the JSON string as arg 0 and the two scalars as separate JS arguments.

Output: WasmResults JSON (single load case only).

Notes:

  • P-Delta is applied to the first load case only.
  • Uses fem_core::solver::solve_load_case_pdelta internally.

solve_model_tc ​

Tension/compression-only member analysis for the first load case (iterative removal of members that go into tension or compression depending on their type).

Input: WasmModel JSON + extra argument:

Signature: solve_model_tc(json_input: &str, max_iterations: usize)

Output: WasmResults JSON (single load case only).

Notes:

  • Members with member_type: 4 (TensionOnly) or 5 (CompressionOnly) are iteratively removed when they develop the wrong sign of axial force.
  • max_iterations caps the iteration count.

solve_model_buckling ​

Linear buckling (eigenvalue) analysis.

Signature: solve_model_buckling(json_input: &str, load_case_id: i32, n_modes: usize)

Input: WasmModel JSON

Output: WasmBucklingResults JSON

json
{
  "modes": [
    { "index": 1, "load_factor": 15.3, "mode_shape": [WasmNodeDisplacement] }
  ]
}

Notes:

  • Applies the specified load_case_id as the reference load vector.
  • load_factor is the multiplier at which buckling occurs under that reference load.

solve_model_modal ​

Undamped free-vibration (modal) analysis.

Signature: solve_model_modal(json_input: &str, n_modes: usize)

Input: WasmModel JSON

Output: WasmModalResults JSON

json
{
  "modes": [
    { "index": 1, "frequency_hz": 3.45, "eigenvalue": 21.7, "mode_shape": [WasmNodeDisplacement] }
  ]
}

Notes:

  • Consistent mass matrix built from nodal masses and material density.
  • Physical members are auto-subdivided before solving (same as solve_model).

member_capacities_only ​

Compute AS 4100 member capacities without running a full FEM solve. Fast path for auto-sizing.

Input: WasmMemberCapacitiesInput JSON

json
{
  "model": { ... },
  "member_forces": [WasmMemberForce]
}
FieldTypeDescription
modelWasmModelModel definition (geometry, sections, materials).
member_forces[WasmMemberForce]Optional solved end forces for αm / utilisation update.

Output: WasmMemberCapacitiesOutput JSON

json
{
  "member_capacities": [WasmMemberCapacity]
}

Notes:

  • If member_forces are empty, utilisations and alpha_m use default / uniform-moment assumptions.
  • Catches panics internally and returns {"error": "Capacity computation panicked"}.

Results / Reports ​

analysis_report ​

Generates a concise JSON summary of a solved model: stats, extreme reactions / displacements, per-member utilisation, and a pass/fail rollup.

Signature: analysis_report(model_json: &str, results_json: &str) -> String

Input: Two JSON strings: the WasmModel and the WasmResults.

Output: AnalysisReport JSON

json
{
  "stats": {
    "nodeCount": 4,
    "memberCount": 3,
    "plateCount": 0,
    "loadCaseCount": 2,
    "combinationCount": 1,
    "hasEnvelope": true
  },
  "maxReactions": [
    { "component": "Ry", "value": 12000.0, "node_id": 1, "load_case_id": 1 }
  ],
  "maxDisplacements": [
    { "component": "uz", "value": 0.012, "node_id": 3, "load_case_id": 1 }
  ],
  "memberUtilisation": [
    { "member_id": 1, "utilMax": 0.42, "governing": "biaxial section", "pass": true }
  ],
  "passFailRollup": {
    "totalMembersChecked": 3,
    "passingMembers": 3,
    "failingMembers": 0,
    "maxUtilOverall": 0.42,
    "pass": true
  }
}
FieldTypeDescription
statsModelStatsModel size and envelope presence.
maxReactions[ReactionExtreme]Peak reaction per component across all load cases.
maxDisplacements[DisplacementExtreme]Peak absolute displacement per component.
memberUtilisation[MemberUtilSummary]Governing utilisation per member (first load case with capacities).
passFailRollupPassFailRollupOverall pass/fail summary.

ReactionExtreme / DisplacementExtreme ​

FieldTypeDescription
componentStringComponent name (e.g. "Ry", "uz").
valuef64Extreme value (N or m / rad).
node_idi32Node where extreme occurs.
load_case_idi32Load case where extreme occurs.

MemberUtilSummary ​

FieldTypeDescription
member_idi32Member identifier.
utilMaxf64Maximum utilisation.
governingString"biaxial section" or "biaxial member".
passbooltrue if utilMax <= 1.0.

PassFailRollup ​

FieldTypeDescription
totalMembersCheckedusizeCount of members with capacity data.
passingMembersusizeCount with pass = true.
failingMembersusizeCount with pass = false.
maxUtilOverallf64Maximum utilMax across all members.
passbooltrue if failingMembers == 0.

Steel Design (AS 4100) ​

as4100_phi_ms ​

AS 4100 section moment capacity φMs for a doubly symmetric I-section.

Input: WasmAs4100SectionInput JSON

json
{
  "d": 0.248,
  "bf": 0.124,
  "tf": 0.008,
  "tw": 0.005,
  "z_x": 4.8e-6,
  "s_x": 5.5e-6,
  "fyf": 300e6,
  "fyw": 300e6
}
FieldTypeDescription
df64Overall depth (m).
bff64Flange width (m).
tff64Flange thickness (m).
twf64Web thickness (m).
z_xf64Elastic section modulus (m³).
s_xf64Plastic section modulus (m³).
fyf / fywf64Flange / web yield strength (Pa).

Output: WasmAs4100PhiMsResult JSON

json
{
  "section_class": "compact",
  "lambda_s": 8.2,
  "lambda_sp": 9.0,
  "lambda_sy": 15.0,
  "z_ex": 5.5e-6,
  "m_sx": 1650.0,
  "phi_m_sx": 1485.0
}
FieldTypeDescription
section_classString"compact", "non-compact", "slender".
lambda_sf64Section slenderness.
lambda_sp / lambda_syf64Plastic / yield slenderness limits.
z_exf64Effective section modulus (m³).
m_sxf64Nominal moment capacity (N·m).
phi_m_sxf64Design moment capacity φMs (N·m).

as4100_phi_nc ​

AS 4100 member compression capacity φNc.

Input: WasmAs4100PhiNcInput JSON

json
{
  "area": 3.25e-3,
  "r": 0.038,
  "fy": 300e6,
  "kf": 1.0,
  "alpha_b": 0.0,
  "le_mm": 5000.0,
  "phi": 0.9
}
FieldTypeDescription
areaf64Cross-sectional area (m²).
rf64Radius of gyration (m).
fyf64Yield strength (Pa).
kff64Form factor. Default 1.0.
alpha_bf64Residual-stress parameter. Default 0.
le_mmf64Effective length (mm) - note: mm, not m.
phif64Capacity reduction factor. Default 0.9.

Output: WasmAs4100PhiNcResult JSON

json
{
  "lambda_n": 0.85,
  "alpha_c": 0.92,
  "n_s": 975e3,
  "n_c": 897e3,
  "phi_n_c": 807e3
}
FieldTypeDescription
lambda_nf64Modified slenderness.
alpha_cf64Member slenderness reduction factor.
n_sf64Squash capacity (N).
n_cf64Nominal member capacity (N).
phi_n_cf64Design capacity φNc (N).

as4100_phi_mbx ​

AS 4100 member moment capacity φMbx (LTB check).

Input: WasmAs4100PhiMbxInput JSON

json
{
  "d": 0.248,
  "bf": 0.124,
  "tf": 0.008,
  "tw": 0.005,
  "z_x": 4.8e-6,
  "s_x": 5.5e-6,
  "fyf": 300e6,
  "fyw": 300e6,
  "i_y": 3.5e-5,
  "j": 1.5e-7,
  "i_w": 0.0,
  "e": 200000.0,
  "g": 80000.0,
  "le_mm": 5000.0,
  "alpha_m_case": 0,
  "beta_m": 0.0,
  "phi": 0.9
}
FieldTypeDescription
(section fields)Same as WasmAs4100SectionInput (all in m, Pa).
i_yf64Minor-axis second moment of area (m⁴).
jf64Torsion constant (m⁴).
i_wf64Warping constant (m⁶). Default 0.
ef64Young's modulus (MPa). Default 200_000.
gf64Shear modulus (MPa). Default 80_000.
le_mmf64Effective length (mm).
alpha_m_casei320=UniformMoment, 1=SimplySupportedUdl, 2=SimplySupportedPointLoad, 3=EndMoments, 4=CantileverUdl.
beta_mf64End-moment ratio for alpha_m_case: 3. Default 0.
phif64Capacity reduction factor. Default 0.9.

Output: WasmAs4100PhiMbxResult JSON

json
{
  "m_sx": 1650.0,
  "m_o": 4500.0,
  "alpha_s": 0.55,
  "alpha_m": 1.0,
  "phi_m_bx": 817.0
}
FieldTypeDescription
m_sxf64Section capacity (N·m).
m_of64Elastic buckling moment (N·m).
alpha_sf64Slenderness reduction factor.
alpha_mf64Moment modification factor.
phi_m_bxf64Design capacity φMbx (N·m).

as4100_phi_vv ​

AS 4100 web shear capacity φVv.

Input: WasmAs4100PhiVvInput JSON

json
{
  "d": 0.248,
  "tw": 0.005,
  "tf": 0.008,
  "fy": 300e6,
  "section_name": "250UB25.7"
}
FieldTypeDescription
df64Overall depth (m).
twf64Web thickness (m).
tff64Flange thickness (m).
fyf64Yield strength (Pa).
section_nameStringSection name (used for special-case tables).

Output: WasmAs4100PhiVvResult JSON

json
{ "phi_vv": 280e3 }
FieldTypeDescription
phi_vvf64Design shear capacity φVv (N).

as4100_alpha_b ​

Returns the AS 4100 residual-stress factor αb for a given section name.

Signature: as4100_alpha_b(section_name: &str) -> f64

Input: Plain string (not JSON). Example: "250UB25.7"

Output: f64 - the αb value (e.g. 0.0 for hot-rolled I sections).


as4100_alpha_m ​

Computes the AS 4100 moment-modification factor αm from end moments.

Input: WasmAs4100AlphaMInput JSON

json
{ "my1": 50e3, "my2": -30e3 }
FieldTypeDescription
my1 / my2f64End moments (N·m).

Output: WasmAs4100AlphaMResult JSON

json
{ "alpha_m": 1.35 }
FieldTypeDescription
alpha_mf64Moment modification factor.

as4100_combined ​

AS 4100 combined axial + biaxial bending capacity check (Section 8).

Input: WasmAs4100CombinedInput JSON

json
{
  "m_star_x": 80e3,
  "m_star_y": 20e3,
  "n_star": -500e3,
  "phi_msx": 120e3,
  "phi_msy": 45e3,
  "phi_mbx": 100e3,
  "phi_mby": 45e3,
  "phi_ncx": 600e3,
  "phi_ncy": 250e3,
  "phi_nt": 800e3,
  "ns": 975e3,
  "section_class": "compact",
  "kf": 1.0
}
FieldTypeDescription
m_star_x / m_star_yf64Design moments (N·m). Default m_star_y = 0.
n_starf64Design axial force (N, negative = compression).
phi_msx / phi_msyf64Section moment capacities (N·m). Default phi_msy = 0.
phi_mbx / phi_mbyf64Member moment capacities (N·m). Default phi_mby = 0.
phi_ncx / phi_ncyf64Compression capacities (N).
phi_ntf64Tension capacity (N).
nsf64Squash capacity (N).
section_classString"compact", "non-compact", "slender".
kff64Form factor. Default 1.0.

Output: WasmAs4100CombinedResult JSON

json
{
  "phi_m_rx": 120e3,
  "phi_m_ry": 45e3,
  "phi_m_ox": 100e3,
  "phi_m_oy": 45e3,
  "section_util_x": 0.67,
  "section_util_y": 0.44,
  "member_util_x": 0.80,
  "member_util_y": 0.44,
  "axial_util": 0.83,
  "util_biaxial_section": 0.89,
  "util_biaxial_member": 0.94,
  "util_max": 0.94
}
FieldTypeDescription
phi_m_rx / phi_m_ryf64Reduced section moment capacities (N·m).
phi_m_ox / phi_m_oyf64Reduced member moment capacities (N·m).
section_util_x / section_util_yf64Section-level utilisations.
member_util_x / member_util_yf64Member-level utilisations.
axial_utilf64Axial force utilisation.
util_biaxial_sectionf64Combined section utilisation.
util_biaxial_memberf64Combined member utilisation.
util_maxf64Maximum of all utilisations.

Steel Design (AS 5100) ​

as5100_member_check ​

Full AS 5100.6 bridge steel member check: section classification, moment, compression, tension, shear, and combined.

Input: WasmAs5100MemberInput JSON

json
{
  "d": 248.0,
  "bf": 124.0,
  "tf": 8.0,
  "tw": 5.0,
  "a": 3250.0,
  "iyy": 3.5e7,
  "izz": 4.8e8,
  "j": 1.5e5,
  "zzz": 0.0,
  "szz": 0.0,
  "zyy": 0.0,
  "syy": 0.0,
  "fy": 300.0,
  "fu": 440.0,
  "e": 200000.0,
  "leMajor": 5.0,
  "leMinor": 2.5,
  "alphaMCase": 1,
  "beta_m": 0.0,
  "nStar": -300e3,
  "mxStar": 80e3,
  "myStar": 10e3,
  "vxStar": 50e3
}
FieldTypeDescription
d / bf / tf / twf64Section geometry in mm.
af64Area mm².
iyy / izz / jf64Second moments mm⁴.
zzz / szz / zyy / syyf64Section moduli mm³ (auto-computed if 0).
fy / fu / ef64Material MPa. Default e = 200_000.
leMajor / leMinorf64Effective lengths m.
alphaMCasei32Same cases as AS 4100.
beta_mf64End-moment ratio. Default 0.
nStar / mxStar / myStar / vxStarf64Applied forces N / N·m.

Output: WasmAs5100MemberResult JSON

json
{
  "phiMsx": 120e3,
  "phiMsy": 45e3,
  "phiMbx": 100e3,
  "phiMby": 45e3,
  "phiNcx": 600e3,
  "phiNcy": 250e3,
  "phiNt": 800e3,
  "phiVv": 280e3,
  "section_class": "compact",
  "utilAxial": 0.50,
  "utilFlexX": 0.80,
  "utilFlexY": 0.22,
  "utilShear": 0.18,
  "utilCombined": 0.94,
  "utilMax": 0.94,
  "governing": "OK",
  "assumptions": { "leMajor": 5.0, "leMinor": 2.5, "alpha_m": 1.13, "alpha_s": 0.55, "section_class": "compact" }
}
FieldTypeDescription
phiMsx / phiMsyf64Section moment capacities (N·m).
phiMbx / phiMbyf64Member moment capacities (N·m).
phiNcx / phiNcyf64Compression capacities (N).
phiNtf64Tension capacity (N).
phiVvf64Shear capacity (N).
section_classStringCompactness classification.
utilAxial / utilFlexX / utilFlexY / utilShear / utilCombined / utilMaxf64Utilisations.
governingString"OK" or "OVER".
assumptionsWasmAs5100AssumptionsEffective lengths and factors used.

Notes:

  • Invalid geometry (zero or negative) returns a result with all zeros and governing: "invalid input".
  • Minor-axis LTB is not reduced (φMby = φMsy per AS 5100 Cl 5.3.1).

as5100_combined ​

AS 5100.6 combined capacity check (same interaction equations as AS 4100 Section 8 but with AS 5100 factors).

Input: WasmAs5100CombinedInput JSON - same fields as WasmAs4100CombinedInput but with camelCase keys (mStarX, phiMsx, etc.).

Output: WasmAs5100CombinedResult JSON - same utilisations as AS 4100 combined but with camelCase keys (phiMRx, sectionUtilX, utilBiaxialMember, etc.).


Steel Design (AISC 360) ​

aisc360_member_check ​

Full AISC 360-16 member check: tension, compression, flexure, shear, and interaction.

Input: WasmAisc360MemberInput JSON

json
{
  "d": 0.248,
  "bf": 0.124,
  "tf": 0.008,
  "tw": 0.005,
  "a": 3.25e-3,
  "iyy": 3.5e-5,
  "izz": 4.8e-6,
  "j": 1.5e-7,
  "zzz": 0.0,
  "szz": 0.0,
  "fy": 300e6,
  "fu": 450e6,
  "e": 200e9,
  "leMajor": 5.0,
  "leMinor": 2.5,
  "lb": 5.0,
  "cb": 1.0,
  "nStar": -300e3,
  "mxStar": 80e3,
  "myStar": 10e3,
  "vxStar": 50e3
}
FieldTypeDescription
d / bf / tf / twf64Section geometry m.
af64Area m².
iyy / izz / jf64Second moments m⁴.
zzz / szzf64Section moduli m³ (auto-computed if 0).
fy / fu / ef64Material Pa. Default e = 200e9.
leMajor / leMinorf64Effective lengths m.
lbf64LTB unbraced length m.
cbf64Lateral-torsional buckling modification factor. Default 1.0.
nStar / mxStar / myStar / vxStarf64Applied forces N / N·m.

Output: WasmAisc360MemberResult JSON

json
{
  "phiPn": 900e3,
  "phiPnComp": 700e3,
  "phiMnx": 120e3,
  "phiMny": 35e3,
  "phiVn": 280e3,
  "section_class": "compact",
  "utilAxial": 0.43,
  "utilFlexX": 0.67,
  "utilFlexY": 0.29,
  "utilShear": 0.18,
  "utilCombined": 0.88,
  "utilMax": 0.88,
  "governing": "H1-1a",
  "assumptions": { "leMajor": 5.0, "leMinor": 2.5, "lb": 5.0, "cb": 1.0 }
}
FieldTypeDescription
phiPnf64Tension capacity (N).
phiPnCompf64Compression capacity (N).
phiMnx / phiMnyf64Major / minor axis moment capacities (N·m).
phiVnf64Shear capacity (N).
section_classString"compact", "non-compact", "slender".
utilAxial / utilFlexX / utilFlexY / utilShear / utilCombined / utilMaxf64Utilisations.
governingStringInteraction equation ("H1-1a", "H1-1b", "none").
assumptionsWasmAisc360AssumptionsEffective lengths and cb used.

Notes:

  • Invalid geometry returns zeros with governing: "invalid input".
  • Minor-axis flexure is estimated as 0.9·Fy·Zy where Zy = Iyy / (bf/2).

Steel Design (Eurocode 3) ​

ec3_member_check ​

Full EN 1993-1-1 member check: cross-section resistances, flexural buckling, LTB, shear, and simplified M-N interaction.

Input: WasmEc3MemberInput JSON

json
{
  "d": 0.248,
  "bf": 0.124,
  "tf": 0.008,
  "tw": 0.005,
  "a": 3.25e-3,
  "iyy": 3.5e-5,
  "izz": 4.8e-6,
  "j": 1.5e-7,
  "zzz": 0.0,
  "szz": 0.0,
  "w_pl_y": 0.0,
  "w_el_y": 0.0,
  "fy": 300e6,
  "e": 200e9,
  "lcrY": 5.0,
  "lcrZ": 2.5,
  "lcrLT": 5.0,
  "c1": 1.0,
  "nStar": -300e3,
  "myStar": 80e3,
  "mzStar": 10e3,
  "vyStar": 50e3
}
FieldTypeDescription
d / bf / tf / twf64Section geometry m.
af64Area m².
iyy / izz / jf64Second moments m⁴.
zzz / szzf64Major-axis moduli m³ (auto if 0).
w_pl_y / w_el_yf64Plastic / elastic modulus m³ (auto if 0).
fy / ef64Material Pa. Default e = 200e9.
lcrY / lcrZ / lcrLTf64Buckling lengths m.
c1f64LTB equivalent uniform moment factor. Default 1.0.
nStar / myStar / mzStar / vyStarf64Applied forces N / N·m.

Output: WasmEc3MemberResult JSON

json
{
  "NtRd": 900e3,
  "NcRd": 975e3,
  "NbYRd": 700e3,
  "NbZRd": 300e3,
  "MyRd": 135e3,
  "MzRd": 30e3,
  "MbRd": 110e3,
  "VplRd": 280e3,
  "section_class": "class 1",
  "utilAxial": 0.43,
  "utilFlexY": 0.59,
  "utilFlexZ": 0.33,
  "utilShear": 0.18,
  "utilCombined": 0.95,
  "utilMax": 0.95,
  "governing": "EC3 6.3.3",
  "assumptions": { "lcrY": 5.0, "lcrZ": 2.5, "lcrLT": 5.0, "c1": 1.0, "curveY": "a", "curveZ": "b", "curveLT": "a" }
}
FieldTypeDescription
NtRdf64Tension resistance (N).
NcRdf64Compression resistance (N).
NbYRd / NbZRdf64Flexural buckling resistances (N).
MyRd / MzRdf64Major / minor axis moment resistances (N·m).
MbRdf64LTB resistance (N·m).
VplRdf64Shear resistance (N).
section_classString"class 1" … "class 4".
utilAxial / utilFlexY / utilFlexZ / utilShear / utilCombined / utilMaxf64Utilisations.
governingStringInteraction check reference.
assumptionsWasmEc3AssumptionsBuckling lengths, c1, and buckling curves used.

Notes:

  • Invalid geometry returns zeros with governing: "invalid input".
  • Interaction uses EC3 6.3.3 simplified M-N with ky = kz = kLT = 1.0.

Steel Design (AS 4600) ​

as4600_capacity ​

AS 4600 cold-formed steel section capacity (compression + bending).

Input: WasmAs4600Input JSON

json
{
  "section_type": "LippedC",
  "d": 0.15,
  "b": 0.075,
  "t": 0.0015,
  "r": 0.003,
  "f_y": 450e6,
  "e": 200e9,
  "lip": 0.02
}
FieldTypeDescription
section_typeString"PlainC", "LippedC", "Z", "SHS", "RHS".
df64Depth (m).
bf64Width (m).
tf64Thickness (m).
rf64Internal corner radius (m). Default 0.
f_yf64Yield strength (Pa).
ef64Young's modulus (Pa). Default 200e9.
lipf64Lip length for lipped C-sections (m). Default 0.

Output: WasmAs4600Result JSON

json
{
  "phiNc": 85e3,
  "phiMs": 12e3,
  "aGross": 4.5e-4,
  "aEff": 3.8e-4,
  "zGross": 1.2e-5,
  "zEff": 9.5e-6,
  "governing": "compression"
}
FieldTypeDescription
phiNcf64Design compression capacity (N).
phiMsf64Design moment capacity (N·m).
aGross / aEfff64Gross / effective area (m²).
zGross / zEfff64Gross / effective section modulus (m³).
governingStringGoverning limit state.

Timber (AS 1720) ​

as1720_timber_check ​

AS 1720.1 timber member check for a rectangular sawn, MGP or glulam section: bending, compression about each axis, tension and shear. φ, k4, k6, k9 and k12 are derived from the inputs; k1 is given. Cross-checked against timberas and the SA HB 108 worked examples, not yet verified against the standard (see docs/reference/as1720_validation.md).

Units: millimetres, N and N·mm (unlike most exports, which are SI base).

Input: WasmAs1720Input JSON

json
{
  "grade": "MGP10",
  "species": "softwood",
  "seasoned": true,
  "category": 2,
  "b": 35,
  "d": 190,
  "length": 2800,
  "la_y": 0,
  "restraint_edge": "compression",
  "g13x": 1.0,
  "g13y": 1.0,
  "k1": 1.0,
  "m_star": 5e6,
  "n_star": 2e3,
  "nt_star": 0,
  "v_star": 10e3
}
FieldTypeDescription
gradeString"F4"…"F34", "MGP10"/"MGP12"/"MGP15", "GL8"…"GL18". Anything else is an error.
speciesString"softwood" (default) or "hardwood"; an F-grade's f't depends on it.
seasonedboolDefault true; selects the ρb / ρc expressions of Appendix E2.
categoryu8Application category 1-3 (Table 2.1), sets φ. Default 2.
b / df64Breadth of one board and depth (mm).
n_boardsu32Boards fixed side by side (default 1).
lengthf64Member length L (mm): column length and span for k9. Absent -> no stability check.
la_yf64Lateral restraint spacing (mm) for S1 and S4. Defaults to length.
la_phif64Torsional restraint spacing (mm), for restraint_edge: "tension_and_torsional".
restraint_edgeString"compression" (default), "tension" or "tension_and_torsional".
g13x / g13yf64Effective length factors (Table 3.2). Default 1.0.
rf64Temporary / total action ratio for ρb, ρc. Default 0.25.
n_members / spacingu32 / f64Parallel system for k9 (members, spacing mm). Default 1 / 0.
partial_seasoning / high_tempboolTable 2.5 k4 for unseasoned timber; k6 = 0.9 regions.
a_tf64Net tension area (mm²). Defaults to the gross area.
k1f64Load duration factor. Default 1.0.
k4 / k6 / k9 / k12 / k12cf64Optional overrides of the derived factors.
m_star / n_star / nt_star / v_starf64Design actions (N·mm / N). Default 0.
le_bending / le_compressionf64Legacy: read as la_y / length when those are absent.

Output: WasmAs1720Result JSON

json
{
  "phiM": 1300000, "phiN": 2855, "phiNcx": 66560, "phiNcy": 2855, "phiNt": 33050, "phiV": 7758,
  "phi": 0.7, "k1": 1, "k4": 1, "k6": 1, "k9": 1,
  "k12": 0.5514, "k12x": 0.7943, "k12y": 0.03407, "k12c": 0.03407,
  "rhoB": 0.7283, "rhoC": 0.9577, "S1": 26.05, "S3": 14.74, "S4": 80,
  "continuousRestraint": false, "stabilityAssessed": true,
  "fB": 16, "fT": 7.1, "fS": 2.5, "fC": 18, "E": 10000,
  "utilM": 3.845, "utilN": 0.7006, "utilNt": 0, "utilV": 1.289, "utilMax": 3.845,
  "governing": "bending"
}

(The input above, run through the export, rounded to four figures. The 2.8 m stud is unrestrained about its minor axis, so k12y is 0.034 and bending governs at 3.8.)

FieldTypeDescription
phiM / phiNt / phiVf64Capacities (N·mm / N).
phiNf64Compression capacity, the smaller of phiNcx and phiNcy (N).
phi, k1, k4, k6, k9f64Factors used.
k12 / k12x / k12y / k12cf64Stability factors: bending, compression about x and y, governing compression.
rhoB / rhoC / S1 / S3 / S4f64Material constants and slenderness coefficients behind k12.
continuousRestraintboolWhether la_y is within L_CLR (Eq 3.2(6)).
stabilityAssessedboolfalse when no length was given: k12 is then 1 and stability was not checked.
fB / fT / fS / fC / Ef64Characteristic values after the size notes (MPa).
utilM / utilN / utilNt / utilV / utilMaxf64Utilisations.
governingStringGoverning check.

Concrete (AS 3600) ​

as3600_rc_member_check ​

Combined RC beam/column check: bending, axial, and shear.

Input: WasmRcMemberInput JSON

json
{
  "b": 0.4,
  "d_section": 0.6,
  "d": 0.55,
  "d_sc": 0.05,
  "f_prime_c": 32e6,
  "f_sy": 500e6,
  "a_st": 0.0025,
  "a_sc": 0.0,
  "n_star": 500e3,
  "m_star": 200e3,
  "v_star": 180e3
}
FieldTypeDescription
bf64Section width (m).
d_sectionf64Overall depth (m).
df64Effective depth to tension steel (m).
d_scf64Cover to compression steel (m). Default 0.
f_prime_cf64Concrete strength (Pa).
f_syf64Steel yield strength (Pa).
a_st / a_scf64Tension / compression steel area (m²). Default a_sc = 0.
n_star / m_star / v_starf64Design actions (N / N·m / N).

Output: WasmRcMemberResult JSON

json
{
  "phiMu": 320e3,
  "phiNuo": 4500e3,
  "phiMN": 280e3,
  "phiVuc": 210e3,
  "util_bending": 0.63,
  "util_axial": 0.11,
  "util_interaction": 0.71,
  "util_shear": 0.86,
  "util_max": 0.86,
  "governing": "shear"
}
FieldTypeDescription
phiMuf64Bending capacity (N·m).
phiNuof64Axial-only capacity (N).
phiMNf64Axial-bending combined capacity (N·m).
phiVucf64Concrete shear capacity (N).
util_bending / util_axial / util_interaction / util_shear / util_maxf64Utilisations.
governingStringGoverning check ("bending", "axial", "shear", etc.).

Notes:

  • Dimensions converted m→mm, stresses Pa→MPa, m_star N·m→N·mm internally.
  • Returned moments are converted back to N·m.

as3600_rc_beam_moment ​

RC beam moment capacity (singly or doubly reinforced).

Input: WasmRcBeamInput JSON

json
{
  "b": 0.4,
  "d": 0.55,
  "d_sc": 0.05,
  "f_prime_c": 32e6,
  "f_sy": 500e6,
  "a_st": 0.0025,
  "a_sc": 0.0
}
FieldTypeDescription
b / df64Width and effective depth (m).
d_scf64Compression steel cover (m). Default 0.
f_prime_c / f_syf64Concrete and steel strengths (Pa).
a_st / a_scf64Steel areas (m²). Default a_sc = 0.

Output: WasmRcBeamResult JSON

json
{
  "phiMu": 320e3,
  "kU": 0.28,
  "a": 0.154,
  "phi": 0.8,
  "overReinforced": false
}
FieldTypeDescription
phiMuf64Moment capacity (N·m).
kUf64Neutral-axis depth ratio k_u = d_n / d.
af64Equivalent rectangular stress-block depth (m).
phif64Strength-reduction factor.
overReinforcedbooltrue if concrete crushes before steel yields.

as3600_rc_beam_shear ​

RC beam concrete shear capacity φVuc per AS 3600.

Input: WasmRcShearInput JSON

json
{
  "b": 0.4,
  "d": 0.55,
  "f_prime_c": 32e6,
  "a_st": 0.0025
}
FieldTypeDescription
b / df64Width and effective depth (m).
f_prime_cf64Concrete strength (Pa).
a_stf64Tensile steel area (m²).

Output: WasmRcShearResult JSON

json
{
  "phiVuc": 210e3,
  "vUc": 280e3,
  "rhoW": 0.005,
  "phi": 0.7
}
FieldTypeDescription
phiVucf64Design shear capacity (N).
vUcf64Nominal shear capacity (N).
rhoWf64Steel ratio A_st / (b·d).
phif64Strength-reduction factor.

as3600_rc_column_capacity ​

RC column capacity check including interaction curve.

Input: WasmRcColumnInput JSON

json
{
  "b": 0.4,
  "d_section": 0.6,
  "d": 0.55,
  "d_sc": 0.05,
  "f_prime_c": 32e6,
  "f_sy": 500e6,
  "a_st": 0.0025,
  "a_sc": 0.0,
  "n_star": 2000e3,
  "m_star": 300e3
}
FieldTypeDescription
b / d_section / d / d_scf64Dimensions (m).
f_prime_c / f_syf64Strengths (Pa).
a_st / a_scf64Steel areas (m²).
n_star / m_starf64Design actions (N / N·m).

Output: WasmRcColumnResult JSON

json
{
  "phiNuo": 4500e3,
  "phiMu": 420e3,
  "phiMN": 380e3,
  "util_n": 0.44,
  "util_m": 0.71,
  "util_interaction": 0.76,
  "util_max": 0.76,
  "curve": { ... }
}
FieldTypeDescription
phiNuof64Axial-only capacity (N).
phiMuf64Pure bending capacity (N·m).
phiMNf64Combined capacity at n_star (N·m).
util_n / util_m / util_interaction / util_maxf64Utilisations.
curveWasmRcColumnCurveResultFull N-M interaction curve points.

WasmRcColumnCurveResult ​

json
{
  "points": [
    { "c": 0.0, "n": 4500e3, "m": 0.0, "phi": 0.6, "phiN": 4500e3, "phiM": 0.0, "label": "pure_compression" }
  ],
  "phiNuo": 4500e3,
  "phiMu": 420e3,
  "nBalanced": 2200e3,
  "mBalanced": 380e3
}
FieldTypeDescription
points[WasmRcColumnCurvePoint]Interaction curve vertices.
phiNuof64Pure compression capacity (N).
phiMuf64Pure moment capacity (N·m).
nBalanced / mBalancedf64Balanced point (N / N·m).

WasmRcColumnCurvePoint ​

FieldTypeDescription
cf64Neutral-axis depth fraction.
n / mf64Nominal N and M at this point.
phif64Strength-reduction factor.
phiN / phiMf64Factored capacities.
labelStringPoint label.

as3600_rc_column_interaction_curve ​

Returns the full N-M interaction curve for an RC column without checking a specific demand.

Input: WasmRcColumnInput JSON (same as as3600_rc_column_capacity, but n_star and m_star are ignored).

Output: WasmRcColumnCurveResult JSON (same curve object as above).


rc_shear_torsion_combined ​

AS 3600 combined shear + torsion capacity check.

Input: WasmShearTorsionInput JSON

json
{
  "vStar": 180e3,
  "tStar": 45e3,
  "b": 0.4,
  "d": 0.55,
  "h": 0.6,
  "fPrimeC": 32e6,
  "aSt": 0.0025
}
FieldTypeDescription
vStarf64Design shear force (N).
tStarf64Design torsion (N·m).
b / d / hf64Section dimensions (m).
fPrimeCf64Concrete strength (Pa).
aStf64Longitudinal tensile steel area (m²).

Output: WasmShearTorsionResult JSON

json
{
  "phiVUc": 210e3,
  "phiTUc": 68e3,
  "utilV": 0.86,
  "utilT": 0.66,
  "utilCombined": 0.94,
  "utilMax": 0.94,
  "governing": "combined"
}
FieldTypeDescription
phiVUcf64Concrete shear capacity φVuc (N).
phiTUcf64Torsion capacity φTuc (N·m).
utilV / utilT / utilCombined / utilMaxf64Utilisations.
governingString"shear", "torsion", or "combined".

Notes:

  • tStar is converted N·m → N·mm internally.
  • Dimensions converted m → mm, fPrimeC Pa → MPa, aSt m² → mm².

Concrete Slabs (AS 3600) ​

as3600_slab_check ​

Combined slab check: moment capacity, minimum steel, punching shear, and deflection.

Input: WasmSlabInput JSON

json
{
  "d": 0.25,
  "cover": 0.03,
  "f_prime_c": 32e6,
  "f_sy": 500e6,
  "a_st_per_m": 0.001,
  "m_star": 50e3,
  "col_a": 0.4,
  "col_b": 0.4,
  "n_star": 1000e3,
  "span": 6.0,
  "support_type": 0
}
FieldTypeDescription
df64Overall slab thickness (m).
coverf64Concrete cover (m).
f_prime_c / f_syf64Strengths (Pa).
a_st_per_mf64Tensile steel area per unit width (m²/m).
m_starf64Design moment per unit width (N·m/m).
col_a / col_bf64Column dimensions for punching check (m).
n_starf64Design axial load for punching (N).
spanf64Slab span for deflection check (m).
support_typei320=SimplySupported, 1=Continuous, 2=Cantilever. Default 0.

Output: WasmSlabResult JSON

json
{
  "phiMu": 85e3,
  "a_st_provided": 0.001,
  "a_st_min": 8e-4,
  "util_min_steel": 0.80,
  "util_moment": 0.59,
  "phiVUo": 1200e3,
  "util_punching": 0.83,
  "lOverDActual": 24.0,
  "lOverDLimit": 32.0,
  "util_deflection": 0.75,
  "util_max": 0.83,
  "governing": "punching"
}
FieldTypeDescription
phiMuf64Moment capacity (N·m/m).
a_st_provided / a_st_minf64Steel areas (m²/m).
util_min_steel / util_momentf64Utilisations.
phiVUof64Punching shear capacity (N).
util_punchingf64Punching utilisation.
lOverDActual / lOverDLimitf64Span/depth ratios.
util_deflectionf64Deflection utilisation (actual / limit).
util_maxf64Maximum utilisation.
governingStringGoverning check.

as3600_slab_strip_moment ​

Slab strip moment capacity and minimum steel check.

Input: WasmSlabStripInput JSON

json
{
  "d": 0.25,
  "cover": 0.03,
  "f_prime_c": 32e6,
  "f_sy": 500e6,
  "a_st_per_m": 0.001,
  "m_star": 50e3
}
FieldTypeDescription
d / coverf64Thickness and cover (m).
f_prime_c / f_syf64Strengths (Pa).
a_st_per_mf64Steel area per unit width (m²/m).
m_starf64Design moment (N·m/m).

Output: WasmSlabStripResult JSON

json
{
  "phiMu": 85e3,
  "a_st_provided": 0.001,
  "a_st_min": 8e-4,
  "util_min_steel": 0.80,
  "util_moment": 0.59
}
FieldTypeDescription
phiMuf64Moment capacity (N·m/m).
a_st_provided / a_st_minf64Steel areas (m²/m).
util_min_steel / util_momentf64Utilisations.

as3600_slab_punching_shear ​

AS 3600 slab punching shear capacity at a column.

Input: WasmSlabPunchingInput JSON

json
{
  "d": 0.25,
  "cover": 0.03,
  "f_prime_c": 32e6,
  "col_a": 0.4,
  "col_b": 0.4,
  "n_star": 1000e3
}
FieldTypeDescription
d / coverf64Thickness and cover (m).
f_prime_cf64Concrete strength (Pa).
col_a / col_bf64Column dimensions (m).
n_starf64Design axial load (N).

Output: WasmSlabPunchingResult JSON

json
{
  "d": 0.22,
  "u": 2.4,
  "f_cv": 1.8,
  "vUo": 1200e3,
  "phiVUo": 950e3,
  "util_punching": 0.83
}
FieldTypeDescription
df64Effective depth (m).
uf64Critical perimeter (m).
f_cvf64Concrete shear stress factor.
vUof64Design punching shear force (N).
phiVUof64Punching shear capacity (N).
util_punchingf64Utilisation.

as3600_slab_deflection ​

AS 3600 simplified slab deflection span/depth check.

Input: WasmSlabDeflectionInput JSON

json
{
  "span": 6.0,
  "d": 0.25,
  "f_sy": 500e6,
  "support_type": 0
}
FieldTypeDescription
spanf64Span (m).
df64Effective depth (m).
f_syf64Steel yield strength (Pa).
support_typei320=SimplySupported, 1=Continuous, 2=Cantilever. Default 0.

Output: WasmSlabDeflectionResult JSON

json
{
  "lOverDActual": 24.0,
  "lOverDLimit": 32.0,
  "util_deflection": 0.75
}
FieldTypeDescription
lOverDActualf64Actual span/depth ratio.
lOverDLimitf64AS 3600 limit.
util_deflectionf64actual / limit.

Composite (AS 2327) ​

composite_beam_check ​

Simply-supported composite steel-concrete beam capacity check.

Input: WasmCompositeBeamInput JSON

json
{
  "span": 10.0,
  "beam_spacing": 3.0,
  "d": 0.5,
  "b_f": 0.19,
  "t_f": 0.014,
  "t_w": 0.009,
  "f_y": 300e6,
  "z_e": 1.2e-3,
  "d_s": 0.12,
  "f_prime_c": 32e6,
  "n_studs": 20,
  "d_stud": 0.019,
  "f_u_stud": 450e6,
  "m_star": 500e3
}
FieldTypeDescription
spanf64Beam span (m).
beam_spacingf64Tributary width (m).
d / b_f / t_f / t_wf64Steel section geometry (m).
f_yf64Steel yield strength (Pa).
z_ef64Elastic section modulus (m³).
d_sf64Slab thickness above deck (m).
f_prime_cf64Concrete strength (Pa).
n_studsi32Number of shear studs.
d_studf64Stud diameter (m).
f_u_studf64Stud ultimate strength (Pa).
m_starf64Design moment (N·m).

Output: WasmCompositeBeamResult JSON

json
{
  "bEff": 2.5,
  "fCc": 3200e3,
  "fSt": 2800e3,
  "mFull": 650e3,
  "mBare": 420e3,
  "phiMbv": 585e3,
  "eta": 0.88,
  "pnaInSlab": true,
  "phiNQ": 2500e3,
  "nStudsReq": 17.6,
  "util_stud": 0.88,
  "util_moment": 0.85,
  "util_max": 0.88
}
FieldTypeDescription
bEfff64Effective slab width (m).
fCcf64Concrete compression force (N).
fStf64Steel tension force (N).
mFullf64Full-interaction moment capacity (N·m).
mBaref64Bare steel moment capacity (N·m).
phiMbvf64Design composite moment capacity (N·m).
etaf64Degree of shear connection.
pnaInSlabbooltrue if plastic neutral axis is in the slab.
phiNQf64Stud shear capacity (N).
nStudsReqf64Required number of studs.
util_stud / util_moment / util_maxf64Utilisations.

Pad Footing ​

pad_footing_design ​

AS 3600 / AS 2870 pad footing design: bearing, moment, one-way shear, and punching.

Input: WasmPadFootingInput JSON

json
{
  "columnBx": 0.4,
  "columnBy": 0.4,
  "footingBx": 2.5,
  "footingBy": 2.5,
  "footingH": 0.6,
  "cover": 0.05,
  "fPrimeC": 32e6,
  "fSy": 500e6,
  "qUlt": 400e3,
  "nStar": 2500e3,
  "mxStar": 800e3,
  "myStar": 600e3,
  "selfWeight": 0.0
}
FieldTypeDescription
columnBx / columnByf64Column dimensions (m).
footingBx / footingBy / footingHf64Footing plan dimensions and thickness (m).
coverf64Concrete cover to reinforcement (m).
fPrimeCf64Concrete compressive strength (Pa).
fSyf64Reinforcement yield strength (Pa).
qUltf64Ultimate soil bearing pressure (Pa).
nStarf64Design axial load (N, positive compression).
mxStar / myStarf64Design moments (N·m).
selfWeightf64Optional self-weight of footing (N). Default 0.

Output: WasmPadFootingResult JSON

json
{
  "cornerPressures": [320e3, 280e3, 260e3, 220e3],
  "qMax": 320e3,
  "qAllowable": 400e3,
  "utilBearing": 0.80,
  "dEff": 0.525,
  "mXDesign": 450e3,
  "mYDesign": 380e3,
  "aStXReq": 0.0025,
  "aStYReq": 0.0021,
  "aStMin": 0.0018,
  "aStXProvided": 0.0028,
  "aStYProvided": 0.0024,
  "utilMomentX": 0.89,
  "utilMomentY": 0.88,
  "vX": 520e3,
  "vY": 480e3,
  "phiVUc": 650e3,
  "utilShear": 0.80,
  "punchingPerimeter": 4.2,
  "vPunch": 1800e3,
  "phiVPunch": 2200e3,
  "utilPunching": 0.82,
  "utilMax": 0.89,
  "governing": "moment_x"
}
FieldTypeDescription
cornerPressures[f64; 4]Soil pressure at four corners (Pa).
qMaxf64Maximum corner pressure (Pa).
qAllowablef64Echo of qUlt (Pa).
utilBearingf64qMax / qAllowable.
dEfff64Effective depth to tensile reinforcement (m).
mXDesign / mYDesignf64Design bending moments per unit width (N·m/m).
aStXReq / aStYReqf64Required steel area per unit width (m²/m).
aStMinf64Minimum reinforcement area per unit width (m²/m).
aStXProvided / aStYProvidedf64Provided steel area (currently set equal to required + min).
utilMomentX / utilMomentYf64Moment utilisations.
vX / vYf64Design one-way shear forces (N).
phiVUcf64Concrete shear capacity (N).
utilShearf64Max one-way shear utilisation.
punchingPerimeterf64Critical punching perimeter at dEff/2 from column face (m).
vPunchf64Design punching shear force (N).
phiVPunchf64Punching shear capacity (N).
utilPunchingf64Punching utilisation.
utilMaxf64Highest utilisation.
governingStringGoverning check.

Notes:

  • If invalid inputs cause NaN utilisation, returns {"error": "..."} where the message is the governing string from the core.

Retaining Wall ​

retaining_wall_design ​

Cantilever retaining wall check: sliding, overturning, bearing, stem bending, and heel bending.

Input: WasmRetainingWallInput JSON

json
{
  "wallHeight": 3.0,
  "stemThicknessBase": 0.35,
  "stemThicknessTop": 0.2,
  "baseWidth": 2.5,
  "baseThickness": 0.4,
  "toeLength": 0.6,
  "gammaSoil": 18e3,
  "ka": 0.33,
  "gammaConc": 24e3,
  "fPrimeC": 32e6,
  "fSy": 500e6,
  "cover": 0.05,
  "phiBaseDeg": 30.0,
  "qAllowable": 200e3
}
FieldTypeDescription
wallHeightf64Stem height above base (m).
stemThicknessBase / stemThicknessTopf64Stem thickness at base / top (m).
baseWidth / baseThicknessf64Base slab dimensions (m).
toeLengthf64Toe length in front of stem (m).
gammaSoilf64Unit weight of retained soil (N/m³).
kaf64Active earth-pressure coefficient.
gammaConcf64Unit weight of concrete (N/m³). Default 24e3.
fPrimeCf64Concrete strength (Pa).
fSyf64Steel yield strength (Pa).
coverf64Concrete cover (m).
phiBaseDegf64Base friction angle (°). Default 30.
qAllowablef64Allowable soil bearing pressure (Pa).

Output: WasmRetainingWallResult JSON

json
{
  "pa": 89.1e3,
  "paHeight": 1.7,
  "slidingResistance": 110e3,
  "utilSliding": 0.81,
  "restoringMoment": 420e3,
  "overturningMoment": 151e3,
  "utilOverturning": 0.36,
  "resultantX": 1.34,
  "eccentricity": 0.21,
  "qMax": 185e3,
  "qMin": 45e3,
  "utilBearing": 0.92,
  "stemMoment": 95e3,
  "stemAst": 0.0012,
  "utilStem": 0.78,
  "heelMoment": 62e3,
  "heelAst": 0.0009,
  "utilHeel": 0.65,
  "utilMax": 0.92,
  "governing": "bearing"
}
FieldTypeDescription
paf64Total active thrust per metre length (N/m).
paHeightf64Height of resultant active thrust above base (m).
slidingResistancef64Resisting force from base friction (N/m).
utilSlidingf64pa / slidingResistance.
restoringMoment / overturningMomentf64Moments about toe (N·m/m).
utilOverturningf64overturningMoment / restoringMoment.
resultantXf64Position of vertical resultant from toe (m).
eccentricityf64Eccentricity from base centre (m).
qMax / qMinf64Max/min soil bearing pressure (Pa).
utilBearingf64qMax / qAllowable.
stemMoment / heelMomentf64Design moments (N·m/m).
stemAst / heelAstf64Required steel area per unit width (m²/m).
utilStem / utilHeelf64Moment utilisations.
utilMaxf64Maximum utilisation.
governingStringGoverning check ("sliding", "overturning", "bearing", "stem", "heel").

Seismic ​

distribute_seismic_forces ​

Distributes a total seismic base shear to storey nodes per AS 1170.4 equivalent-static method.

Input: WasmSeismicDistributionInput JSON

json
{
  "model": { ... },
  "baseShear": 500e3,
  "period": 0.8,
  "direction": [1.0, 0.0, 0.0],
  "storeys": [
    { "elevation": 0.0, "nodeIds": [1, 2] },
    { "elevation": 3.5, "nodeIds": [3, 4] }
  ],
  "loadCaseId": 99,
  "verticalAxis": null
}
FieldTypeDescription
modelWasmModelModel for mass extraction.
baseShearf64Total seismic base shear (N).
periodf64Building period (s).
direction[f64; 3]Horizontal direction vector.
storeys[WasmStoreyDefinition]Storey elevations and node IDs.
loadCaseIdi32Load case to attach generated nodal loads.
verticalAxisString | nullOptional axis name ("Z", "Y", etc.).

Output: WasmSeismicDistributionResult JSON

json
{
  "nodalLoads": [WasmNodalLoad],
  "storeyForces": [WasmStoreyForce],
  "totalBaseShear": 500e3,
  "sumForces": 500e3,
  "k": 1.5
}
FieldTypeDescription
nodalLoads[WasmNodalLoad]Nodal forces to inject into the model.
storeyForces[WasmStoreyForce]Per-storey lateral force, weight, and coefficient.
totalBaseShearf64Echo of input (N).
sumForcesf64Sum of storey forces (should equal totalBaseShear).
kf64Vertical distribution exponent (1.0 for T <= 0.5 s; 2.0 for T >= 2.5 s; linear in between).

response_spectrum_analysis ​

Modal response-spectrum analysis using SRSS or CQC combination.

Input: WasmResponseSpectrumInput JSON

json
{
  "model": { ... },
  "spectrum_points": [[0.0, 0.5], [0.5, 1.0], [1.0, 0.8]],
  "direction": "X",
  "n_modes": 10,
  "damping_ratio": 0.05,
  "combination_method": "SRSS"
}
FieldTypeDescription
modelWasmModelStandard FEM model.
spectrum_points[[f64, f64]]Spectrum pairs [period_s, accel_m_s2].
directionString"X", "Y", or "Z".
n_modesusizeNumber of modes. Default 10.
damping_ratiof64Damping ratio. Default 0.05.
combination_methodString"SRSS" or "CQC". Default "SRSS".

Output: WasmResponseSpectrumResult JSON

json
{
  "direction": "X",
  "combination_method": "SRSS",
  "damping_ratio": 0.05,
  "total_mass": 15000.0,
  "total_effective_mass": 14500.0,
  "combined_base_shear": 420e3,
  "mode_responses": [
    { "modeIndex": 1, "periodS": 0.85, "frequencyHz": 1.18, "spectralAccel": 0.45, "participationFactor": 1.2, "effectiveMass": 8000.0, "baseShear": 250e3 }
  ],
  "combined_displacements": [WasmNodeDisplacement]
}
FieldTypeDescription
direction / combination_method / damping_ratioEchoes of inputs.
total_massf64Total lumped mass (kg).
total_effective_massf64Sum of effective modal masses (kg).
combined_base_shearf64Combined base shear (N).
mode_responses[WasmModeResponse]Per-mode contribution.
combined_displacements[WasmNodeDisplacement]SRSS/CQC combined peak displacements.

WasmModeResponse ​

FieldTypeDescription
mode_indexusizeMode number.
period_s / frequency_hzf64Period and frequency.
spectralAccelf64Spectral acceleration (m/s²).
participationFactorf64Modal participation factor.
effectiveMassf64Effective modal mass (kg).
baseShearf64Modal base shear (N).

Time History ​

Modal superposition time-history analysis using a ground-motion record.

Input: WasmTimeHistoryInput JSON

json
{
  "model": { ... },
  "record": [[0.0, 0.0], [0.01, 0.05], [0.02, -0.03]],
  "direction": [1.0, 0.0, 0.0],
  "damping_ratio": 0.05,
  "n_modes": 6
}
FieldTypeDescription
modelWasmModelStandard FEM model.
record[[f64, f64]]Ground-motion pairs [time_s, acceleration_m_s2].
direction[f64; 3]Ground-motion direction vector. Default [1, 0, 0].
damping_ratiof64Modal damping ratio. Default 0.05.
n_modesusizeNumber of modes. Default 6.

Output: WasmTimeHistoryResult JSON

json
{
  "peak_displacements": [WasmNodeDisplacement],
  "peakBaseShearX": 45000.0,
  "peakBaseShearY": 1200.0,
  "peakBaseShearZ": 0.0,
  "n_modes": 6,
  "n_steps": 200,
  "dt": 0.01
}
FieldTypeDescription
peak_displacements[WasmNodeDisplacement]Peak absolute displacement per node.
peakBaseShearX / peakBaseShearY / peakBaseShearZf64Peak global base shear (N).
n_modesusizeModes actually used.
n_stepsusizeTime steps analysed.
dtf64Average time step (s).

Notes:

  • Base shear computed by summing support reactions at restrained nodes.
  • If the record has fewer than 2 points or mismatched lengths, returns {"error": "Invalid ground motion record"}.

Influence Lines ​

influence_line ​

Returns influence-line ordinates for a single-span idealised beam.

Input: WasmInfluenceLineInput JSON

json
{
  "span": 10.0,
  "support_type": "SimplySupported",
  "action": "moment",
  "station": 0.5,
  "n_points": 101
}
FieldTypeDescription
spanf64Beam span (m).
support_typeString"SimplySupported", "Cantilever", "FixedFixed", "FixedPinned".
actionString"moment", "shear", "reaction".
stationf64Normalised position [0, 1] where action is measured.
n_pointsusizeNumber of sample points. Default 101.

Output: WasmInfluenceLineResult JSON

json
{
  "action": "moment",
  "station": 0.5,
  "span": 10.0,
  "support": "SimplySupported",
  "positions": [0.0, 0.1, ..., 10.0],
  "ordinates": [0.0, 0.09, ..., 0.0]
}
FieldTypeDescription
actionStringEcho of requested action.
stationf64Normalised station.
spanf64Echo of span.
supportStringEcho of support type.
positions[f64]Absolute x positions (m).
ordinates[f64]Influence ordinates (dimensionless).

Notes:

  • For "reaction", station < 0.5 returns left-hand reaction line; otherwise right-hand.
  • Ordinates are signed; positive when a unit load increases the measured action.

moving_load_effect ​

Maximum and minimum effect of a vehicle crossing a span using the relevant influence line.

Input: WasmMovingLoadInput JSON

json
{
  "span": 10.0,
  "support_type": "SimplySupported",
  "action": "moment",
  "station": 0.5,
  "n_points": 101,
  "vehicle": {
    "axle_weights": [10000.0, 10000.0],
    "axle_spacings": [0.0, 4.0]
  }
}
FieldTypeDescription
(span, support_type, action, station, n_points)Same as influence_line.
vehicle.axle_weights[f64]Axle forces (N).
vehicle.axle_spacings[f64]Axle positions relative to first axle (m).

Output: WasmMovingLoadResult JSON

json
{
  "max_value": 125000.0,
  "min_value": -25000.0,
  "critical_position_max": 5.0,
  "critical_position_min": 0.0
}
FieldTypeDescription
max_value / min_valuef64Maximum / minimum effect (N or N·m).
critical_position_max / critical_position_minf64First-axle position when extreme occurs (m).

Notes:

  • Vehicle is stepped across the span in increments determined by n_points.

influence_line_continuous ​

Builds an influence line for a specific action in a continuous beam / frame by direct simulation (unit load stepping).

Input: WasmContinuousInfluenceLineInput JSON

json
{
  "model": { ... },
  "member_ids": [1, 2, 3],
  "action": "moment",
  "station_member": 2,
  "station_local_x": 0.5,
  "support_node": 0,
  "n_points": 101
}
FieldTypeDescription
modelWasmModelStandard FEM model.
member_ids[i32]Ordered member IDs forming the continuous load path.
actionString"moment", "shear", "reaction".
station_memberi32Member ID where ordinates are evaluated.
station_local_xf64Normalised position [0, 1] along station_member.
support_nodei32Node ID for reaction actions. Default 0 (ignored).
n_pointsusizeResolution along the total path. Default 101.

Output: WasmContinuousInfluenceLineResult JSON

json
{
  "action": "moment",
  "station_member": 2,
  "station_local_x": 0.5,
  "total_length": 12.0,
  "positions": [0.0, 0.12, ..., 12.0],
  "ordinates": [0.0, 0.05, ...],
  "support_reaction_node": null
}
FieldTypeDescription
actionStringEcho of action.
station_memberi32Evaluation member.
station_local_xf64Evaluation position.
total_lengthf64Total path length (m).
positions[f64]Load positions along path (m from start).
ordinates[f64]Influence ordinates.
support_reaction_nodei32 | nullPopulated only for reaction actions.

Notes:

  • Runs a full static solve at every load position; keep n_points modest for large models.
  • Unit load is applied vertically in global -Z.

Load Generation ​

generate_load_combinations ​

Generates factored load combinations from a set of load cases per AS/NZS 1170.

Input: WasmComboGenInput JSON

json
{
  "load_cases": [WasmLoadCase],
  "psi_l": 0.4,
  "psi_c": 0.4,
  "psi_s": 0.7
}
FieldTypeDescription
load_cases[WasmLoadCase]Load cases to combine.
psi_lf64Live load combination factor. Default 0.4.
psi_cf64Companion action factor. Default 0.4.
psi_sf64Snow load combination factor. Default 0.7.

Output: WasmComboGenOutput JSON

json
{
  "combinations": [WasmLoadCombination]
}

as1170_wind_pressure ​

AS/NZS 1170.2 site wind pressure calculator.

Input: WasmWindInput JSON

json
{
  "region": "B",
  "terrain": "TC2",
  "height": 10.0,
  "return_period_factor": 1.0
}
FieldTypeDescription
regionString"A", "B", "C", "D", "WN", "WO", "WP", "WS".
terrainString"TC1", "TC2", "TC2.5", "TC3", "TC4" (or numeric equivalents).
heightf64Structure height (m).
return_period_factorf64Return period multiplier. Default 1.0.

Output: WasmWindResult JSON

json
{
  "vR": 45.0,
  "mZcat": 0.83,
  "mC": 1.0,
  "vDes": 37.4,
  "q": 0.84e3,
  "p": 0.84e3
}
FieldTypeDescription
vRf64Regional wind speed (m/s).
mZcatf64Terrain/height multiplier.
mCf64Climate change multiplier (AS/NZS 1170.2 Table 3.3).
vDesf64Design wind speed (m/s).
qf64Dynamic pressure (Pa).
pf64Design wind pressure (Pa).

as1170_snow_load ​

AS/NZS 1170.3 roof snow load calculator.

Input: WasmSnowInput JSON

json
{
  "region": "Alpine",
  "roof_pitch_deg": 15.0
}
FieldTypeDescription
regionStringSnow region name.
roof_pitch_degf64Roof pitch (°). Default 0.

Output: WasmSnowResult JSON

json
{
  "s_0": 1.5e3,
  "muI": 0.8,
  "s": 1.2e3
}
FieldTypeDescription
s_0f64Ground snow load (Pa).
muIf64Roof shape coefficient.
sf64Design snow load (Pa).

as1170_seismic_base_shear ​

AS 1170.4 seismic base shear calculator.

Input: WasmSeismicInput JSON

json
{
  "zone": "II",
  "soil": "C",
  "period": 0.8,
  "r_u": 1.0,
  "s_p": 0.77,
  "weight": 5000e3
}
FieldTypeDescription
zoneStringSeismic zone.
soilStringSoil class "A"-"E".
periodf64Building period (s).
r_uf64Ductility-related factor. Default 1.0.
s_pf64Structural performance factor. Default 0.77.
weightf64Seismic weight (N).

Output: WasmSeismicResult JSON

json
{
  "c": 0.12,
  "v": 600e3
}
FieldTypeDescription
cf64Seismic coefficient V / W.
vf64Base shear (N).

as4100_notional_force ​

AS 4100:2020 Cl 3.2.4 notional horizontal force at one floor level: 0.002 times the total design vertical load applied at that level, for multi-storey buildings only. It acts with the design dead and live loads only, for strength and serviceability, not for the stability limit state.

Input: WasmNotionalInput JSON

json
{
  "total_gravity_load": 5000e3,
  "multi_storey": true
}
FieldTypeDescription
total_gravity_loadf64Total design vertical load at the floor level (N).
multi_storeyboolDefault true. false returns 0: the clause does not apply.
adequately_bracedboolLegacy, ignored (the 2020 edition has one factor).

Output: WasmNotionalResult JSON

json
{ "force": 10e3 }
FieldTypeDescription
forcef64Notional horizontal force (N).

Connections ​

shear_plate_check ​

Flexible end plate ("kind": "fep", ASI Design Guide 4) or web side plate / fin plate ("kind": "wsp", the default; ASI Design Guide 3) shear connection, each component to AS 4100:2020: weld, bolt group with ply bearing and tear-out, plate shear, plate block shear, beam web shear at the plate, beam shear, and for a web side plate the eccentric weld and bolt groups and plate bending; coped beams add cope bending and block shear. Cross-checked component by component against steelas over 416 ASI standard details (rust_solver/fem-core/tests/asi_shear_connection_differential.rs). SI units: lengths m, stresses Pa, forces N.

Input: WasmShearPlateInput JSON (main fields)

FieldTypeDescription
kindString"wsp" (default) or "fep".
v_starf64Design shear (N).
beam or beam_d / beam_bf / beam_tf / beam_tw / beam_fy / beam_fuobject / f64The supported beam, nested or flat.
bolt_diameter, bolt_grade, threads_includedBolts (default 8.8, threads included).
rows or bolt_count, cols, pitch, gaugeBolt grid.
plate_b, plate_t, plate_fy, plate_fuf64Plate.
weld_leg, weld_fuwf64Fillet weld.
a_evf64Plate edge distance to the end bolts.
s_g1, a_eh_beam, af64WSP: weld line to first bolt column, beam end distance, beam top to top bolt.

Output: components (each with capacity, utilisation and clause), govUtil, govComponent, status, notes, phiVDes (least component capacity, N), governing, d_i and e (m).

ridge_tie_cleat_check ​

Ridge tie cleat: a plate hung under the rafter soffit with the longitudinal tie bolted through its web in a run going down the plate. Checked for the tie's axial force n_star (in the plate's plane, at the bolts' depth, so in-plane bending N e at the weld) and shear v_star, to AS 4100:2020: bolt shear (Cl 9.2.2.1), bearing and tear-out on the plate and the tie web (Cl 9.2.2.4), the plate at the weld in bending, shear and axial (Cl 5.2, 5.11.3, 9.1.9) and the fillets (Cl 9.6.3.10). SI in (m, Pa, N): bolt_diameter, bolt_grade, n_bolts, plate_b (the run along the soffit), plate_t, plate_fy, plate_fu, e (weld line to the bolt centroid), tie_tw, tie_fu, tie_end, weld_leg, weld_fuw. Out: util_bolt_shear, util_plate_bearing, util_tie_bearing, util_plate_bending, util_plate_shear, util_plate_axial, util_weld, util_max, governing.

bolt_capacity ​

AS 4100 Section 9 bolt and ply bearing capacity.

Input: WasmBoltInput JSON

json
{
  "bolt_diameter": 0.02,
  "bolt_grade": "8.8/S",
  "shear_planes_threads_intercepted": 1,
  "shear_planes_threads_excluded": 0,
  "kr": 1.0,
  "ply_thickness": 0.008,
  "ply_fu": 450e6
}
FieldTypeDescription
bolt_diameterf64Bolt diameter (m).
bolt_gradeStringGrade string (e.g. "8.8/S").
shear_planes_threads_interceptedi32Shear planes with threads in shear.
shear_planes_threads_excludedi32Shear planes with threads excluded.
krf64Reduction factor. Default 1.0.
ply_thicknessf64Ply thickness (m).
ply_fuf64Ply tensile strength (Pa).

Output: WasmBoltResult JSON

json
{
  "phiVf": 180e3,
  "phiNtf": 250e3,
  "phiVb": 120e3
}
FieldTypeDescription
phiVff64Design shear capacity per bolt (N).
phiNtff64Design tension capacity per bolt (N).
phiVbf64Ply bearing capacity per bolt (N).

weld_capacity ​

AS 4100 fillet weld shear capacity.

Input: WasmWeldInput JSON

json
{
  "leg_size": 0.008,
  "length": 0.15,
  "fuw": 480.0,
  "kr": 1.0
}
FieldTypeDescription
leg_sizef64Fillet weld leg size (m).
lengthf64Weld length (m).
fuwf64Weld metal ultimate strength (MPa). Default 480.
krf64Reduction factor. Default 1.0.

Output: WasmWeldResult JSON

json
{ "phiVw": 95e3 }
FieldTypeDescription
phiVwf64Design weld shear capacity (N).

base_plate_check ​

Base plate bearing and bending check.

Input: WasmBasePlateInput JSON

json
{
  "n_star": 800e3,
  "column_d": 0.25,
  "column_bf": 0.15,
  "plate_b": 0.4,
  "plate_d": 0.5,
  "plate_t": 0.02,
  "concrete_fc": 32e6,
  "plate_fy": 300e6,
  "bolt_count": 4,
  "bolt_diameter": 0.02,
  "bolt_grade": "8.8/S"
}
FieldTypeDescription
n_starf64Axial load (N).
column_d / column_bff64Column depth and flange width (m).
plate_b / plate_d / plate_tf64Plate dimensions (m).
concrete_fcf64Concrete strength (Pa).
plate_fyf64Plate yield strength (Pa).
bolt_counti32Number of anchor bolts. Default 0.
bolt_diameterf64Bolt diameter (m). Default 0.
bolt_gradeStringBolt grade. Default "".

Output: WasmBasePlateResult JSON

json
{
  "n_star": 800e3,
  "phiNcConc": 1200e3,
  "bearing_pressure": 4e6,
  "confinement": 1.2,
  "phiPlateBending": 150e3,
  "t_req": 0.018,
  "util_bearing": 0.67,
  "util_plate": 0.80,
  "util_bolts": 0.0,
  "util_max": 0.80,
  "cantilever_d": 0.125,
  "cantilever_b": 0.075,
  "assumptions": { "phi_concrete": 0.6, "phi_steel": 0.9, "method": "bearing" }
}
FieldTypeDescription
n_starf64Echo of axial load (N).
phiNcConcf64Concrete bearing capacity (N).
bearing_pressuref64Actual bearing pressure (Pa).
confinementf64Confinement factor.
phiPlateBendingf64Plate bending capacity (N·m/m).
t_reqf64Required plate thickness (m).
util_bearing / util_plate / util_bolts / util_maxf64Utilisations.
cantilever_d / cantilever_bf64Cantilever overhangs from column face (m).
assumptionsWasmBasePlateAssumptionsFactors and method used.

Notes:

  • Bolt diameter is converted m → mm internally for the core lookup tables.

fin_plate_check ​

Fin-plate connection shear capacity check (bolts + plate + weld).

Input: WasmFinPlateInput JSON

json
{
  "v_star": 150e3,
  "bolt_diameter": 0.02,
  "bolt_grade": "8.8/S",
  "bolt_count": 4,
  "plate_depth": 0.3,
  "plate_thickness": 0.01,
  "plate_fy": 300e6,
  "plate_fu": 450e6,
  "weld_leg_size": 0.006,
  "weld_length": 0.3,
  "weld_fuw": 480.0,
  "end_distance": 0.04
}
FieldTypeDescription
v_starf64Design shear (N).
bolt_diameterf64Bolt diameter (m).
bolt_gradeStringBolt grade.
bolt_counti32Number of bolts.
plate_depth / plate_thicknessf64Plate dimensions (m).
plate_fy / plate_fuf64Plate yield / ultimate strengths (Pa).
weld_leg_size / weld_lengthf64Weld dimensions (m).
weld_fuwf64Weld metal strength (MPa). Default 480.
end_distancef64Bolt end distance (m). Default 0.

Output: WasmFinPlateResult JSON

json
{
  "v_star": 150e3,
  "phiBolts": 720e3,
  "phiPlateShear": 400e3,
  "phiPlateBearing": 600e3,
  "phiPlateTearout": 500e3,
  "phiWeld": 380e3,
  "phiVDes": 380e3,
  "util_bolts": 0.21,
  "util_plate_shear": 0.38,
  "util_plate_bearing": 0.25,
  "util_plate_tearout": 0.30,
  "util_weld": 0.39,
  "util_max": 0.39
}
FieldTypeDescription
v_starf64Echo of design shear (N).
phiBoltsf64Bolt group shear capacity (N).
phiPlateShearf64Plate shear capacity (N).
phiPlateBearingf64Plate bearing capacity (N).
phiPlateTearoutf64Plate tear-out capacity (N).
phiWeldf64Weld capacity (N).
phiVDesf64Minimum of all capacities = design capacity (N).
util_* / util_maxf64Utilisations.

Notes:

  • Lengths converted m→mm, stresses Pa→MPa internally.
  • Capacities returned as forces (N).

end_plate_check ​

End-plate connection moment capacity check (bolts in tension + plate bending).

Input: WasmEndPlateInput JSON

json
{
  "m_star": 80e3,
  "beam_d": 0.5,
  "beam_tf": 0.014,
  "bolt_diameter": 0.024,
  "bolt_grade": "8.8/S",
  "bolt_count_tension": 4,
  "plate_thickness": 0.02,
  "plate_fy": 300e6
}
FieldTypeDescription
m_starf64Design moment (N·m).
beam_d / beam_tff64Beam depth and flange thickness (m).
bolt_diameterf64Bolt diameter (m).
bolt_gradeStringBolt grade.
bolt_count_tensioni32Number of bolts in tension.
plate_thicknessf64Plate thickness (m).
plate_fyf64Plate yield strength (Pa).

Output: WasmEndPlateResult JSON

json
{
  "m_star": 80e3,
  "d_eff": 0.486,
  "tStar": 165e3,
  "phiBoltsTension": 720e3,
  "phiPlateBending": 95e3,
  "phiMDes": 85e3,
  "util_bolts": 0.11,
  "util_plate": 0.84,
  "util_max": 0.84
}
FieldTypeDescription
m_starf64Echo of design moment (N·m).
d_efff64Effective lever arm (m).
tStarf64Tension force in bolt group (N).
phiBoltsTensionf64Bolt tension capacity (N).
phiPlateBendingf64Plate bending capacity (N·m).
phiMDesf64Design moment capacity (N·m).
util_bolts / util_plate / util_maxf64Utilisations.

Notes:

  • m_star converted N·m → N·mm internally; returned values converted back to N·m.
  • d_eff uses (beam_d - beam_tf) with a 1 mm floor in mm units, so inputs must be in m.

weld_group_check ​

Eccentric weld group capacity by instantaneous centre of rotation method.

Input: WasmWeldGroupInput JSON

json
{
  "segments": [
    { "x1": 0.0, "y1": 0.0, "x2": 0.0, "y2": 0.3, "legSize": 0.006 },
    { "x1": 0.0, "y1": 0.3, "x2": 0.2, "y2": 0.3, "legSize": 0.006 }
  ],
  "fuw": 480.0,
  "kr": 1.0,
  "vx": 50e3,
  "vy": 0.0,
  "mz": 15e3
}
FieldTypeDescription
segments[WasmWeldSegmentInput]Weld segments in local coordinates (m).
fuwf64Weld metal strength (MPa).
krf64Reduction factor.
vx / vyf64Applied shear forces (N).
mzf64Applied torsional moment (N·m).

WasmWeldSegmentInput ​

FieldTypeDescription
x1 / y1 / x2 / y2f64Segment end coordinates (m).
legSizef64Fillet weld leg size (m).

Output: WasmWeldGroupResult JSON

json
{
  "phiVtotal": 180e3,
  "util_max": 0.83,
  "governingSegment": 1,
  "vPerMmGov": 350.0,
  "phiVperMmGov": 420.0
}
FieldTypeDescription
phiVtotalf64Total weld group capacity (N).
util_maxf64Maximum segment utilisation.
governingSegmentusize0-based index of critical segment.
vPerMmGovf64Resultant force per mm on governing segment (N/mm).
phiVperMmGovf64Capacity per mm on governing segment (N/mm).

eccentric_bolt_group_check ​

Eccentric bolt group capacity by instantaneous centre of rotation method.

Input: WasmBoltGroupInput JSON

json
{
  "bolts": [
    { "x": 0.0, "y": 0.0 },
    { "x": 0.1, "y": 0.0 }
  ],
  "boltDiameter": 0.02,
  "boltGrade": "8.8/S",
  "nN": 1,
  "nX": 1,
  "kr": 1.0,
  "vx": 50e3,
  "vy": 0.0,
  "mz": 15e3
}
FieldTypeDescription
bolts[WasmBoltPositionInput]Bolt positions in local coordinates (m).
boltDiameterf64Bolt diameter (m).
boltGradeStringBolt grade.
nNi32Shear planes threads intercepted.
nXi32Shear planes threads excluded.
krf64Reduction factor.
vx / vyf64Applied shear forces (N).
mzf64Applied torsional moment (N·m).

WasmBoltPositionInput ​

FieldTypeDescription
x / yf64Bolt position (m).

Output: WasmBoltGroupResult JSON

json
{
  "phiVtotal": 320e3,
  "util_max": 0.78,
  "governingBolt": 1,
  "vResultantGov": 90e3,
  "phiVbolt": 115e3
}
FieldTypeDescription
phiVtotalf64Total bolt group capacity (N).
util_maxf64Maximum bolt utilisation.
governingBoltusize0-based index of critical bolt.
vResultantGovf64Resultant shear on governing bolt (N).
phiVboltf64Single-bolt shear capacity (N).

Section Properties ​

section_properties ​

Polygon section property calculator from arbitrary closed loops.

Input: WasmSectionBuilderInput JSON

json
{
  "loops": [
    [
      { "x": 0.0, "y": 0.0 },
      { "x": 0.1, "y": 0.0 },
      { "x": 0.1, "y": 0.2 },
      { "x": 0.0, "y": 0.2 }
    ]
  ]
}
FieldTypeDescription
loops[[WasmPoint2]]List of closed polygons (counter-clockwise = positive area).

WasmPoint2 ​

FieldTypeDescription
x / yf64Vertex coordinates (m).

Output: WasmSectionBuilderResult JSON

json
{
  "area": 0.02,
  "cx": 0.05,
  "cy": 0.1,
  "Ixx": 6.67e-5,
  "Iyy": 1.67e-5,
  "Ixy": 0.0,
  "I1": 6.67e-5,
  "I2": 1.67e-5,
  "thetaP": 0.0,
  "Ip": 8.33e-5,
  "Japprox": 3.33e-5,
  "Jopen": 0.0,
  "Zxapprox": 6.67e-4,
  "Zyapprox": 3.33e-4,
  "Sx": 0.0,
  "Sy": 0.0,
  "Asx": 0.0167,
  "Asy": 0.0083,
  "Iw": 0.0,
  "rx": 0.0577,
  "ry": 0.0289
}
FieldTypeDescription
areaf64Cross-sectional area (m²).
cx / cyf64Centroid (m).
Ixx / Iyyf64Second moments about centroidal axes (m⁴).
Ixyf64Product of inertia (m⁴).
I1 / I2f64Principal moments of inertia (m⁴).
thetaPf64Principal angle (rad).
Ipf64Polar moment of inertia (m⁴).
Japprox / Jopenf64Approximate torsion constants (m⁴).
Zxapprox / Zyapproxf64Approximate elastic moduli (m³).
Sx / Syf64Plastic moduli (m³).
Asx / Asyf64Shear areas (m²).
Iwf64Warping constant (m⁶).
rx / ryf64Radii of gyration (m).

Import / Export ​

import_sg_model ​

Parses a legacy SpaceGass binary model file (.sg or .sgw) and returns a WasmModel JSON.

Signature: import_sg_model(bytes: &[u8]) -> String

Input: Raw binary byte array (not JSON).

Output: WasmModel JSON or {"error": "..."}.

Notes:

  • Best-effort conversion: not all legacy features are supported.
  • May lose plate data, advanced releases, or non-linear properties.

list_sg_entries ​

Lists the named entries (models / data sets) inside a SpaceGass binary file without fully parsing them.

Signature: list_sg_entries(bytes: &[u8]) -> String

Input: Raw binary byte array (not JSON).

Output: JSON array of entry descriptors or {"error": "..."}.


Merge (Phase 4) ​

merge_snapshots ​

Structural 3-way merge for collaborative editing. Merges two divergent model snapshots against a common base.

Signature: merge_snapshots(base_json: &str, ours_json: &str, theirs_json: &str) -> String

Input: Three JSON strings representing WasmModel-like snapshots.

Output: Merge result JSON

json
{
  "merged": { ... },
  "conflicts": [
    { "kind": "field", "entity": "nodes", "id": "n1", "field": "x", "base": 0, "ours": 5, "theirs": 10 }
  ],
  "stats": {
    "merged_clean": 42,
    "conflicts": 1
  }
}
FieldTypeDescription
mergedobjectThe merged model snapshot.
conflicts[object]List of unresolvable conflicts with base/ours/theirs values.
statsobjectCount of clean merges vs conflicts.

Notes:

  • When a conflict occurs, the merged output keeps the base value.
  • Arrays of entities (nodes, members, etc.) are matched by id field.

Document generated from source: rust_solver/fem-wasm/src/lib.rs + report_exports.rsTotal documented exports: 55