DOI: 10.5281/zenodo.5714297
title: Supplementary codes and datasets for "Modular-topology optimization of structures and mechanisms with free material design and clustering"

description: This repository supports Tyburec, M., Doškář, M., Zeman, J., & Kružík, M. (2022). Modular-topology optimization of structures and mechanisms with free material design and clustering. <em>Computer Methods in Applied Mechanics and Engineering</em>, <em>395</em>, 114977. https://doi.org/10.1016/j.cma.2022.114977 (first published as preprint 2111.10439 at arXiv.org). This repository contains: MATLAB source codes for <em>(modular) free material optimisation</em> and <em>hierarchical stiffness clustering</em> (folder <code>./mFMO/</code>) C++ source codes for <em>modular topology optimization</em> (folder <code>./MTO/</code>) Input/output data of the test suite (folder <code>./data/</code>) <strong>1. Data flow</strong> The test suite considered in the manuscript covers 4 problems: Messerschmitt-Bölkow-Blohm beam (labelled as <code>mbb</code>) Inverter compliant mechanism (labelled as <code>inv</code>) Gripper compliant mechanism (labelled as <code>grip</code>) Reusable design of both compliant mechanisms (labelled as <code>invgrip</code>) Each problem in the dataset is stored within a separate subfolder named according to the labels mentioned above. The final level of subdirectories <code>{X}color</code> comprises of the results for problems with <code>X</code> denoting the number of edge codes considered for each edge direction during the clustering (<code>0color</code> stands for a non-modular design and <code>1color</code> represents the design based on Periodic Unit Cell). Each of the folders contains outputs of the modular free material optimisation in the following form: <code>{label}{X}.mat</code> <code>{label}{X}.til</code> <code>{label}{X}.tset</code> <code>{label}{X}guess.mat</code> Files <code>*.til</code>, <code>*.tset</code>, and <code>*guess.mat</code> are then converted into a JSON input file for the modular topology optimization code with generator scripts which can be found in <code>./MTO/scripts</code> folder. Note that each of the problems in the test suite has its own generator script <code>generate_modular_problem_{MBB,inverter,gripper,inverterAndGripper}.mat</code>. The generator scripts make a directory named according to the key <code>MTO_{n}_kernelSensitivity</code>, where <code>n</code> denotes the resolution of each module (i.e. the number of nodes along one direction). The directory also contains the outputs of the modular topology optimisation in the form of the initial and the final state of the optimization in <code>VTK</code> files and visualisation of the final state in <code>SVG</code> files. The log file <code>log.txt</code> stores the optimized objective and progress of the value along with stopping criteria quantities during iterations. <strong>2. Running codes</strong> <strong>2.1 Modular free material optimisation</strong> MATLAB scripts and functions for (modular) Free Material Optimization (FMO) are contained in the <code>mFMO</code> data folder. The codes have been tested with MATLAB R2019b. To run the codes the user is required to install the PENNON optimizer. A free academic license is provided by its authors on request. Input files for individual problems are defined in the <code>mFMO/problems</code> folder and are launched with the <code>runproblem(problemName, numClusters)</code>, where <code>problemName</code> refers to the file in the <code>mFMO/problems</code> folder without the file extension and <code>numClusters</code> denotes the maximum number of color codes in Wang tiling formalism. If successful, the optimization produces output files in <code>mFMO/fmo_fig/{label}/{X}colors/{T}/</code>: <code>{label}{X}.mat</code> (contains clustering and tiling information) <code>{label}{X}_tmp.mat</code> (contains results of non-modular FMO) <code>{label}{X}.til</code> (the assembly plan) <code>{label}{X}.tset</code> (Wang tile set) <code>{label}{X}guess.mat</code> (guess for TO) where <code>T</code> is the optimization time stamp. <strong>2.2 Modular topology optimisation</strong> All results were obtained with version <code>v1.1.2</code>, which is also provided in the folder <code>MTO</code>, and linked Intel® oneAPI Math Kernel Library and the incorporated PARDISO sparse solver. For the recent development of the code see the open git repository at https://gitlab.com/MartinDoskar/modular-topology-optimization. The repository also contains a detailed description of input parameters and code design. Modular topology optimisation code uses CMake for the cross-platform build automation. For instance, under Linux, the whole code can be compiled in the standard five steps: <pre><code>cd ./MTO mkdir build cd ./build cmake -DCMAKE_BUILD_TYPE=Release .. make </code></pre> All executables are automatically stored in <code>./MTO/bin/</code> folder. Individual problems can be optimized by parsing the JSON files obtained from the generator scripts as an argument to the MTO.Application binary, e.g., <pre><code>./MTO/bin/MTO.Application.exe path_to_data/mbb/2color/MTO_100_kernelSensitivity/input_modular_mbb_2colours_100.json </code></pre> <strong>Acknowledgement</strong> The related research and code development was supported by the Czech Science Foundation, project No. 19-26143X.