otko/examples
Repository files (latest commit first)
Filename Latest commit message Latest commit date
smillmorel d01a5957b7
Some checks failed
CI / lint (push) Has been cancelled
CI / test (macos-latest, 3.10) (push) Has been cancelled
CI / test (macos-latest, 3.11) (push) Has been cancelled
CI / test (macos-latest, 3.12) (push) Has been cancelled
CI / test (ubuntu-latest, 3.10) (push) Has been cancelled
CI / test (ubuntu-latest, 3.11) (push) Has been cancelled
CI / test (ubuntu-latest, 3.12) (push) Has been cancelled
CI / test (windows-latest, 3.10) (push) Has been cancelled
CI / test (windows-latest, 3.11) (push) Has been cancelled
CI / test (windows-latest, 3.12) (push) Has been cancelled
feat: consolidate units to Metric/Imperial with unit-aware dialogs
- core/units: two dominant systems (Metric m/kN, Imperial ft/kip) with
  display conversion helpers, legacy 4-system migration in ProjectMeta
- dialogs/docks: unit-aware material, section, case, load, grid and
  results labels; diagram renderer unit labels; render controls update
- docs: add consistent_units.md; regen examples/*.osmodel artifacts
- tests: update persistence/phase8/project/unit-labels for new systems
2026-09-08 16:33:30 -04:00
..
data feat: initial otko import 2026-09-08 02:12:15 -04:00
space_frame_3d_results/recorders feat: initial otko import 2026-09-08 02:12:15 -04:00
.gitkeep feat: initial otko import 2026-09-08 02:12:15 -04:00
_ex4_portal2d_common.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
basic_truss.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
basic_truss.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
beam_quad_2d.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
beam_quad_2d.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
cantilever.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
cantilever.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
concrete04_cantilever.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
concrete04_cantilever.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
eigen_two_storey_one_bay_frame.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
eigen_two_storey_one_bay_frame.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
eigen_two_storey_shear_frame.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
eigen_two_storey_shear_frame.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
elastic_frame.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
elastic_frame.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex1a_canti2d.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex1a_canti2d.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex1a_canti2d_eq.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex1a_canti2d_eq.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex1b_portal2d.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex1b_portal2d.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex2a_canti2d_elastic_element.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex2a_canti2d_elastic_element.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex2b_canti2d_inelastic_section.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex2b_canti2d_inelastic_section.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex2c_canti2d_inelastic_fiber_section.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex2c_canti2d_inelastic_fiber_section.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex3_canti2d_elastic_element.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex3_canti2d_elastic_element.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex3_canti2d_inelastic_fiber_section.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex3_canti2d_inelastic_fiber_section.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex3_canti2d_inelastic_section.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex3_canti2d_inelastic_section.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex4_portal2d_elastic_element.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex4_portal2d_elastic_element.py feat: initial otko import 2026-09-08 02:12:15 -04:00
ex4_portal2d_inelastic_fiber_section.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex4_portal2d_inelastic_fiber_section.py feat: initial otko import 2026-09-08 02:12:15 -04:00
ex4_portal2d_inelastic_section.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
ex4_portal2d_inelastic_section.py feat: initial otko import 2026-09-08 02:12:15 -04:00
moment_curvature.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
moment_curvature.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
portal_frame.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
portal_frame.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
portal_pushover.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
portal_pushover.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
rc_frame_earthquake.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
rc_frame_earthquake.py feat: initial otko import 2026-09-08 02:12:15 -04:00
rc_frame_gravity.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
rc_frame_gravity.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
rc_frame_pushover.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
rc_frame_pushover.py feat: initial otko import 2026-09-08 02:12:15 -04:00
README.md docs: rewrite READMEs dry and blunt, rename Studio to OTKO 2026-09-08 02:41:03 -04:00
sdof_pushover.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
sdof_pushover.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
space_frame_3d.osmodel feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00
space_frame_3d.py feat: consolidate units to Metric/Imperial with unit-aware dialogs 2026-09-08 16:33:30 -04:00

Example models

Pre-built .osmodel files plus the Python scripts that generate them. Each one carries the case types the post-processing views need, so you can exercise the GUI without defining materials, sections, loads, and cases by hand.

Files

Model Nodes Elements Cases Shows
cantilever.osmodel 6 5 Static × 2, Modal Point + distributed loads, force diagrams, deformed shape, mode shapes
portal_frame.osmodel 4 3 Static, Modal, Transient All Display features, smallest 3D
space_frame_3d.osmodel 12 16 Static, Modal, Transient (5% damping) 3D rendering, multiple modes, damped EQ time-history
sdof_pushover.osmodel 2 1 Pushover, Modal Monotonic pushover curve, HystereticMaterial
portal_pushover.osmodel 4 3 Pushover, Modal Fiber sections, BeamWithHinges, yielding pushover
ex1a_canti2d.osmodel 2 1 Static preload, Pushover, Transient EQ OpenSees Ex 1a, shared gravity + push + quake
ex1b_portal2d.osmodel 4 3 Static preload, Pushover, Transient EQ OpenSees Ex 1b elastic portal, distributed gravity
ex2a_canti2d_elastic_element.osmodel 2 1 Static preload, Pushover, Transient EQ Ex 2a cantilever, dimensions as named parameters
ex2b_canti2d_inelastic_section.osmodel 2 1 Static preload, Pushover, Transient EQ Ex 2b, aggregated axial+flexure section
ex2c_canti2d_inelastic_fiber_section.osmodel 2 1 Static preload, Pushover, Transient EQ Ex 2c, fiber section, coupled axial-flexure
ex3_canti2d_elastic_element.osmodel 2 1 Static preload, Pushover, Transient EQ Ex 3 elastic build, unit-scaled parameters
ex3_canti2d_inelastic_section.osmodel 2 1 Static preload, Pushover, Transient EQ Ex 3 aggregated-section build
ex3_canti2d_inelastic_fiber_section.osmodel 2 1 Static preload, Pushover, Transient EQ Ex 3 fiber-section build
ex4_portal2d_elastic_element.osmodel 4 3 Static preload, Pushover, Transient sine Ex 4 elastic portal, build/analysis split
ex4_portal2d_inelastic_section.osmodel 4 3 Static preload, Pushover, Transient sine Ex 4 aggregated-section portal
ex4_portal2d_inelastic_fiber_section.osmodel 4 3 Static preload, Pushover, Transient sine Ex 4 fiber-section portal
ex1a_canti2d_eq.osmodel 2 1 Static preload, Transient EQ Ex 1a gravity + base excitation only
eigen_two_storey_shear_frame.osmodel 6 6 Modal equalDOF floor constraints, shear-frame modes
eigen_two_storey_one_bay_frame.osmodel 6 6 Modal Chopra 10.5 frame, sway modes, no constraints
concrete04_cantilever.osmodel 2 1 Static (gravity), Pushover Concrete04 fiber section end-to-end

Quick tour

1. Force diagrams — cantilever.osmodel

File → Open → cantilever.osmodel
Analyze → Cases  → run "Tip-Load"
Display → Show Force Diagram → component "M3" → linear moment, max at fixed end (50 kN·m)
                              → component "V2" → constant -10 kN along the whole span
                              → component "N"  → ~zero (no axial load)
                              → component "T"  → ~zero (no torsion → console hint, no diagram)
Display → Show Deformed Shape  → cantilever curve

Load runs along global Y (perpendicular to the beam, horizontal plane). With the default 3D vertical-reference convention that lands on the V2 / M3 pair — the in-plane bending pair.

UDL variant, parabolic moment:

Analyze → Cases → run "Uniform-Load"
Display → Show Force Diagram → M3 → parabolic, max 25 kN·m at fixed end
                              → V2 → linear, max 10 kN at fixed end

2. Mode shapes — space_frame_3d.osmodel

File → Open → space_frame_3d.osmodel
Analyze → Cases  → run "Modal-6"
Display → Animate Mode Shape → mode 1 = X-sway, mode 2 = Y-sway
                             → Play, scrub timeline, change scale

3. Time-history and hysteresis — space_frame_3d.osmodel

File → Open → space_frame_3d.osmodel
Analyze → Cases  → run "EQ-4s"  (~5-10 sec on a modern laptop)
Display → Time-History Plot
   - Node 12 (roof corner) + DOF 1 (X displacement) → "Add trace"
   - Node 9 + DOF 1 → second trace, compare phase
Display → Hysteresis Plot
   - X = Node 12 / DOF 1, Y = Node 12 / DOF 3 → orbit

4. Pushover — sdof_pushover.osmodel

File → Open → sdof_pushover.osmodel
Analyze → Cases → run "Push-X"
Display → Show Pushover Curve
   → linear from origin, then softens through yield

Column stays elastic here. Real nonlinear hinges need BeamWithHinges + fiber sections; the machinery exists, the fiber-section editor is still rough.

5. Nonlinear pushover with fiber hinges — portal_pushover.osmodel

File → Open → portal_pushover.osmodel
Analyze → Cases → run "Push-X"
Display → Show Pushover Curve
   → linear stiffness, then yield plateau as base hinges form
   → peak base shear = concrete crushing + rebar yield

Columns are BeamWithHinges + FiberSections (concrete core, rebar layers) wrapped in a SectionAggregator for torsion.

6. Gravity + time-history chain — ex1a_canti2d_eq.osmodel

File → Open → ex1a_canti2d_eq.osmodel
Analyze → Cases → run "Earthquake"
Display → Time-History Plot
   - Node 2 + DOF 1 (Ux) → tip horizontal response
   - Node 2 + DOF 2 (Uy) → gravity should stay locked

Tiny model, exists for one reason: the standard transient recipe static preload → loadConst reset → UniformExcitation transient against a real ground-motion record in a PathTimeSeries.

7. OpenSees Ex 1a bundle — ex1a_canti2d.osmodel

File → Open → ex1a_canti2d.osmodel
Analyze → Cases → run "Push" or "Earthquake"
Display → Show Pushover Curve / Time-History Plot

Cantilever column with shared gravity preload and both lateral variants. Small benchmark for checking pushover and transient agree on the same geometry.

8. OpenSees Ex 1b bundle — ex1b_portal2d.osmodel

File → Open → ex1b_portal2d.osmodel
Analyze → Cases → run "Push" or "Earthquake"
Display → Show Pushover Curve / Time-History Plot

Elastic portal frame. Gravity comes from a distributed beam load instead of nodal loads, which is the whole point of keeping it around.

9. Ex 2a, parameter-driven — ex2a_canti2d_elastic_element.osmodel

File → Open → ex2a_canti2d_elastic_element.osmodel
Analyze → Cases → run "Push" or "Earthquake"
Display → Show Pushover Curve / Time-History Plot

Same physics as Ex 1a, but dimensions and derived quantities are named parameters instead of literals.

10. Ex 2b, aggregated section — ex2b_canti2d_inelastic_section.osmodel

File → Open → ex2b_canti2d_inelastic_section.osmodel
Analyze → Cases → run "Push" or "Earthquake"
Display → Show Pushover Curve / Time-History Plot

First nonlinear cantilever in the series. Separate axial and flexural uniaxial responses aggregated into one section on a force-based beam-column.

11. Ex 2c, fiber section — ex2c_canti2d_inelastic_fiber_section.osmodel

File → Open → ex2c_canti2d_inelastic_fiber_section.osmodel
Analyze → Cases → run "Push" or "Earthquake"
Display → Show Pushover Curve / Time-History Plot

Ex 2b's fiber counterpart. Coupled axial-flexure with concrete and steel assigned to fibers and rebar layers directly.

12. Ex 3 family — ex3_canti2d_*.osmodel

File → Open → ex3_canti2d_elastic_element.osmodel
Analyze → Cases → run "Push" or "Earthquake"

Same cantilever analyses on three build styles: elastic element, aggregated uniaxial section, fiber section. All unit-scaled.

13. Modal shear building — eigen_two_storey_shear_frame.osmodel

File → Open → eigen_two_storey_shear_frame.osmodel
Analyze → Cases → run "Modal-2"
Display → Animate Mode Shape
   - mode 1 → stories sway in phase
   - mode 2 → stories sway out of phase

Validates modal workflows on a model small enough to check by hand, with equalDOF doing the shear-frame duty.

14. Modal frame, Chopra 10.5 — eigen_two_storey_one_bay_frame.osmodel

File → Open → eigen_two_storey_one_bay_frame.osmodel
Analyze → Cases → run "Modal-2"
Display → Animate Mode Shape
   - mode 1 → in-phase sway of both stories
   - mode 2 → top story reverses against the first

Companion to the shear building above. Ordinary beam-column behavior, no multi-point constraints.

15. Ex 4 portal family — ex4_portal2d_*.osmodel

File → Open → ex4_portal2d_elastic_element.osmodel
Analyze → Cases → run "Push" or "Sine-Uniform"
Display → Show Pushover Curve / Time-History Plot

Keeps the OpenSees split between model-building and analysis files, recast as project variants. Covers pinned-base sway, distributed girder gravity, and support-motion dynamics without an external quake file. The fiber transient is kept as a nonlinear stress test — it may stop early and still produce usable partial histories.

Regenerating the .osmodel files

Scripts are the source of truth, .osmodel files are build artifacts checked in for convenience. Change a script, rerun it:

python examples/cantilever.py
python examples/portal_frame.py
python examples/space_frame_3d.py
python examples/sdof_pushover.py
python examples/portal_pushover.py
python examples/ex1a_canti2d.py
python examples/ex1b_portal2d.py
python examples/ex2a_canti2d_elastic_element.py
python examples/ex1a_canti2d_eq.py
python examples/ex2b_canti2d_inelastic_section.py
python examples/ex2c_canti2d_inelastic_fiber_section.py
python examples/ex3_canti2d_elastic_element.py
python examples/ex3_canti2d_inelastic_section.py
python examples/ex3_canti2d_inelastic_fiber_section.py
python examples/ex4_portal2d_elastic_element.py
python examples/ex4_portal2d_inelastic_section.py
python examples/ex4_portal2d_inelastic_fiber_section.py
python examples/eigen_two_storey_shear_frame.py
python examples/eigen_two_storey_one_bay_frame.py

Each script builds the project, saves it, reloads it, and asserts a clean round-trip.