The Objective: Developed for the Computer Design of Structures and Materials curriculum at the University of Houston, I engineered a 2D structural topology optimization algorithm from scratch in Python. Utilizing the SIMP method and a custom Finite Element Analysis (FEA) solver, the program iteratively minimizes structural compliance under variable load cases and strict volume constraints.
Iteration Animation of Bracket
Iteration Animation of Truss
Language: Python (NumPy, SciPy, Matplotlib, SymPy)
Core Concepts: Finite Element Analysis (FEA), Solid Isotropic Material with Penalization (SIMP), Optimality Criteria (OC), Sensitivity Filtering
To ensure absolute precision before numerical substitution, I utilized SymPy for the symbolic differentiation and integration of the shape functions. This allowed for an exact derivation of the strain-displacement matrix and the element stiffness matrix for a four-node quadrilateral element. Once the local matrices were verified, I applied a local-to-global mapping algorithm (edofMat) to assemble the global structural stiffness matrix under plane stress conditions.
I implemented the Solid Isotropic Material with Penalization (SIMP) model. The algorithm penalizes intermediate "gray" material densities, driving the elements toward a purely solid or purely void state. To prevent the global stiffness matrix from becoming singular and crashing the solver, I integrated a baseline void stiffness. The custom FEA solver iteratively evaluates this matrix, applying specific boundary conditions (like fixed edges for bracket load cases) to compute nodal displacements via a linear solver.
Topology optimization is prone to numerical anomalies like alternating solid and void pixels. To solve this, I engineered a radius-based sensitivity filter that weights the structural compliance gradient of neighboring elements, ensuring mesh independence. Finally, to strictly enforce the structural volume constraint, I utilized the Optimality Criteria (OC) method. I implemented a bisection root-finding loop to dynamically calculate the optimal Lagrange multiplier, ensuring the algorithm smoothly converges on a design that minimizes compliance while strictly adhering to the maximum weight limit.
Pictured below are the finalized structural topologies for both the bracket and truss load cases, generated via the custom SIMP algorithm. The complete Python repository, including the FEA solver and optimization loops, is linked below.
Final Bracket
Final Truss
Developing this topology optimization solver from scratch was a rigorous exercise in translating theoretical solid mechanics into functional code. By manually deriving the global stiffness matrices and programming the SIMP penalization logic, I gained a fundamental understanding of how commercial FEA software operates. This project reinforced my ability to leverage Python and numerical methods to solve complex, computationally heavy mechanical design constraints, ensuring structures that are both functional and optimized for efficiency.