calcs/concentric-footing/codemap.md
smillmorel d5ac3fca7e Add structural calculation worksheets
Collection of engineering calculation projects (Python + Typst), each with
input, calc script, tests, results, and generated PDF where available.
2026-09-21 12:19:20 -04:00

41 lines
3.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Codemap: concentric-footing
Hybrid (Typst + Python) structural calculation that checks a square, concentrically loaded reinforced-concrete spread footing per ACI 318-19: soil bearing, one-way shear, two-way (punching) shear, flexure, minimum steel, and concrete bearing. `calc.py` is the single source of truth; `footing.typ` presents only.
Generated: 2026-08-21
Files indexed: 13 (all deliverables present)
## Layout
```
calcs/concentric-footing/
├── calc.py [logic] — ACI 318-19 footing checks; Pint YAML → compute() → results.json; CLI --input/--output/--stdout.
├── input.yaml [config] — Pint-quoted quantities; Blavatnik defaults (Ps, Pu, qa, Bf, Df, cover, fc, fy, lambda, column_width, base_plate_width, N, rebar_size).
├── results.json [state] — last calc output: {tool, version, project, prepared_by, values, checks}.
├── test_concentric_footing.py [test] — pytest lock of corrected ACI 318-19 benchmark (12 tests); imports calc.py:compute via importlib.
├── footing.typ [logic] — Typst presentation sheet; imports lib/sheet.typ + results.json, derives loads, emits <concentric-footing-loads>/<concentric-footing-results>.
├── generated/footing.pdf [doc] — compiled artefact (~204 KB).
├── CONCENTRIC-FOOTING.pdf [doc] — reference: Blavatnik square footing 36in×36in×12in, 3000 psi, 4-#4 (contains known 68in vs 92in perimeter typo).
├── PROJECT_STATE.md [doc] — architecture, pinned equations, units, tolerances, corrected benchmark, known limitations.
├── TASKS.md [doc] — 5-task plan (001 numerical core, 002 pytest lock, 003 Typst sheet, 004 docs, 005 review).
└── tasks/
├── 001_calc_and_input.md [doc] — numerical core spec (calc.py + input.yaml + results.json).
├── 002_numerical_tests.md [doc] — pytest lock spec (test_concentric_footing.py, compute() only).
├── 003_typst_sheet.md [doc] — Typst presentation spec (footing.typ + compile + metadata query tests).
├── 004_docs_refresh.md [doc] — README + codemap refresh spec.
└── 005_review.md [doc] — reviewer pass spec (engineering + deterministic evidence + simplify).
```
(footing.typ and generated/footing.pdf are now present on disk — see layout above.)
## Hot Spots
- `calcs/concentric-footing/calc.py` — single source of truth for all six ACI 318-19 checks; any equation change must be reconciled with `test_concentric_footing.py` and the benchmark in `PROJECT_STATE.md`.
- `calcs/concentric-footing/PROJECT_STATE.md` — pins every equation, unit, tolerance, and the corrected benchmark; the builder must not invent behavior beyond it.
- `lib/sheet.typ` (in worksheets root, external) — shared `calc-line` / `check` helpers used by `footing.typ`; changing them breaks every sheet's PDF.
## Conventions
- Hybrid Pint pattern: `input.yaml` (quoted quantity strings) → `calc.py:compute()` → `results.json` {tool, version, project, prepared_by, values, checks} → `footing.typ` (presents only, no recomputation) → PDF compiled with `--root .` from `worksheets/`.
- Load determination (DL/LL, tributary area, column self weight) is derived in Typst and emitted as `<concentric-footing-loads>`; Python reads checked `Ps`/`Pu`. The test suite reconciles them.
- Pin one hand-calculated example in `pytest.approx` before treating the tool as stable; correct reference typos in the Scope note rather than reproducing them.