SWBPIPE · The open manual
Part VI · VerificationVI–E1

Part VI

Verification

E. Algorithm and software checks  ·  Portal frame sway

Two columns four metres tall stand six metres apart and are joined across the top by a beam. Both column bases are fixed. A lateral force of 3.0 N acts at the top of the right-hand column. How far does the frame sway?

The reference does not work the sway by hand. The expected value is the solver’s own answer, stored when the case was made. The case is therefore a repeatability check on multi-element assembly and solution, not a comparison with an independent result.

Read with

A slope-deflection solution would give the sway in closed form; until it is added, this case shows only that the solve repeats.

A two-column portal frame is pushed sideways at the top; the case checks that assembly and solution repeat exactly. F SWAY ? H B FIXED BASES
Fig. VI–E1.—Portal frame sway

1.Inputs.

Illustrative values, taken from no standard and chosen so the arithmetic can be followed by hand. Most do not describe a real pipe; read them in any consistent set of units.

QuantitySymbolValue
Node 0 (left base)—(0.0, 0.0, 0.0) m
Node 1 (left top)—(0.0, 4.0, 0.0) m
Node 2 (right top)—(6.0, 4.0, 0.0) m
Node 3 (right base)—(6.0, 0.0, 0.0) m
Elastic modulusE1800.0 Pa
Shear modulusG700.0 Pa
AreaA2.5 m2
Second moment about yIy2.0 m4
Second moment about zIz2.0 m4
Torsion constantJ1.0 m4
Lateral force at node 2, global XF3.0 N

2.Method.

No hand calculation of the sway is given. The reference records the frame, its supports and its load. The expected top-right sway is taken from the solver’s frame assembly and dense solution of the restrained system.

3.Results.

No independent value
QuantityExpected
Top-right sway in XThe solver’s stored result; no hand value

The tests check that:

  • The solver assembles the three members and solves the restrained system.
  • The solved sway equals the stored value, which the solver itself produced.
  • The solved sway is a finite number.

What it shows. Checks that the solved value repeats a stored value. It is not an independent check.

Path exercised. The benchmark calls the solver’s components directly: elements, loads, frame solver and stress recovery. It does not go through the program’s own model-to-solve path.

Agreement. The solved sway must repeat the stored value within an absolute difference of 1.0 × 10−9 m. This shows repeatability only, not agreement with an independent answer. Long values are shown here to seven significant figures; the tests compare the full values in the record.

4.Run it yourself.

cd projects/chirality-piping
cargo test --manifest-path validation/benchmarks/mechanics/Cargo.toml portal_frame_fixture_solves_repeatably

Hand calculation: validation/hand_calcs/mechanics/portal_frame_sway.md. Test record, with the recorded run of 2026-07-10: mech-portal-sway-original.md.

Contents · Part VI · The program: swbpipe.com · MIT licence