Spaces:
Sleeping
A newer version of the Gradio SDK is available:
6.6.0
title: Cantilever Beam Calculator with AI Explanations
emoji: 🏗️
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false
license: mit
🏗️ Cantilever Beam Calculator with AI Explanations
Overview
An engineering analysis tool that calculates stress, deflection, and safety factors for cantilever beams, enhanced with AI-generated explanations to make results accessible to non-engineers.
Features
Engineering Calculations
- Stress Analysis: Maximum bending stress at fixed support
- Deflection Analysis: Maximum deflection at free end
- Safety Factors: Both yield and serviceability checks
- Dynamic Properties: First natural frequency calculation
- Mass Estimation: Total beam mass based on geometry and material
AI Integration
- Natural language explanations of numerical results
- Context-aware safety assessments
- Plain-English interpretation of engineering metrics
- Educational insights for non-technical users
Technical Scope
Beam Configuration
- Type: Cantilever beam with fixed support
- Loading: Concentrated force at free end
- Cross-section: Rectangular (uniform)
- Analysis Method: Linear elastic, small deflection theory
Input Parameters
Geometry:
- Length: 0.1 - 10 meters
- Width: 5 - 1000 mm
- Height: 5 - 1000 mm
Loading:
- Force: 0.001 - 1000 kN (at free end)
Material Properties:
- Young's Modulus: 1 - 500 GPa
- Yield Strength: 10 - 2000 MPa
- Density: 100 - 20000 kg/m³
Calculations
Stress Analysis
σ_max = Mc/I where: M = FL (moment at fixed end) c = h/2 (distance to neutral axis) I = wh³/12 (second moment of area)
Deflection Analysis
δ_max = FL³/(3EI) where: F = applied force L = beam length E = Young's modulus
Safety Factors
- Yield: FoS = Sy/σ_max (should be > 1.5)
- Deflection: FoS = δ_allow/δ_max (where δ_allow = L/200)
Validation & Assumptions
Assumptions
- Homogeneous, isotropic material
- Linear elastic behavior (Hooke's Law)
- No buckling considerations
- Neglecting self-weight effects
- Perfect fixity at support
Valid Ranges
- Aspect ratio (L/h): 5 to 50
- Deflection/Length: < 5% (small deflection theory)
- Stress level: Below yield strength
Example Use Cases
- Structural Design: Preliminary sizing of cantilever structures
- Education: Teaching beam theory and structural mechanics
- Quick Checks: Rapid verification of beam adequacy
- Material Selection: Comparing different materials for same geometry
AI Model
- Model: SmolLM2-135M-Instruct
- Purpose: Generate accessible explanations of engineering results
- Temperature: 0.7 for balanced creativity and accuracy
Safety Notes
⚠️ Important: This tool is for educational and preliminary design purposes only. Professional structural analysis software and engineering judgment should be used for actual design work.
Technical Stack
- Backend: Python with engineering calculations
- Interface: Gradio for web UI
- AI: HuggingFace Transformers for natural language generation
- Deployment: HuggingFace Spaces
Created for CMU 24-679 Course - Engineering Calculations with Natural Language Explanations