calcs/concrete-beam/README.md
smillmorel d90136d158 Update concrete-beam example, section placement, and README
- Longitudinal bars 4 #8 bottom / 2 #8 top; stirrups #3 @ 8 in.
- Move the section figure after Loads and Beam Demand.
- Add concrete-beam/README.md.
- Regenerate results.json, assets/beam-section.typ, and the PDF.

Note: the example-value tests (test_example_flexure,
test_reinforcement_geometry) are not updated for the new input and
currently fail.
2026-09-21 19:35:38 -04:00

1.3 KiB

Concrete Beam

Simple-span rectangular reinforced concrete beam, checked per ACI 318 for flexure, minimum steel, and concrete shear under a uniform gravity load (1.2D + 1.6L).

Files

  • input.yaml — geometry, loads, materials, and reinforcement; units are carried in the values.
  • calc.py — computes the demands and capacities, writes results.json, and regenerates the cross-section figure.
  • beam_section.py — renders the cross-section as native Typst (assets/beam-section.typ), drawn to a fixed schematic cover.
  • test_concrete_beam.py — pytest checks of the demands, flexure, minimum steel, shear, reinforcement geometry, and the generated figure.
  • concrete-beam.typ — report; compiles to concrete-beam.pdf.

As is derived from the provided bars (n_bars, bar_size).

Usage

Edit input.yaml, then:

python3 calc.py                  # writes results.json and assets/beam-section.typ
python3 -m pytest                # checks the calculation and the generated figure
typst compile concrete-beam.typ  # builds concrete-beam.pdf

calc.py must be run before compiling so the figure matches the current inputs; the tests fail if assets/beam-section.typ is stale.

Requirements

Python 3 with pyyaml, pint, pytest; Typst.