Issue 
Int. J. Simul. Multidisci. Des. Optim.
Volume 14, 2023



Article Number  4  
Number of page(s)  9  
DOI  https://doi.org/10.1051/smdo/2023004  
Published online  26 June 2023 
Research article
Integration of digital imagery for topology optimization
^{1}
MOBHEEL, Département de recherche de Capgemini Engineering, 90400 MerouxMoval, France
^{2}
ICB UMR 6303 CNRS, Univ. Bourgogne FrancheComté, UTBM, Belfort, France
^{*} email: Nadhir.lebaal@utbm.fr
Received:
20
October
2022
Accepted:
30
March
2023
To manufacture highquality products with low manufacturing costs and optimal performance, better design concepts are required. The initial design concept can lead to inefficient structural design and higher manufacturing costs if the topology is not optimal. Topology optimization enables designers to reach their design goals faster, more accurately, and costeffectively. However, the geometry obtained through topology optimization is not manufacturingready due to nonsmooth boundaries and gray level images, which require postprocessing design implementation by engineers. Various researchers have used different image processing techniques to convert the gray image into a binary map to address this issue. This paper focuses on using image processing to evaluate the differences in optimal designs induced by meshing. This study aims to aid in the parametric understanding of different designs targeting the same application by introducing two new parameters: similarity ratio and conformity ratio. The results compare an optimal geometry obtained using structured and unstructured meshes. Topological optimization algorithms applied to mechanical problems allow for reducing a structure's mass while ensuring its rigidity. However, the final structures may differ for the same problem depending on whether they were meshed regularly or irregularly. This article characterizes the differences between the two final structures using an image processing approach.
Key words: 2D topological optimization / regular mesh / irregular mesh / image treatment for mechanical application
© Z. Atmani et al., Published by EDP Sciences, 2023
This is an Open Access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
1 Introduction
Due to the complexity of its calculations, topological optimization and meshes are closely linked. Most of the studies reported in the literature have been carried out using a regular mesh on simple mechanical problems such as embedded beams and doublesupported beams [1,2]. Although the number of elements strongly influences the final design of the optimized structure, and the complexity of the structure evolves with it, very few studies deal with the influence of this parameter. Sigmund et al. [2] discuss this in their paper but leave the question open: “should the refinement of the mesh model the same optimal structure with a better description of the boundary conditions and not give a different structure with more detail and quality?”
To our knowledge, there is very little research dealing with topological optimization from an irregular mesh, even though this type of mesh is better suited to complex geometries. Thore et al. [3] conducted a study to compare the results of topological optimization of a regularly and irregularly meshed doublesupported beam. The primary goal of the paper was to evaluate the influence of the penalty factor on additive fabrication stresses. However, the authors conducted this study without any penalty filter and thus obtained topological optimization results from the two meshes discussed previously. Despite some local dissimilarities, the two structures presented fairly similar designs.
Therefore, the present article aims to explore whether there is a fixed topological optimization profile obtained after convergence of compliance.
2 Principle
2.1 Positioning the problem
The study was conducted on a 20 × 10 mm beam, fixed at one end and subjected to a 100 N force at the other end. The dimensions were chosen to satisfy the small disturbance hypothesis. The material parameters considered are: E = 200 GPa and ν = 0.3.
The topological optimization was carried out using the inhouse developed ELiOT software [4], which allows calculations from a model created by FreeCAD finite element calculation codes and meshed with GMSH [5,6]. The constraint applied to the ELiOT code consisted of halving the mass of the initial object (volume fraction, f_{v} = 0.5), and the optimization algorithm used was the OC (optimal criteria) method.
The beam was meshed in two different ways: regularly (Fig. 1) and irregularly (Fig. 2) with quadrangular elements. As the number of elements was not the same for both meshes, the internode distance was considered as the parameter to be varied (Tab. 1).
The coordinate table contains the coordinates of each node in the mesh. It is represented by a matrix that has as many columns as the number of dimensions in the problem and as many rows as the number of nodes in the mesh. The connectivity table is used to define the connections between the nodes in the mesh. The number of rows in the table corresponds to the number of elements in the mesh, and the number of columns corresponds to the number of edges in the element being considered.
A mesh is considered regular (Fig. 1) when all its edges have the same connectivity. It is created by replicating an elementary mesh shape multiple times, and each element can be defined from another one.
A mesh is said to be irregular when its elements are arranged in a disorderly manner (Fig. 2). As the numbering of nodes and elements is often random, only the coordinate and connectivity tables can be used to navigate this type of mesh [7].
Given these considerations, it is challenging to make a direct comparison between these two meshes. To address this issue, a comparison by image processing has been proposed.
Fig. 1 Regular mesh with an internodal distance of 1 mm. 
Fig. 2 Irregular mesh with an internodal distance of 1 mm. 
Size and number of elements according to the type of mesh.
2.2 Mechanics and image treatment
In the literature, image processing is predominantly utilized in mechanical problems with experimental settings, to measure the displacement of a point during manipulation. For this, a speckle is applied to the studied piece and photographs are taken at different instances during the test. Image correlation software is then utilized to track the path followed by the point of interest, to determine its displacement and subsequently, its deformation field Chu et al. [8]. A less significant, yet equally interesting objective for industry, is to determine the spatial distribution of the material parameters characterizing the studied sample Beliis et al. [9]. Image correlation also allows for tracing the history of a crack and identifying its origin [10,11].
To establish a connection between image processing and digital simulation, it is essential to define a mathematical model before conducting this study. As the optimized beam has intermediate densities specific to the OC method, it is considered heterogeneous. Thus, it is possible to construct a Representative Elementary Volume (REV) to homogenize the heterogeneities. This requires defining different scales, each with a characteristic size, including one for the structure, one for the pixel, and one for the element. The pixel serves as the REV and its size influences the accuracy of the final results. In brief, this method involves drawing a regular grid, with a tile size that adheres to certain conditions, on the optimized structures obtained. This step allows for the regularization of any mesh, and each tile becomes a pixel in the final image with a single value.
In the case of the OC method, the topological optimisation algorithm follows the following objective function:
{minρ:c(ρ)=UeT⋅Ke⋅Uesubjectto:{V(ρ)V0=fvK⋅U=F10−3<ρ<1(1)
Where:
c is the compliance
U_{e} is the displacement of the considered element.
V is the volume of the optimized structure.
V_{0} is the initial volume of the structure.
ρ is the intermediate density.
For the following, two writing will be used:
N_{p} is the number of pixels of the image.
N_{e} is the number of elements of the structure.
The volume of the structure after optimisation is, by definition:
with ρ_{e} the intermediate density of the considered element.
To link the three scales presented above, the homogenisation method will be used here. It consists in averaging the effects of heterogeneities within a REV in order to determine the macroscopic effects of the studied structure. To be able to apply this method, the following two conditions must be respected:
The pixel size must be very small in front of that of the structure in order for the structure to be considered as a continuous environment, thus N_{p} ≫ 1.
The pixel size must be very large in front of the element size in order to neglect the fluctuation in behaviour between a point and its neighbour. The material is then considered to be macroscopically homogeneous. Thus, it is necessary that N_{e} ≫ N_{p}.
The intermediate density of a pixel is then equal to the average of the intermediate densities of the elements contained in that pixel:
Depending on the intermediate pixel density, the volume of the structure after optimisation is therefore:
Finally:
Remark:
In practice, it is the contrast of the C_{p} (between 0 and 255) that will be measured, so the intermediate density of a pixel is:
2.3 Image creation from the optimized structure
The files generated by the topological optimization code contain the element number and the assigned intermediate density. Using equation (6), these intermediate densities can be converted into contrasts. In both mesh cases, the files are sorted in ascending order based on the elements, and the images are constructed in rows. However, for the irregular mesh, the first element of the mesh may not correspond to the first pixel of the image, and therefore, the elements need to be ordered to obtain an accurate image. An algorithm is used to calculate the center of gravity of each element and sort them in ascending order of rows and columns.
One of the main assumptions of this study is that the number of elements in the structure is much greater than the number of pixels in the image. Therefore, it is necessary to average the intermediate densities of the elements within a pixel using equation (3). This step is accomplished by a pooling operation, which is commonly used in convolutional neural network algorithms Sosnovik et al. [12]. This operation groups elements together and creates a subsampled image.
2.4 Calculation of the image dissimilarity
Each pixel of a greyscale image has a value between 0 and 255 and corresponds to the average of the intermediate densities of the elements contained in that pixel. Let's consider two images resulting from topological optimisation. One obtained from a regular mesh I_{reg} and the other from an irregular mesh I_{irreg}. The dissimilarity between two images is defined by Ardeshir et al. [13]:
It has to be noted that equation (7) is a variation of the Manhattan distance.
Remark 1:
For further calculations, equation (7) will be used. However, for visual results, equation (7) will become:
The value 255 in this formula will invert the contrast so that the result is more visual (black on white instead of white on black). When subtracting, the algorithm will remove the identical material between the two images, symbolised by white in the final image, and will finally display only the excess material.
Remark 2:
In order for the calculation to be carried out, the images must have the same dimensions.
Considering (6), equation (7) becomes:
However, if only one image is taken into account, the equation becomes:
For an image, the dissimilarity corresponds to the final volume of the structure after optimisation. Thus, the measurement of dissimilarities between two images corresponds to the difference in final volume between the two optimised structures. The equation thus becomes:
Given the definition of the volume fraction in equation (1) and equation (11), it will be possible to retrieve the volume fraction (Eq. (12)) and the difference in volume fraction (Eq. (13)) between two structures via an image processing method:
and:
Two coefficients will be defined for the continuation of the:
The compliance ratio, which ideally should be 1. This calculation can be done on each image to be studied and will determine whether the image of the optimised structure complies with the desired final volume. It is defined by :
The dissimilarity rate, which ideally should be 0. This calculation can only be performed to compare two images and will determine whether the two images are similar. It is defined by:
In these two expressions (Eqs. (14) and (15)), V_{f,th} corresponds to the theoretical final volume of the optimised structure, i.e. the one imposed by the user at the beginning of the topological optimisation code.
It should be noted that the results of equations (10) and (11) will be a number of pixels and not a volume as conventionally defined.
An important remark is also to be taken into consideration for the compliance rate and the dissimilarity rate: these are coefficients defined in a global way. This means that they perform calculations on the entire image without determining where the differences will be most marked.
3 Results
3.1 Study of mechanical properties
The parameter that takes into account mechanical properties in the available topological optimization code is compliance. This parameter will be examined by varying the characteristic length of the different meshes (Fig. 3). Other parameters, such as volume fraction, could have been considered. However, the quality of the result will be influenced more by the accuracy of the machine used for the calculations rather than the mesh size.
Figure 3 clearly shows that the smaller the size of the element, i.e. the more elements in the mesh, the lower the compliance. A convergence step can be observed from an element size of 0.25 mm upwards.
Note that the relative deviation between the compliance values obtained from a regular mesh and an irregular mesh is less than 2% for an element size of 0.5 mm, and finally decreases to 0.3% for an element size of 0.08 mm. Thus, the mechanical properties after topological optimization of a regularly or irregularly meshed structure are similar. The two meshes are therefore equivalent.
Fig. 3 Compliance vs element size for a regular mesh (in blue) and irregular mesh (in red). 
3.2 Influence of the REV size on the volume fraction
In the mechanics and image processing section, it was observed that the Representative Elementary Volume (REV) is equivalent to a pixel and represents the average of intermediate densities of the elements composing that pixel. A study was conducted on the number and shape of elements that constitute the REV. The regular structure with 80,000 elements was used for comparison. Various sizes and shapes of REV were applied to this structure to determine their potential effects on the structure's volume fraction. The results are summarized in Table 2, which includes the facies of the images obtained after applying the REV to the initial image (measuring 200 × 400), the size of the REV, the size of the final image, and the number of elements per REV.
REV size and facies obtained.
3.3 Study of dissimilarity between regular and irregular meshes
For this study, the code allowing the elements to be arranged in a certain order is only functional for the regular mesh. For irregular meshing, since the number of elements per column is not fixed according to the number of rows, it is difficult to construct an image from this data. The images required for this study were therefore cut directly from Paraview using the capture tool.
The results are summarised in Table 3. It contains the facies of regular and irregular structures, the volume fraction calculated with the image processing code, the compliance rate and the dissimilarity rate.
Facies, dissimilarity ratio vs element size.
4 Discussion
4.1 Influence of REV size on the volume fraction
Figure 4 shows the influence of the size of the REV on the volume fraction. First of all, it is useful to point out that, despite a fairly marked distribution of points, the results remain close to the imposed volume fraction, i.e. 0.5. Thus, for Figure 4, the results, although close to reality, seem to depend on the number of elements that make up the REV: between 2 and 32 elements per REV, the volume fraction does not vary greatly. However, from 64 elements per REV, the volume fraction increases; this means that the differences in intermediate densities between the elements become too great not to influence the quality of the REV.
Some REV have the same number of elements but not the same volume fraction. Figures 5 and 6 are intended to determine the influence of the REV dimensions on the quality of the volume fraction.
Concerning Figure 5, the number of lines in the REV does not appear to have a significant impact because a convergence of the volume fraction can be observed for 1 and 2 lines. Figure 6 displays constant volume fractions for 1, 2, 4, and 8 columns. The REV composed of 4 rows and 8 columns seems to be the most suitable for this structure as it will be closest to the value imposed in the topological optimization code. The final image will correspond to the dimensions (50 × 50).
Fig. 4 Volume fraction vs number of elements in the REV. 
Fig. 5 Volume fraction vs number of columns in the REV. 
Fig. 6 Volume fraction vs number of lines in the REV. 
4.2 Study of the dissimilarity between regular and irregular meshes
A first visual observation can be made regarding the facies of regular and irregular meshes (Tab. 3): the smaller the element size, the greater the number of internal branches in the structure. However, it can be noted that for an element size of 0.08 mm, the facies of the regular structure appears identical to that obtained for 0.1 mm and the number of internal branches decreases for the irregular one.
The volume fractions have, however, significantly degraded compared to the values entered by the user in the topological optimization code. This degradation is due to the manual cutting of images. The compliance rate has also been affected, not exceeding 80%. Nevertheless, given the direct correlation between compliance rate and volume fraction (Eqs. (12) and (14)), the volume fractions obtained by image processing on the final regular and irregular structures appear consistent with reality.
For the image subtraction, white areas correspond to common material between regular and irregular meshes. The shaded areas correspond to excess material in one structure over the other. As the subtraction is absolute, it is not possible to determine which structure the excess comes from. Note that for visual purposes, each pixel has been subtracted by 255 to obtain a lighter image (black on white instead of white on black). However, this subtraction is not performed for the calculation of the dissimilarity rate.
The dissimilarity rate tends to decrease with the element size, except for 0.2 mm where it is highest. This can be observed in the facies with numerous almost black branches. The dissimilarity rate is minimal for 0.08 mm, with a 24% difference between the two regular and irregular images. Further research could be conducted to reduce the element size to determine if there is convergence in the dissimilarity rate.
5 Conclusion
Although the current results do not allow us to determine whether there is a link between the facies of the structure after topological optimization and its mechanical properties, they do highlight the potential applications that image processing could have on mechanical topological optimization problems.
It would be useful to define a way of finding the compliance using the image processing method, which would allow us to determine if a link exists between the structure's features and its mechanical properties. Since the application of the Representative Elementary Volume (REV) and image reduction did not have a significant influence on the volume fraction, if this result could be repeated for compliance, it would show that for a given mechanical problem, the result of the topology optimization would be independent of the structure's dimensions. Coupling this method with artificial intelligence would allow for a drastic reduction in the calculation times of the algorithm.
To improve the accuracy of the dissimilarity ratio, an image should be directly created from the unstructured mesh to avoid manually cutting the images. Increasing the conformity ratio could also have an impact on the dissimilarity ratio.
Based on the two features of the topology optimization, a manufacturability index could be characterized to determine which of the two structures is the most manufacturable.
6 Perspectives
It would be useful to define a way of calculating or finding compliance using image processing to determine whether there is a link between the mechanical properties of a structure and its facies. Since the application of a REV, and thus the reduction of an image, does not have a significant influence on the volume fraction of the structure, if this result were repeated for compliance, it would show that, for a given mechanical problem, the result of the topological optimization would be independent of the structure's dimensions. Coupling this method with artificial intelligence, which is currently being developed for the topological optimization code, would drastically reduce the calculation times of the algorithm.
To improve the accuracy of the dissimilarity rate, it would be wise to create an image directly from the irregularly meshed structure to eliminate the need to cut out the images manually. Increasing the compliance rate could have a direct impact on the dissimilarity rate.
In view of the facies resulting from the topological optimization of both regularly and irregularly meshed structures, a manufacturability index could be characterized to determine which structure is more manufacturable.
References
 O. Sigmund, A 99 line topology optimization code written in Matlab, Struct. Multidisc. Optim. 21, 120–127 (2001) https://doi.org/10.1007/s001580050176 [CrossRef] [Google Scholar]
 O. Sigmund, J. Petersson, B. Torstenfelt, A. Klabring, Numerical instabilities in topology optimization: a survey on procedures dealing with checkerboards, meshdependencies and local minima, Struct. Optim. 16, 68–75 (1998) [CrossRef] [Google Scholar]
 C.J. Thore, H. Alm Grundström, Penalty regulation of overhang in topology optimization for additive manufacturing, Struct. Multidiscipl. Optim. 60, 59–67 (2019) [CrossRef] [Google Scholar]
 ELIOT, Site official, Accès le 26 mars 2020. https://www.openhub.net/p/eliot [Google Scholar]
 GMSH, Site official, Accès le 20 mars 2020. https://gmsh.info/ [Google Scholar]
 FreeCAD, Site official, Accès le 26 mars 2020. https://www.freecadweb.org/?lang=fr. [Google Scholar]
 Université Technologique de Compiègne, « Les fichesnotions de l'UTC sur la méthode des éléments finis. » [En ligne]. http://www.utc.fr/∼mecagom4/MECAWEB/accueil.html (Accès le 4 Juin 2020) [Google Scholar]
 T.C. Chu, W.F. Ranson, M.A. Sutton, Applications of digitalimagecorrelation to experimental mechanics, Exp. Mech. 25, 232–244 (1985) [CrossRef] [Google Scholar]
 C. Bellis, M. Trabelsi, F. Fremy, Identification de propriétés matérielles par traitement d'images de mesures de champs. In : CFM 201723ème Congrès Français de Mécanique. AFM, Maison de la Mécanique, 39/41 rue Louis Blanc92400 Courbevoie. (2017) [Google Scholar]
 E. Fagerholt, T. Børvik, O.S. Hopperstad, Measuring discontinuous displacement fields in cracked specimens using digital correlation with mesh adaptation and crackpath optimization, 23ème Congrès Français de Mécanique Opt Lasers Eng. 51, 299–310 (2017) [Google Scholar]
 RIVOLLIER, Séverine, DEBAYLE, Johan, et PINOLI, JeanCharles. Analyse morphométrique d'images à tons de gris par diagrammes de forme. In : RFIA 2012 (Reconnaissance des Formes et Intelligence Artificielle) p. 9782953951523. (2012) [Google Scholar]
 I. Sosnovik, I. Oseledets, Neural networks for topology optimization, Russ. J. Numer. Anal. Math. Modell. 34, 215–223 (2019) [CrossRef] [Google Scholar]
 A. Ardeshir, Goshtasby, Similarity and Dissimilarity measures. Image registration: Principles, tools and methods. 7–66. (2012) [Google Scholar]
Cite this article as: Zoubir Atmani, Alexis Iung, JeanPierre Radoux, Nadhir Lebaal, Integration of digital imagery for topology optimization, Int. J. Simul. Multidisci. Des. Optim. 14, 4 (2023)
All Tables
All Figures
Fig. 1 Regular mesh with an internodal distance of 1 mm. 

In the text 
Fig. 2 Irregular mesh with an internodal distance of 1 mm. 

In the text 
Fig. 3 Compliance vs element size for a regular mesh (in blue) and irregular mesh (in red). 

In the text 
Fig. 4 Volume fraction vs number of elements in the REV. 

In the text 
Fig. 5 Volume fraction vs number of columns in the REV. 

In the text 
Fig. 6 Volume fraction vs number of lines in the REV. 

In the text 
Current usage metrics show cumulative count of Article Views (fulltext article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 4896 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.