Invntr
Source

All instruments

truss2d

Plane pin-jointed truss by the direct stiffness method: joints, members (E, A), supports and joint loads give member axial forces and stresses, joint displacements, support reactions and the worst utilisation against a yield stress. Linear elastic, small displacements; compression members are checked against yield only, with the Euler second moment each one needs reported.

Field
Mechanics, CAD and finite elements
Version
0.1.0
Runs as
Compiled (Rust)
Typical run
0.05 s

Compiled from source: run sh packs/install.sh once before admitting it.

Known answers it must pass

Admission replaytruss2d 0.1.0 · files e29fd554b20f…38e2
  1. r0001single bar (textbook N = P, sigma = P/A, extension PL/(EA)): 10 kN on 2 m, 100 mm2, 200 GPa -> 10 kN, 100 MPa, 1.000 mm; exact, rel 1e-9 roundoff onlypassed

    members.0.force_kN{"value": 10.0, "rel_tol": 1e-09}
    members.0.stress_MPa{"value": 100.0, "rel_tol": 1e-09}
    members.0.elongation_mm{"value": 1.0, "rel_tol": 1e-09}
    nodes.1.ux_mm{"value": 1.0, "rel_tol": 1e-09}
    nodes.0.rx_kN{"value": -10.0, "rel_tol": 1e-09}
    worst_utilisation0.4 ± 4e-100.4lockedunder 0.01 % of the tolerance used
  2. r0002symmetric two-bar truss, apex load (textbook N = P/(2 sin t), apex deflection PL/(2EA sin^2 t)): 3-4-5 geometry sin t = 0.6, P = 120 kN, L = 5 m, EA = 200 GPa x 1000 mm2 -> N = -100 kN, v = -4.16667 mm, thrust 80 kN; exact, rel 1e-9passed

    members.0.force_kN{"value": -100.0, "rel_tol": 1e-09}
    members.1.force_kN{"value": -100.0, "rel_tol": 1e-09}
    nodes.2.uy_mm{"value": -4.166666666666667, "rel_tol": 1e-09}
    nodes.2.ux_mm{"value": 0.0, "abs_tol": 1e-09}
    nodes.0.rx_kN{"value": 80.0, "rel_tol": 1e-09}
    nodes.0.ry_kN{"value": 60.0, "rel_tol": 1e-09}
    nodes.1.rx_kN{"value": -80.0, "rel_tol": 1e-09}
  3. r0003determinate 3-4-5 triangle by the method of joints: pin (0,0), roller (4,0), 12 kN sideways at (0,3) -> AB +12, BC -15, AC +9 kN, reactions (-12,-9) and 9 kN, roller slides NL/(EA) = 0.24 mm; exact, rel 1e-9passed

    members.0.force_kN{"value": 12.0, "rel_tol": 1e-09}
    members.1.force_kN{"value": -15.0, "rel_tol": 1e-09}
    members.2.force_kN{"value": 9.0, "rel_tol": 1e-09}
    members.1.stress_MPa{"value": -30.0, "rel_tol": 1e-09}
    nodes.0.rx_kN{"value": -12.0, "rel_tol": 1e-09}
    nodes.0.ry_kN{"value": -9.0, "rel_tol": 1e-09}
    nodes.1.ry_kN{"value": 9.0, "rel_tol": 1e-09}
    nodes.1.ux_mm{"value": 0.24, "rel_tol": 1e-09}
    worst_member= 11lockedexact match
    worst_utilisation0.12 ± 1.2e-100.12lockedunder 0.01 % of the tolerance used
    static_indeterminacy= 00lockedexact match
  4. r0004reactions balance the loads (statics: sum F, sum M about the pin) on a two-panel Warren truss, plus the top chord by the method of sections -50/3 kN; exact, rel 1e-9, residuals abs 1e-9 kNpassed

    reaction_sum_x_kN-4 ± 4e-09-4lockedunder 0.01 % of the tolerance used
    reaction_sum_y_kN36 ± 3.6e-0836lockedunder 0.01 % of the tolerance used
    nodes.0.rx_kN{"value": -4.0, "rel_tol": 1e-09}
    nodes.0.ry_kN{"value": 17.5, "rel_tol": 1e-09}
    nodes.2.ry_kN{"value": 18.5, "rel_tol": 1e-09}
    members.2.force_kN{"value": -16.666666666666668, "rel_tol": 1e-09}
    moment_residual_kN_m0 ± 1e-090lockedunder 0.01 % of the tolerance used
    joint_residual_kN0 ± 1e-091.81899e-14lockedunder 0.01 % of the tolerance used
  5. r0005indeterminate three-bar truss (Timoshenko, Strength of Materials: N_v = P/(1+2cos^3 a), N_i = N_v cos^2 a, v = N_v L/(EA)): cos a = 0.6, P = 100 kN, L = 3 m -> 69.8324, 25.1397 kN, 1.04749 mm; exact, rel 1e-9passed

    members.0.force_kN{"value": 69.83240223463687, "rel_tol": 1e-09}
    members.1.force_kN{"value": 25.139664804469277, "rel_tol": 1e-09}
    members.2.force_kN{"value": 25.139664804469277, "rel_tol": 1e-09}
    nodes.0.uy_mm{"value": -1.047486033519553, "rel_tol": 1e-09}
    static_indeterminacy= 11lockedexact match
5 of 5 cases passed · sandbox macos-seatbeltrecorded from the kernel in a fresh lab

Each line is one reading the kernel checked. The bright band is the tolerance; the needle is the value the instrument actually returned when it was admitted. A needle near the centre line used little of its tolerance.

Inputs

NameUnitDefaultMeaning
nodesm[[0, 0], [4, 0], [2, 3]]Joints, 2 to 400: [x, y] in metres, or {"x_m", "y_m", "name"}. y is up. Node numbers start at 0 in list order.
members[[0, 1], [1, 2], [0, 2]]Members, 1 to 1500: [a, b], [a, b, A_mm2], [a, b, A_mm2, E_GPa], or {"a", "b", "A_mm2", "E_GPa", "name"}. Area and modulus left out take A_mm2 and E_GPa below.
supports[{"node": 0, "fix": "xy"}, {"node": 1, "fix": "y"}]Restraints: {"node": i, "fix": "xy"} is a pin, "x" or "y" a roller held in that direction. At least 3 restrained directions in all.
loads[{"node": 2, "fx_kN": 0, "fy_kN": -10}]Joint loads: {"node": i, "fx_kN": .., "fy_kN": ..} or [node, fx_kN, fy_kN]. A weight is a negative fy_kN. Loads on one joint add up.
E_GPaGPa200Young's modulus of every member that does not give its own (steel about 200, aluminium about 70).
A_mm2mm^21000Cross-section area of every member that does not give its own.
yield_MPaMPa250Yield stress the utilisation |stress| / yield is taken against (a design value: divide by your material factor first).
load_factor11Multiplies every load (a partial safety factor on actions, or a sweep variable).

Readings

NameUnitMeaning
n_nodes1
n_members1
n_restrained1
static_indeterminacy1members + restrained directions - 2 x joints: 0 statically determinate, >0 indeterminate.
all_oktrue when every member's |stress| is at or below yield_MPa.
warningsOne line per member above yield.
worst_utilisation1Largest |stress| / yield_MPa over the members.
worst_member1Index of that member (0-based, list order).
max_tension_kNkN
max_compression_kNkNLargest compressive force, as a positive number.
max_abs_stress_MPaMPa
max_displacement_mmmm
max_displacement_node1
load_sum_x_kNkN
load_sum_y_kNkN
reaction_sum_x_kNkN
reaction_sum_y_kNkN
joint_residual_kNkNLargest out-of-balance force at a free joint, from the recovered member forces (0 up to roundoff).
moment_residual_kN_mkN mMoment of loads plus reactions about the origin (0 up to roundoff).
strain_energy_JJ
external_work_JJHalf the loads times their displacements; equals strain_energy_J (Clapeyron).
membersOne row per member, list order.
nodesOne row per joint, list order; rx_kN / ry_kN are null on a free direction.

Try the call

Change a value and the command updates. Nothing runs here; paste it into your terminal or give it to your agent.

Terminal
MCP call