Overview
This project is a full-stack mechanical engineering workbench that integrates multibody kinematics, system identification, and structural topology optimization into a single interactive web application. Built using Flask with a custom HTML5/JavaScript frontend, the platform simulates a 4-bar linkage mechanism, performs least-squares parameter identification of a spring–mass–damper system from noisy data, and executes a simplified SIMP-based topology optimization under a volume constraint.
The workbench demonstrates advanced competencies in mechanical modelling, numerical methods, and optimization. It combines analytical kinematics (Freudenstein equations), constrained nonlinear optimization (L-BFGS-B), and density-based topology optimization into a deployable digital engineering tool. The application reflects core principles of digital mechanics and simulation-driven design.

The Dashboard
The web application contains three fully interactive modules accessible via tabs:
🔧 Tab 1: 4-Bar Linkage Kinematics
Adjustable link lengths: L1 (ground), L2 (crank), L3 (coupler), L4 (rocker)
Real-time Grashof condition check (PASS/FAIL badge)
Coupler midpoint path visualization
Path metrics (number of points, X-range)
Instant geometry updates via AJAX API



📊 Tab 2: Parameter Identification (Spring–Mass–Damper)
Inputs: true mass (m), damping (c), stiffness (k), noise level
Simulated noisy measurement data
Least-squares identification using L-BFGS-B
True vs identified parameters with % error
Plot showing noisy data vs fitted response


🎯 Tab 3: Topology Optimization (Simplified SIMP)
Adjustable grid resolution (nx × ny)
Volume fraction constraint
Iteration control
Density field visualization (white = material, black = void)
Final volume fraction display

Key Engineering Concepts
Multibody Kinematics
Freudenstein closure equations
Nonlinear mechanism position analysis
Grashof condition:
s+l≤p+qs+l≤p+q
Spring–Mass–Damper System
Governing equation:
mx¨+cx˙+kx=F(t)mx¨+cx˙+kx=F(t)Harmonic frequency response formulation
Forced response modeling
Parameter Identification
Least-squares residual minimization
SciPy L-BFGS-B optimization with bounds
Noise sensitivity analysis
Topology Optimization
Density-based SIMP method
Volume fraction constraint enforcement
Iterative gradient-style density updates
Numerical Methods
Nonlinear equation solving
Constrained optimization
Sensitivity-inspired update schemes
Example Scenarios / Validation
1. Grashof PASS vs FAIL
Adjusting link lengths changes whether full crank rotation is feasible. The dashboard dynamically validates mechanism feasibility.
2. Coupler Path Sensitivity
Changing L2, L3, or L4 significantly alters the locus of the coupler midpoint, demonstrating kinematic dependency on geometry.
3. Noise Impact on Identification
Increasing noise from 0.005 to 0.05 increases parameter estimation error, illustrating sensitivity of least-squares fitting.
4. Volume Fraction Trade-Off
Lower volume fractions remove more material while preserving load paths, demonstrating stiffness vs mass trade-offs.
5. Iteration Effects in Topology
Increasing iterations refines the density distribution and improves structural clarity.
Tech Stack
Python, Flask, NumPy, SciPy, HTML5 Canvas, JavaScript (AJAX), Gunicorn, deployed on Render.com (auto-deploy from GitHub).
Live Demo
Open Workbench (may take 30s on first load)
