How hanishdhanwalkar/topology-optimization-using-python works
This repository implements two closely related Python topology-optimization workflows. A user-defined polygon, boundary constraints, and applied forces feed an optimizer that repeatedly solves a finite-element model, evaluates compliance, and updates material density toward a target volume. The newer workflow also supports interactive thresholding and animation; both workflows plot optimization progress and display density and stress results. The source shows direct calls between the workflow, solver, and plotting code. The README only documents the project topic and a FEniCS installation prerequisite; unsampled assets and runtime behavior are not inferred.
Main entry points: main.py Topology optimizer · main copy.py Legacy optimizer · frontend.py Iteration plots · backend2.py Simulation model
Components 8
Optimization workflows
- Topology optimizer
main.py - Legacy optimizer
main copy.py
Finite-element solver
- Simulation model
backend2.py - Legacy simulation
backend.py
Plots and output
- Iteration plots
frontend.py - Density thresholding
frontend.py - Density animation
frontend.py
Other components
- User
Connections 10
- User → Topology optimizer: configures
- User → Legacy optimizer: configures
- Topology optimizer → Simulation model: drives solves
main.py - Topology optimizer → Iteration plots: updates plots
main.py - Topology optimizer → Density thresholding: sets threshold
main.py - Topology optimizer → Density animation: saves animation
main.py - Legacy optimizer → Legacy simulation: drives solves
main copy.py - Legacy optimizer → Iteration plots: updates plots
main copy.py - Legacy optimizer → Density thresholding: sets threshold
main copy.py - Legacy optimizer → Density animation: saves animation
main copy.py