Skip to content

Instantly share code, notes, and snippets.

@joreilly86
Created October 1, 2025 19:13
Show Gist options
  • Select an option

  • Save joreilly86/940a2328eb3d752822cf6819df1218f9 to your computer and use it in GitHub Desktop.

Select an option

Save joreilly86/940a2328eb3d752822cf6819df1218f9 to your computer and use it in GitHub Desktop.
Example of a context.md document to support AI assisted engineering analysis and design.

Context Engineering Example | Flocode Newsletter

The text below is an example of a context engineering document for use with AI assisted engineering and design. You may choose to include 'fixed' geometry in this document or you may prefer to design with iterative inputs hardcoded into your design pipeline. Both are possible.

PROJECT REQUIREMENTS: INDUSTRIAL PORTAL FRAME STRUCTURAL DESIGN TOOL

NOTE: This document has been scrubbed of identifying information for use as a general example.

PROJECT OBJECTIVE

Develop a parametric Python-based structural design tool for preliminary sizing (30% design level) of primary and secondary structural members for a large industrial steel portal frame building with heavy crane systems. The tool must provide member sizing, basic code compliance checks, and visual schematics for engineering review and cost estimation.

BUILDING SPECIFICATIONS

Geometry

  • Footprint: 380 ft × 160 ft
  • Sidewall Height: 52 ft to eave
  • Roof: Low-slope gable, 2.5 ft rise to apex (54.5 ft total height), slope ~0.4:12
  • Structural System: Steel rigid portal frame
  • Frame Spacing: Parametric (target 32 ft)
  • Clear Height: 38 ft minimum for crane operations

Key Constraints

  • Crane System: Dual 550-ton overhead bridge cranes (118 ft span, 38 ft bridge width)

DESIGN REQUIREMENTS

Codes and Standards

  • Steel: AISC 360-22
  • Building Code: IBC 2021
  • Loads: ASCE 7-22
  • Risk Category: RC III minimum (RC IV if critical infrastructure)
  • Crane: CMAA 70-2020, AISC Design Guide 7

Load Criteria

Gravity:

  • Roof Live: 20 psf (before reduction)
  • Roof Dead: 6-8 psf
  • Wall Dead: 12 psf

Wind:

  • Per ASCE 7 Hazard Tool for site
  • Exposure Category C

Crane Loads:

  • Vertical Impact: 25% for powered cranes
  • Lateral: 20% of (lifted load + trolley)
  • Longitudinal: 10% of wheel loads

Materials: A992 steel (Fy = 50 ksi)

Serviceability Limits

  • Building drift: H/400 to H/500 (service wind)
  • Runway vertical deflection: L/600 (max wheel + impact)
  • Runway lateral deflection: L/400
  • Roof members: L/240 (live), L/180 (total)

STRUCTURAL MEMBERS

Primary (Expected Built-Up Sections)

  • Portal Frame Columns: W14×370 to W14×550 or built-up
  • Portal Frame Rafters: 160 ft span requires built-up tapered sections with haunches
  • Crane Runway Girders: Built-up for 550-ton capacity

Secondary

  • Roof Purlins: Z or C sections, 8 ft spacing
  • Sidewall Girts: Z or C sections
  • Eave Struts: Diaphragm collectors
  • Bracing: Lateral stability, minimum two bays at each end

PYTHON PROJECT STRUCTURE

project/
├── config/
│   ├── design_basis.yaml
│   ├── geometry.yaml
│   └── crane_parameters.yaml
├── src/
│   ├── loads/
│   │   ├── gravity.py
│   │   ├── wind_asce7.py
│   │   ├── crane_loads.py
│   │   └── combinations.py
│   ├── analysis/
│   │   └── frame_model.py
│   ├── design/
│   │   ├── primary_members.py
│   │   └── secondary_members.py
│   └── output/
│       ├── reports.py
│       └── schematics.py
└── requirements.txt

Required Libraries

  • PyNiteFEA: Frame analysis
  • steelpy: AISC properties and capacity
  • PyYAML: Configuration management
  • matplotlib: Visualization
  • numpy/pandas: Calculations

CRANE LOAD PARAMETERS

crane_system:
  capacity: 550  # tons per crane
  bridge_weight: 140  # tons
  trolley_weight: 45  # tons
  span: 30  # feet
  wheels_per_end: 2
  
load_factors:
  vertical_impact: 1.25
  lateral_factor: 0.20
  longitudinal_factor: 0.10

OUTPUT REQUIREMENTS

Schematics

  • Portal frame elevation with member sizes
  • Building plan with crane runways
  • Crane runway details

Reports

  • Member schedule with unity checks
  • Serviceability summary
  • Foundation reactions
  • Steel tonnage estimates

CRITICAL CONSIDERATIONS

  • 160 ft portal span with shallow slope generates significant base moments
  • Built-up rafters with variable depth and haunches expected
  • Heavy columns required for moment resistance
  • Crane integration decision: integrated vs. decoupled system

TOOL LIMITATIONS

  • 30% design accuracy (preliminary sizing only)
  • Standard sections baseline (built-up requires separate analysis)
  • 2D portal frame analysis
  • Crane loads subject to vendor data update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment