3D Topology Optimization using Method of Moving Asymptotes - Top3d/MMA
In this tutorial, you will learn how to implement Method of Moving Asymptotes(MMA) to our efficient 3d topology optimization program (top3d) in Matlab1.
Updates:
- The parameter
c_MMA
is increased by a power of 10. The gradient of the mass constraintdfdx
is divided by(volfrac * nele)
. - The MMA solver used in this tutorial is Version September 2007. (Aug 2017)
Step.1: Obtain MMA Matlab files
Before you can use Method of Moving Asymptotes (MMA) as an optimizer in our 3d topology optimization program, you need to obtain the Matlab implementation of MMA from Prof. Krister Svanberg (krille@math.kth.se) from KTH in Stockholm Sweden.
Step.2: Initialize MMA
Suppose now you have the MMA algorithm, which contains mmasub.m
and subsolv.m
. We can start modifying our program.
There is total of 29 input and output variables to mmasub
function. Some of them can be predefined before entering the iteration loop. The following code can be interred after line 65 in the top3d
program. For details about how to chose constants like a0
, a
, c_MMA
, d
, please check the Matlab note along with the MMA Matlab algorithm.
Step.3: Implement MMA
The implementation of MMA algorithm is very simple, one just need to replace the OC algorithm in lines 81-88 with MMA algorithm. However, there are some auxiliary variables we need define before we call the mmasub
function. Those are defined in the following code:
Please note that, in the code shown above, the inequality constraint is normalized. Also, to achieve better results, please consider smaller value than default tolx
.
FAQ
Why my volume fraction is not satisfied?
By following this tutorial, the MMA is implemented with inequality constraint (as defined in mmasub.m
), which is in the form of . In order to impose equality constraint (e.g., ), you will need two constraints: i.e., , .
If you have any questions, difficulties with this tutorial, please don’t hesitate to contact us.
-
MATLAB is a registered trademark of The MathWorks, Inc. For MATLAB product information, please contact The MathWorks, Inc., 3 Apple Hill Drive, Natick, MA 01760-2098, UNITED STATES, 508-647-7000, Fax: 508-647-7001, info@mathworks.com, www.mathworks.com. ↩