Here is the GIT Repo for the project: https://github.com/shermama96/FEA-TOPOPT
I’ll be adding some photos to this page once I implement some of the mesh visualization functions. Currently I’ve written the classes for the nodes, elements, mesh, setup, and domain. I’ve finished the global system level assembly and now need to implement the solution and post-processing aspects of the FEA solver. Then I can use the displacement vector from the FEA a set of design variables for the topology optimization.
Below is the project proposal given for this project:
I propose to implement an FEM-based 2D topology optimization algorithm. Topology Optimization (TO) is hugely relevant in the modern world of Mechanical Engineering. In the past, Mechanical Engineers have often thought of most structural components in terms of simplified models. Almost any structural component can be represented as a combination of beams in bending, torsional members, or axially loaded members. With the advent of FEA software packages, an engineer is given access to a much larger (and less simplified) design space. The problem still exists that FEA models don’t necessarily tell a designer how to be mass efficient. In most structural designs, there is typically a tradeoff between mass and load carrying capacity. As your design becomes more complex, deciding where it is and isn’t acceptable to remove mass becomes more and more difficult a task. Considering that (minimizing) mass is frequently a dominate design requirement in modern engineering design, the more that can be done to minimize mass, the better (while still meeting structural requirements).
Developing a procedure to locate material helps us to overcome these challenges. TO asks the question “How can I strategically place mass in a prescribed domain in order to obtain optimal structural performance.”
This process was never really applicable to most engineering designs because the ornate structures produced were either ridiculously expensive, or even impossible to manufacture. With the advent of 3D additive manufacturing methods, the benefits of these extremely mass efficient ornate structural components can be had, and their applicability to modern engineering is continuously growing.
TO relies on FEM-based nodal displacements which act as design variables in a minimization problem. I will be implementing the back-end for the FEM solver in Python. This includes all the components associated with Galerkin method including:
- Discretizing the domain using linear or quadratic “quad” elements
- Construction of a global stiffness, mass, and force vectors/matrices using shape function interpolators and gauss integration
For ease of meshing, all design spaces will be passed as rectangular domains, and only linear or quadratic quad elements will be available for meshing. Along with a conventional FEM mesh, a binary grid will be generated to represent the “state” of a mass element. Procedures will exist to reformulate the boundary of the system as a function of this binary grid.
The topology optimization process can be written as an optimization problem subject to a volume constraint, any additional constraints you’d like to use to guide to optimization. The design update schemes are the crux of many different TO approaches.
The user will have a choice of on both objective functions and constraints. Constraint functions I hope to implement are (and potentially more):
- Stress Driven Constraints: Minimize mass keeping maximum equivalent stress above a prescribed FOS.
- Dynamic Response Constraints: Minimize mass, keeping the lowest resonant frequency above a prescribed threshold. Modal analysis using FEM is typically done by finding eigenvectors of the system
- Manufacturing Constraints, such as minimum corner radius or minimum member thickness (These are important for a user choosing to conventionally manufacture the resulting design)
- Mass percentage Constraints: Typical TO constraint which purely seeks to minimize mass.
- Stiffness Constraints: Minimize mass while keeping deflections of specific nodes under a threshold.
Additionally the user will be able to select “safe-regions” where the solver will not be allowed to remove mass. This is typically done around holes and regions locations where the part undergoing TO interfaces with other parts in an assembly. If there is time, a GUI will be created to make configuring the domain, boundary conditions, and loading much simpler. Alternatively, the solver might accept .dwg files (binary file containing 2D CAD data and metadata) for domain configuration. To be clear, any and all “configuration options” can be done by passing a text file to the solver using keywords and formatted input data, and node/element ID’s.
One of the primary issues with todays TO solvers is they do not convert the discretized result to a smooth and continuous geometry ready for manufacture. I hope to implement a “smoothing” component of my TO algorithm. Once the minimization is complete, curves are fit to the jagged, exposed element edges so no manual post processing is required. This will be done either by fitting polynomials or piecewise interpolants to the exposed nodes. Finally an .stl file is automatically generated which can be directly imported to any 3D slicing software for printing.