Log in

An efficient and easy-to-extend Matlab code of the Moving Morphable Component (MMC) method for three-dimensional topology optimization

  • Educational Paper
  • Published:
Structural and Multidisciplinary Optimization Aims and scope Submit manuscript

Abstract

Explicit topology optimization methods have received ever-increasing interest in recent years. In particular, a 188-line Matlab code of the two-dimensional (2D) Moving Morphable Component (MMC)-based topology optimization method was released by Zhang et al. (Struct Multidiscip Optim 53(6):1243-1260, 2016). The present work aims to propose an efficient and easy-to-extend 256-line Matlab code of the MMC method for three-dimensional (3D) topology optimization implementing some new numerical techniques. To be specific, by virtue of the function aggregation technique, accurate sensitivity analysis, which is also easy-to-extend to other problems, is achieved. Besides, based on an efficient identification algorithm for load transmission path, the degrees of freedoms (DOFs) not belonging to the load transmission path are removed in finite element analysis (FEA), which significantly accelerates the optimization process. As a result, compared to the corresponding 188-line 2D code, the performance of the optimization results, the computational efficiency of FEA, and the convergence rate and the robustness of optimization process are greatly improved. For the sake of completeness, a refined 218-line Matlab code implementing the 2D-MMC method is also provided.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price includes VAT (Brazil)

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20

Notes

  1. It should be noted that, alternatively, the p-norm function is another choice for approximating the max operation and analytical sensitivities could also be obtained accordingly (Picelli et al. 2018).

  2. The “fsparse” routine developed by Engblom and Lukarski (2016) is required (available at https://github.com/stefanengblom/stenglib).

  3. Phimax is regularized with a minimum value of \(-10^3\) to avoid possible singularity.

  4. The non-design solid domains also belong to the load transmission path.

  5. The MMA code of 2007 version is used (Svanberg 2007). Available at http://www.smoptit.se/

References

  • Aage N, Andreassen E, Lazarov BS (2015) Topology optimization using petsc: an easy-to-use, fully parallel, open source topology optimization framework. Struct Multidisc Optim 51(3):565–572

    Article  MathSciNet  Google Scholar 

  • Andreassen E, Clausen A, Schevenels M, Lazarov BS, Sigmund O (2011) Efficient topology optimization in matlab using 88 lines of code. Struct Multidisc Optim 43(1):1–16

    Article  Google Scholar 

  • Bathe KJ (2006) Finite element procedures. Pearson Education Inc., New York

    MATH  Google Scholar 

  • Challis VJ (2010) A discrete level-set topology optimization code written in matlab. Struct Multidisc Optim 41(3):453–464

    Article  MathSciNet  Google Scholar 

  • Cui T, Du Z, Liu C, Sun Z, Guo X (2022) Explicit topology optimization with moving morphable component (mmc) introduction mechanism. Acta Mech Solid Sin. https://doi.org/10.1007/s10338-021-00308-x

    Article  Google Scholar 

  • Du Z, Chen H, Huang G (2020) Optimal quantum valley hall insulators by rationally engineering berry curvature and band structure. J Mech Phys Solids 135(103):784

    MathSciNet  Google Scholar 

  • Engblom S, Lukarski D (2016) Fast matlab compatible sparse assembly on multicore computers. Parallel Comput 56:1–17

    Article  MathSciNet  Google Scholar 

  • Ferrari F, Sigmund O (2020) A new generation 99 line matlab code for compliance topology optimization and its extension to 3d. Struct Multidisc Optim 62:2211–2228

    Article  MathSciNet  Google Scholar 

  • Guo X, Zhang W, Zhong W (2014) Doing topology optimization explicitly and geometrically-a new moving morphable components based framework. J Appl Mech 81(8):0810089

    Article  Google Scholar 

  • Guo X, Zhang W, Zhang J, Yuan J (2016) Explicit structural topology optimization based on moving morphable components (mmc) with curved skeletons. Comput Methods Appl Mech Eng 310:711–748

    Article  MathSciNet  Google Scholar 

  • Guo X, Zhou J, Zhang W, Du Z, Liu C, Liu Y (2017) Self-supporting structure design in additive manufacturing through explicit topology optimization. Comput Methods Appl Mech Eng 323:27–63

    Article  MathSciNet  Google Scholar 

  • Hoang VN, Nguyen-Xuan H (2020) Extruded-geometric-component-based 3d topology optimization. Comput Methods Appl Mech Eng 371(113):293

    MathSciNet  MATH  Google Scholar 

  • Huang X, **e YM (2010) A further review of eso type methods for topology optimization. Struct Multidisc Optim 41(5):671–683

    Article  Google Scholar 

  • Kreisselmeier G, Steinhauser R (1980) Systematic control design by optimizing a vector performance index. In: Computer aided design of control systems, Proceedings of the IFAC symposium, pp 113–117

  • Liu C, Zhu Y, Sun Z, Li D, Du Z, Zhang W, Guo X (2018) An efficient moving morphable component (mmc)-based approach for multi-resolution topology optimization. Struct Multidisc Optim 58(6):2455–2479

    Article  MathSciNet  Google Scholar 

  • Liu K, Tovar A (2014) An efficient 3d topology optimization code written in matlab. Struct Multidisc Optim 50(6):1175–1196

    Article  MathSciNet  Google Scholar 

  • Luo J, Du Z, Guo Y, Liu C, Zhang W, Guo X (2021) Multi-class, multi-functional design of photonic topological insulators by rational symmetry-indicators engineering. Nanophotonics 10(18):4523–4531

    Article  Google Scholar 

  • Niu B, Wadbro E (2019) On equal-width length-scale control in topology optimization. Struct Multidisc Optim 59(4):1321–1334

    Article  Google Scholar 

  • Picelli R, Townsend S, Brampton C, Norato J, Kim HA (2018) Stress-based shape and topology optimization with the level set method. Comput Methods Appl Mech Eng 329:1–23

    Article  MathSciNet  Google Scholar 

  • Raponi E, Bujny M, Olhofer M, Aulig N, Boria S, Duddeck F (2019) Kriging-assisted topology optimization of crash structures. Comput Methods Appl Mech Eng 348:730–752

    Article  MathSciNet  Google Scholar 

  • Sigmund O (1997) On the design of compliant mechanisms using topology optimization. J Struct Mech 25(4):493–524

    Google Scholar 

  • Sigmund O (2001) A 99 line topology optimization code written in matlab. Struct Multidisc Optim 21(2):120–127

    Article  Google Scholar 

  • Smith H, Norato JA (2020) A matlab code for topology optimization using the geometry projection method. Struct Multidisc Optim 62:1579–1594

    Article  MathSciNet  Google Scholar 

  • Svanberg K (1987) The method of moving asymptotes-a new method for structural optimization. Int J Numer Methods Eng 24(2):359–373

    Article  MathSciNet  Google Scholar 

  • Svanberg K (2007) Mma and gcmma, versions september 2007. Optimization and Systems Theory 104

  • Takalloozadeh M, Yoon GH (2017) Implementation of topological derivative in the moving morphable components approach. Finite Elements Anal Des 134:16–26

    Article  Google Scholar 

  • Wang MY, Wang X, Guo D (2003) A level set method for structural topology optimization. Comput Methods Appl Mech Eng 192(1–2):227–246

    Article  MathSciNet  Google Scholar 

  • Wei P, Li Z, Li X, Wang MY (2018) An 88-line matlab code for the parameterized level set method based topology optimization using radial basis functions. Struct Multidisc Optim 58(2):831–849

    Article  MathSciNet  Google Scholar 

  • Xue R, Li R, Du Z, Zhang W, Zhu Y, Sun Z, Guo X (2017) Kirigami pattern design of mechanically driven formation of complex 3d structures through topology optimization. Extreme Mech Lett 15:139–144

    Article  Google Scholar 

  • Xue R, Liu C, Zhang W, Zhu Y, Tang S, Du Z, Guo X (2019) Explicit structural topology optimization under finite deformation via moving morphable void (mmv) approach. Comput Methods Appl Mech Eng 344:798–818

    Article  MathSciNet  Google Scholar 

  • Yoon GH, Kim YY (2003) The role of s-shape map** functions in the simp approach for topology optimization. KSME Int J 17(10):1496–1506

    Article  Google Scholar 

  • Zhang W, Li D, Zhang J, Guo X (2016) Minimum length scale control in structural topology optimization based on the moving morphable components (mmc) approach. Comput Methods Appl Mech Eng 311:327–355

    Article  MathSciNet  Google Scholar 

  • Zhang W, Yuan J, Zhang J, Guo X (2016) A new topology optimization approach based on moving morphable components (mmc) and the ersatz material model. Struct Multidisc Optim 53(6):1243–1260

    Article  MathSciNet  Google Scholar 

  • Zhang W, Chen J, Zhu X, Zhou J, Xue D, Lei X, Guo X (2017) Explicit three dimensional topology optimization via moving morphable void (mmv) approach. Comput Methods Appl Mech Eng 322:590–614

    Article  MathSciNet  Google Scholar 

  • Zhang W, Li D, Yuan J, Song J, Guo X (2017) A new three-dimensional topology optimization method based on moving morphable components (mmcs). Comput Mech 59(4):647–665

    Article  MathSciNet  Google Scholar 

Download references

Acknowledgements

The authors are grateful to Prof. Krister Svanberg for providing the MMA optimizer code.

Funding

This work is supported by the National Natural Science Foundation (11821202, 11732004, 12002073, 12002077, 11922204, 11872141), the National Key Research and Development Plan (2020YFB1709401), the Fundamental Research Funds for the Central Universities (DUT20RC(3)020, DUT21-RC(3)076), Dalian Talent Innovation Program (2020RQ099), Liaoning Revitalization Talents Program (XLYC1907119), Doctoral Scientific Research Foundation of Liaoning Province (2021-BS-063) and 111 Project (B14013).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Xu Guo.

Ethics declarations

Conflict of interest

The authors declare that they have no conflict of interest.

Replication of results

Matlab codes are listed in the Appendix. The stenglib package, containing the fsparse function, is available at https://github.com/ stefanengblom/stenglib. The MMA subroutines can be downloaded at http://www.smoptit.se/.

Additional information

Responsible Editor: Seonho Cho

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendices

Appendix 1: Exact expressions of \(\frac{\partial \phi ^i}{\partial d_j^i}\) in the MMC3d code

For conciseness, the following notations are introduced

$$\begin{aligned} w \triangleq \left( \frac{x'}{L_1^i}\right) ^p + \left( \frac{y'}{L_2^i}\right) ^p + \left( \frac{z'}{L_3^i}\right) ^p \end{aligned}$$
(20)
$$\begin{aligned} {\tilde{x}}=x'/L_1^i, \quad {\tilde{y}}=y'/L_2^i, \quad {\tilde{z}}=z'/L_3^i \end{aligned}$$
(21)
$$\begin{aligned} R \triangleq \begin{bmatrix} \cos {\beta ^i}\cos {\gamma ^i} &{} \cos {\beta ^i}\sin {\gamma ^i} &{} -\sin {\beta ^i} \\ \sin {\alpha ^i}\sin {\beta ^i}\cos {\gamma ^i} - \cos {\alpha ^i}\sin {\gamma ^i} &{} \sin {\alpha ^i}\sin {\beta ^i}\sin {\gamma ^i} + \cos {\alpha ^i}\cos {\gamma ^i} &{} \sin {\alpha ^i}\cos {\beta ^i} \\ \cos {\alpha ^i}\sin {\beta ^i}\cos {\gamma ^i} + \sin {\alpha ^i}\sin {\gamma ^i} &{} \cos {\alpha ^i}\sin {\beta ^i}\sin {\gamma ^i} - \sin {\alpha ^i}\cos {\gamma ^i} &{} \cos {\alpha ^i}\cos {\beta ^i} \end{bmatrix} \end{aligned}$$
(22)
$$\begin{aligned} R^\alpha \triangleq \begin{bmatrix} 0 &{} 0 &{} 0 \\ \cos {\alpha ^i}\sin {\beta ^i}\cos {\gamma ^i} + \sin {\alpha ^i}\sin {\gamma ^i} &{} \cos {\alpha ^i}\sin {\beta ^i}\sin {\gamma ^i} - \sin {\alpha ^i}\cos {\gamma ^i} &{} \cos {\alpha ^i}\cos {\beta ^i} \\ -\sin {\alpha ^i}\sin {\beta ^i}\cos {\gamma ^i} + \cos {\alpha ^i}\sin {\gamma ^i} &{} -\sin {\alpha ^i}\sin {\beta ^i}\sin {\gamma ^i} - \cos {\alpha ^i}\cos {\gamma ^i} &{} -\sin {\alpha ^i}\cos {\beta ^i} \end{bmatrix} \end{aligned}$$
(23)
$$\begin{aligned} R^\beta \triangleq \begin{bmatrix} -\sin {\beta ^i}\cos {\gamma ^i} &{} -\sin {\beta ^i}\sin {\gamma ^i} &{} -\cos {\beta ^i} \\ \sin {\alpha ^i}\cos {\beta ^i}\cos {\gamma ^i} &{} \sin {\alpha ^i}\cos {\beta ^i}\sin {\gamma ^i} &{} -\sin {\alpha ^i}\sin {\beta ^i} \\ \cos {\alpha ^i}\cos {\beta ^i}\cos {\gamma ^i} &{} \cos {\alpha ^i}\cos {\beta ^i}\sin {\gamma ^i} &{} -\cos {\alpha ^i}\sin {\beta ^i} \end{bmatrix} \end{aligned}$$
(24)
$$\begin{aligned} R^\gamma \triangleq \begin{bmatrix} -\cos {\beta ^i}\sin {\gamma ^i} &{} \cos {\beta ^i}\cos {\gamma ^i} &{} 0 \\ -\sin {\alpha ^i}\sin {\beta ^i}\sin {\gamma ^i} - \cos {\alpha ^i}\cos {\gamma ^i} &{} \sin {\alpha ^i}\sin {\beta ^i}\cos {\gamma ^i} - \cos {\alpha ^i}\sin {\gamma ^i} &{} 0 \\ -\cos {\alpha ^i}\sin {\beta ^i}\sin {\gamma ^i} + \sin {\alpha ^i}\cos {\gamma ^i} &{} \cos {\alpha ^i}\sin {\beta ^i}\cos {\gamma ^i} + \sin {\alpha ^i}\sin {\gamma ^i} &{} 0 \end{bmatrix} \end{aligned}$$
(25)

Then the exact formulations of \(\partial \phi ^i/\partial d_j^i\) can be expressed as

$$\begin{aligned}&\frac{\partial \phi ^i}{\partial x_0^i}=w^{\frac{1-p}{p}}\left( \frac{{\tilde{x}}^{p-1}}{L_1^i}R_{11} + \frac{{\tilde{y}}^{p-1}}{L_2^i}R_{21} + \frac{{\tilde{z}}^{p-1}}{L_3^i}R_{31}\right) \end{aligned}$$
(26)
$$\begin{aligned} \frac{\partial \phi ^i}{\partial y_0^i}=w^{\frac{1-p}{p}}\left( \frac{{\tilde{x}}^{p-1}}{L_1^i}R_{12} + \frac{{\tilde{y}}^{p-1}}{L_2^i}R_{22} + \frac{{\tilde{z}}^{p-1}}{L_3^i}R_{32}\right) \end{aligned}$$
(27)
$$\begin{aligned} \frac{\partial \phi ^i}{\partial z_0^i}=w^{\frac{1-p}{p}}\left( \frac{{\tilde{x}}^{p-1}}{L_1^i}R_{13} + \frac{{\tilde{y}}^{p-1}}{L_2^i}R_{23} + \frac{{\tilde{z}}^{p-1}}{L_3^i}R_{33}\right) \end{aligned}$$
(28)
$$\begin{aligned} \frac{\partial \phi ^i}{\partial L_1^i}=\frac{1}{L_1^i}w^{\frac{1-p}{p}}{\tilde{x}}^p \end{aligned}$$
(29)
$$\begin{aligned} \frac{\partial \phi ^i}{\partial L_2^i}=\frac{1}{L_2^i}w^{\frac{1-p}{p}}{\tilde{y}}^p \end{aligned}$$
(30)
$$\begin{aligned} \frac{\partial \phi ^i}{\partial L_3^i}=\frac{1}{L_3^i}w^{\frac{1-p}{p}}{\tilde{z}}^p \end{aligned}$$
(31)
$$\begin{aligned} \frac{\partial \phi ^i}{\partial \alpha }=-w^{\frac{1-p}{p}}\left( \frac{{\tilde{x}}^{p-1}}{L_1^i} \frac{\partial x'}{\partial \alpha } + \frac{{\tilde{y}}^{p-1}}{L_2^i} \frac{\partial y'}{\partial \alpha } + \frac{{\tilde{z}}^{p-1}}{L_3^i} \frac{\partial z'}{\partial \alpha }\right) \end{aligned}$$
(32)
$$\begin{aligned} \frac{\partial \phi ^i}{\partial \beta }=-w^{\frac{1-p}{p}}\left( \frac{{\tilde{x}}^{p-1}}{L_1^i} \frac{\partial x'}{\partial \beta } + \frac{{\tilde{y}}^{p-1}}{L_2^i} \frac{\partial y'}{\partial \alpha } + \frac{{\tilde{z}}^{p-1}}{L_3^i} \frac{\partial z'}{\partial \beta }\right) \end{aligned}$$
(33)
$$\begin{aligned} \frac{\partial \phi ^i}{\partial \gamma }=-w^{\frac{1-p}{p}}\left( \frac{{\tilde{x}}^{p-1}}{L_1^i} \frac{\partial x'}{\partial \gamma } + \frac{{\tilde{y}}^{p-1}}{L_2^i} \frac{\partial y'}{\partial \gamma } + \frac{{\tilde{z}}^{p-1}}{L_3^i} \frac{\partial z'}{\partial \gamma }\right) \end{aligned}$$
(34)

with the following identities

$$\begin{aligned} \frac{\partial x'}{\partial \zeta }= R_{11}^\zeta \left( x-x_0\right) + R_{12}^\zeta \left( y-y_0\right) + R_{13}^\zeta \left( z-z_0\right) \end{aligned}$$
(35)
$$\begin{aligned} \frac{\partial y'}{\partial \zeta }= R_{21}^\zeta \left( x-x_0\right) + R_{22}^\zeta \left( y-y_0\right) + R_{23}^\zeta \left( z-z_0\right) \end{aligned}$$
(36)
$$\begin{aligned} \frac{\partial z'}{\partial \zeta }= R_{31}^\zeta \left( x-x_0\right) + R_{32}^\zeta \left( y-y_0\right) + R_{33}^\zeta \left( z-z_0\right) \end{aligned}$$
(37)

where \(\zeta =\alpha ,\beta ,\gamma\) respectively.

Appendix 2: Modifications of the MMC3d code for the initial design 2 of compliant mechanism design example

The main code is updated as

vInt = [1.2 0.2 0.2 atan(2.5) atan(0.75) atan(0.3)];

MMC3d(10, 1, 5, 200, 20, 100, 5/6, 1/4, 5/8, vInt, 0.2);

In the MMC3d.m, the modifications in SEC 2, SEC 3, the finite element analysis and sensitivity analysis subsections are the same as the modifications for initial design 1. Nevertheless, lines 44-53 in SEC 4 for the generation of initial design variables are modified as:

x0 = xInt:2*xInt:DL; y0 = yInt:2*yInt:DW; z0 = zInt:2*zInt:DH;

xn = length(x0); yn = length(y0); zn = length(z0);

x0 = kron(x0,ones(1,1*yn*zn));

y0 = repmat(repmat(y0,1,1*zn),1,1*xn);

z0 = repmat(reshape(repmat(z0,2,1),1,8),1,xn);

N = length(x0);

l1 = repmat(vInt(1),1,N);

l2 = repmat(vInt(2),1,N);

l3 = repmat(vInt(3),1,N);

alp = repmat(vInt(4),1,N);

bet = repmat([repmat([-1 -1 1 1],1,2) repmat([1 1 -1 -1],1,2)]*vInt(5),1,3);

gam = repmat([repmat([1 -1],1,4) repmat([-1 1],1,4)]*vInt(6),1,3);

Appendix 3: Exact expressions of \(\frac{\partial \phi ^i}{\partial d_j^i}\) in the MMC2d code

For conciseness, the following notations are introduced

$$\begin{aligned} w \triangleq \left( \frac{x'}{L_1^i}\right) ^p + \left( \frac{y'}{L_2^i}\right) ^p \end{aligned}$$
(38)
$$\begin{aligned} {\tilde{x}}=x'/L^i, \quad {\tilde{y}}=y'/l^i \end{aligned}$$
(39)

And the derivatives of intermediate variables \(x',y',l^i\) with respect to design variables are first detailed as

$$\begin{aligned} {\left\{ \begin{array}{ll} \frac{\partial x'}{\partial x_0^i} = - \cos {\theta ^i} \\ \frac{\partial x'}{\partial y_0^i} = - \sin {\theta ^i} \\ \frac{\partial x'}{\partial \theta ^i} = y' \end{array}\right. } \qquad {\left\{ \begin{array}{ll} \frac{\partial y'}{\partial x_0^i} = \sin {\theta ^i} \\ \frac{\partial y'}{\partial y_0^i} = -\cos {\theta ^i} \\ \frac{\partial y'}{\partial \theta ^i} = -x' \end{array}\right. } \end{aligned}$$
(40)
$$\begin{aligned} {\left\{ \begin{array}{ll} \frac{\partial l^i}{\partial x_0^i} = \frac{\partial l^i}{\partial x'}\frac{\partial x'}{\partial x_0^i} = -\frac{t_2^i-t_1^i}{2L^i}\cos {\theta ^i}\\ \frac{\partial l^i}{\partial y_0^i} = -\frac{t_2^i-t_1^i}{2L^i} \sin {\theta ^i} \\ \frac{\partial l^i}{\partial L^i} = -\frac{t_2^i-t_1^i}{2(L^i)^2}x' \\ \frac{\partial l^i}{\partial t^i_1} = \frac{1}{2}-\frac{x'}{2L^i} \\ \frac{\partial l^i}{\partial t^i_2} = \frac{1}{2}+\frac{x'}{2L^i} \\ \frac{\partial l^i}{\partial \theta ^i} = \frac{t_2^i-t_1^i}{2L^i}y' \end{array}\right. } \end{aligned}$$
(41)

Then the exact expressions of \(\frac{\partial \phi ^i}{\partial d_j^i}\) in the MMC2d code can be formulated as

$$\begin{aligned}&\frac{\partial \phi ^i}{\partial x_0^i}=w^{\frac{1-p}{p}}\left( \frac{{\tilde{x}}^{p-1}}{L^i}\cos {\theta ^i} - \frac{{\tilde{y}}^{p-1}}{l^i}\sin {\theta ^i} + \frac{{\tilde{y}}^p}{l^i} \frac{\partial l^i}{\partial x_0^i}\right) \end{aligned}$$
(42)
$$\begin{aligned} \frac{\partial \phi ^i}{\partial y_0^i}=w^{\frac{1-p}{p}}\left( \frac{{\tilde{x}}^{p-1}}{L^i}\sin {\theta ^i} + \frac{{\tilde{y}}^{p-1}}{l^i}\cos {\theta ^i} + \frac{{\tilde{y}}^p}{l^i} \frac{\partial l^i}{\partial y_0^i}\right) \end{aligned}$$
(43)
$$\begin{aligned} \frac{\partial \phi ^i}{\partial L^i}=w^{\frac{1-p}{p}}\left( \frac{{\tilde{x}}^{p}}{L^i} + \frac{{\tilde{y}}^p}{l^i} \frac{\partial l^i}{\partial L^i}\right) \end{aligned}$$
(44)
$$\begin{aligned} \frac{\partial \phi ^i}{\partial t^i_1}=w^{\frac{1-p}{p}} \frac{{\tilde{y}}^p}{l^i} \frac{\partial l^i}{\partial t^i_1} \end{aligned}$$
(45)
$$\begin{aligned} \frac{\partial \phi ^i}{\partial t^i_2}=w^{\frac{1-p}{p}} \frac{{\tilde{y}}^p}{l^i} \frac{\partial l^i}{\partial t^i_2} \end{aligned}$$
(46)
$$\begin{aligned} \frac{\partial \phi ^i}{\partial \theta ^i}=w^{\frac{1-p}{p}}\left( -\frac{{\tilde{x}}^{p-1}}{L^i}y' + \frac{{\tilde{y}}^{p-1}}{l^i}x' + \frac{{\tilde{y}}^p}{l^i} \frac{\partial l^i}{\partial \theta ^i}\right) \end{aligned}$$
(47)

Appendix 4: A 256-line MATLAB code for the 3D-MMC method

figure ms
figure mb
figure mc
figure md

Appendix 5: A 218-line MATLAB code for the 2D-MMC method

figure na
figure nb
figure nc
figure nd

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Du, Z., Cui, T., Liu, C. et al. An efficient and easy-to-extend Matlab code of the Moving Morphable Component (MMC) method for three-dimensional topology optimization. Struct Multidisc Optim 65, 158 (2022). https://doi.org/10.1007/s00158-022-03239-4

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s00158-022-03239-4

Keywords

Navigation