Refine beam section figure and derive As from bars

- Derive As from the provided longitudinal bars instead of taking it as
  input; drop the redundant As_bars output and update tests.
- Draw a fixed schematic 1 in cover and pin the bottom bars to the
  stirrup's bottom leg so the figure no longer depends on cover or d.
- Fixed stirrup stroke with a rounded 3 pt corner radius.
- Right-align the figure, constrain its caption to the image width, and
  shorten the caption to "Beam cross-section".
- Document input.yaml fields.
This commit is contained in:
smillmorel 2026-09-21 19:16:57 -04:00
commit 759d5e3bae
8 changed files with 638 additions and 680 deletions

View file

@ -63,7 +63,6 @@ def compute(inp: dict) -> dict:
d = quantity(inp["d"], "in", "d")
fc = quantity(inp["fc"], "ksi", "fc")
fy = quantity(inp["fy"], "ksi", "fy")
As = quantity(inp["As"], "in**2", "As")
concrete_density = quantity(inp["concrete_density"], "pcf", "concrete_density")
cover = quantity(inp["cover"], "in", "cover")
stirrup_size = bar_number(inp["stirrup_size"], "stirrup_size")
@ -73,6 +72,11 @@ def compute(inp: dict) -> dict:
top_bar_size = bar_number(inp["top_bar_size"], "top_bar_size")
n_top_bars = count(inp["n_top_bars"], "n_top_bars")
stirrup_db = stirrup_size / 8.0
bar_db = bar_size / 8.0
top_bar_db = top_bar_size / 8.0
As = n_bars * math.pi * bar_db**2 / 4.0
self_weight = (bw * h / 144.0) * concrete_density / 1000.0
wD = D * tributary / 1000.0 + self_weight
wL = L * tributary / 1000.0
@ -97,11 +101,6 @@ def compute(inp: dict) -> dict:
Vc = 2.0 * math.sqrt(fc * 1000.0) * bw * d / 1000.0
phiVc = 0.75 * Vc
stirrup_db = stirrup_size / 8.0
bar_db = bar_size / 8.0
top_bar_db = top_bar_size / 8.0
As_bars = n_bars * math.pi * bar_db**2 / 4.0
bottom_centroid = h - d
min_bottom_centroid = cover + stirrup_db + bar_db / 2.0
if bottom_centroid < min_bottom_centroid:
@ -153,7 +152,6 @@ def compute(inp: dict) -> dict:
"top_bar_size": top_bar_size,
"n_top_bars": n_top_bars,
"top_bar_db": q(top_bar_db),
"As_bars": q(As_bars),
},
"checks": {
"flexure": {