# WingMesh: A Matlab-Based Application for Finite Element Modeling of Insect Wings

^{1}

^{2}

^{*}

## Abstract

**:**

## Simple Summary

## Abstract

## 1. Introduction

## 2. Materials and Methods

#### 2.1. Burning Algorithm for Detection of the Boundary of a Given Domain

#### 2.2. Detection of Subdomains within a Given Domain

#### 2.3. Detection of Discontinuities in a Given Domain

#### 2.4. Development of a Corrugated Model

#### 2.5. Mesh Generation

- fd, the distance function that defines the boundary of the domain.
- fh, the distance function, which controls the convergence of the size of elements. The size of the elements decreases near fh.
- h0, the distance between nodes in the initial distribution.
- bbox, the bounding box in which the domain is located.
- pfix, defines nodal points, which are set as fixed points while generating elements.

- p, gives the coordinate of the nodal points.
- t, indicates the connection between the nodes.

#### 2.6. Outputs

## 3. Graphical User Interface

## 4. Examples

- Example 1: An in-plane domain

- Example 2: An in-plane domain consisting of two subdomains

- Example 3: An in-plane domain with subdomains and a discontinuity

- Example 4: An irregular-shaped in-plane domain with several discontinuities

- Example 5: A complex-shaped in-plane domain with several subdomains

- Example 6: An asymmetric out-of-plane domain with one height maximum and one height minimum

- Example 7: An out-of-plane domain with two height maxima

- Example 8: An out-of-plane domain with two height maxima and a height minimum

- Example 9: An out-of-plane domain with circumferentially oriented height extrema

- Example 10: A beetle wing

## 5. Advantages of WingMesh

- The application is user-friendly and can remarkably reduce the modeling costs.
- Two-dimensional modeling using WingMesh is possible by the use of only an image of a given domain.
- Modeling three-dimensional (3D) out-of-plane domains is simple and can be done by the use of one additional image that contains information on corrugated spots.
- WingMesh can develop meshed models of domains that consist of several subdomains and discontinuities.
- WingMesh is particularly useful for modeling of a large number of insect wings for comparative investigations.
- Considering the use of computer vision to extract geometric wing features, WingMesh is applicable for insect wings that contain a high degree of geometric complexity.

- Extracting the distance function for complex geometries is a time-consuming and error-prone task, which has been overcome by the use of the computer vision in WingMesh.
- WingMesh generates a *.inp file as the output, which is a frequently used file format.
- WingMesh has an improved ability to mesh structures that contain many discontinuities. This ability was poor in Distmesh2D, especially when dealing with domains with more than one discontinuity.
- In contrast to Distmesh2D, that can mesh domains that have no subdomains, WingMesh is capable of modeling domains with numerous subdomains.
- Compared with Distmesh2D, WingMesh can model out-of-plane domains.

## 6. Applications

## Supplementary Materials

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## References

- Bathe, K.J. Finite element method. In Wiley Encyclopedia of Computer Science and Engineering; John Wiley & Sons, Inc.: Hoboken, NJ, USA, 2007; pp. 1–12. [Google Scholar]
- Logan, D.L. A First Course in the Finite Element Method; Cengage Learning: Boston, MA, USA, 2011. [Google Scholar]
- Adeli, H. (Ed.) Supercomputing in Engineering Analysis; CRC Press: Boca Raton, FL, USA, 1991. [Google Scholar]
- Rao, S.S. The Finite Element Method in Engineering; Butterworth-Heinemann: Oxford, UK, 2017. [Google Scholar]
- Huebner, K.H.; Dewhirst, D.L.; Smith, D.E.; Byrom, T.G. The Finite Element Method for Engineers; John Wiley & Sons, Inc.: Hoboken, NJ, USA, 2001. [Google Scholar]
- Panagiotopoulou, O. Finite element analysis (FEA): Applying an engineering method to functional morphology in anthropology and human biology. Ann. Hum. Boil.
**2009**, 36, 609–623. [Google Scholar] [CrossRef] [PubMed] - Dumont, E.R.; Grosse, I.R.; Slater, G.J. Requirements for comparing the performance of finite element models of biological structures. J. Theor. Boil.
**2009**, 256, 96–103. [Google Scholar] [CrossRef] [PubMed] - Maas, S.A.; Ellis, B.J.; Ateshian, G.A.; Weiss, J.A. FEBio: Finite elements for biomechanics. J. Biomech. Eng.
**2012**, 134, 11005. [Google Scholar] [CrossRef] [PubMed] - Rajabi, H.; Gorb, S.N. How do dragonfly wings work? A brief guide to functional roles of wing structural components. Int. J. Odonatol.
**2020**, 23, 23–30. [Google Scholar] [CrossRef] - MacNeil, J.A.; Boyd, S.K. Bone strength at the distal radius can be estimated from high-resolution peripheral quantitative computed tomography and the finite element method. Bone
**2008**, 42, 1203–1213. [Google Scholar] [CrossRef] [PubMed] - Silva, E.C.N.; Walters, M.C.; Paulino, G.H. Modeling bamboo as a functionally graded material. In AIP Conference Proceedings; American Institute of Physics: College Park, MD, USA, 2008; Volume 973, pp. 754–759. [Google Scholar]
- Rajabi, H.; Jafarpour, M.; Darvizeh, A.; Dirks, J.H.; Gorb, S.N. Stiffness distribution in insect cuticle: A continuous or a discontinuous profile? J. R. Soc. Interface
**2017**, 14, 20170310. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Toofani, A.; Eraghi, S.H.; Khorsandi, M.; Khaheshi, A.; Darvizeh, A.; Gorb, S.; Rajabi, H. Biomechanical strategies underlying the durability of a wing-to-wing coupling mechanism. Acta Biomater.
**2020**, 110, 188–195. [Google Scholar] [CrossRef] [PubMed] - Edelsbrunner, H. Geometry and Topology for Mesh Generation; Cambridge University Press: Cambridge, UK, 2001. [Google Scholar]
- Jin, T.; Goo, N.S.; Park, H.C. Finite element modeling of a beetle wing. J. Bionic Eng.
**2010**, 7, S145–S149. [Google Scholar] [CrossRef] - Voo, L.; Kumaresan, S.; Pintar, F.A.; Yoganandan, N.; Sances, A. Finite-element models of the human head. Med. Boil. Eng.
**1996**, 34, 375–381. [Google Scholar] [CrossRef] [PubMed] - Cakmakci, M.; Sendur, G.K.; Durak, U. Simulation-based engineering. In Guide to Simulation-Based Disciplines; Springer: Cham, Switzerland, 2017; pp. 39–73. [Google Scholar]
- Persson, P.O.; Strang, G. A simple mesh generator in Matlab. SIAM Rev.
**2004**, 46, 329–345. [Google Scholar] [CrossRef] [Green Version] - Abaqus v6.7. Analysis User’s Manual; Simulia: Johnston, RI, USA, 2007.
- Lindquist, W.B.; Lee, S.M.; Coker, D.A.; Jones, K.W.; Spanne, P. Medial axis analysis of void structure in three-dimensional tomographic images of porous media. J. Geophys. Res. Solid Earth
**1996**, 101, 8297–8310. [Google Scholar] [CrossRef] [Green Version] - Chopp, D.L. Some improvements of the fast marching method. SIAM J. Sci. Comput.
**2001**, 23, 230–244. [Google Scholar] [CrossRef] - Eshghi, S.; Rajabi, H.; Darvizeh, A.; Nooraeefar, V.; Shafiei, A.; Mostofi, T.M.; Monsef, M. A simple method for geometric modelling of biological structures using image processing technique. Sci. Iran. Trans. B Mech. Eng.
**2016**, 23, 2194–2202. [Google Scholar] [CrossRef] [Green Version] - Tofilski, A. DrawWing, a program for numerical description of insect wings. J. Insect Sci.
**2004**. [Google Scholar] [CrossRef] - Mengesha, T.E.; Vallance, R.R.; Barraja, M.; Mittal, R. Parametric structural modeling of insect wings. Bioinspir. Biomim.
**2009**, 4, 036004. [Google Scholar] [CrossRef] [PubMed] - KubÍnová, L.; Janáček, J.; Albrechtová, J.; Karen, P. Stereological and digital methods for estimating geometrical characteristics of biological structures using confocal microscopy. In From Cells to Proteins: Imaging Nature across Dimensions; Springer: Dordrecht, The Netherlands, 2005; pp. 271–321. [Google Scholar]
- Kienzler, R.; Altenbach, H.; Ott, I. (Eds.) Theories of Plates and Shells: Critical Review and New Applications; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2013; Volume 16. [Google Scholar]
- Hoff, N. Thin shells in aerospace structures. In Proceedings of the 3rd Annual Meeting, Boston, MA, USA, 29 November–2 December 1966; p. 1022. [Google Scholar]
- Rajabi, H.; Ghoroubi, N.; Stamm, K.; Appel, E.; Gorb, S.N. Dragonfly wing nodus: A one-way hinge contributing to the asymmetric wing deformation. Acta Biomater.
**2017**, 60, 330–338. [Google Scholar] [CrossRef] [PubMed] - Wootton, R.J. Functional morphology of insect wings. Annu. Rev. Entomol.
**1992**, 37, 113–140. [Google Scholar] [CrossRef] - Haas, F.; Wootton, R.J. Two basic mechanisms in insect wing folding. Proc. R. Soc. Lond. Ser. B Biol. Sci.
**1996**, 263, 1651–1658. [Google Scholar] - Haas, F.; Gorb, S.; Wootton, R.J. Elastic joints in dermapteran hind wings: Materials and wing folding. Arthropod Struct. Dev.
**2000**, 29, 137–146. [Google Scholar] [CrossRef] - Saito, K.; Nomura, S.; Yamamoto, S.; Niiyama, R.; Okabe, Y. Investigation of hindwing folding in ladybird beetles by artificial elytron transplantation and microcomputed tomography. Proc. Natl. Acad. Sci. USA
**2017**, 114, 5624–5628. [Google Scholar] [CrossRef] [PubMed] [Green Version]

**Figure 1.**Detection of the border of an arbitrary domain using the Burning Algorithm. (

**a**) A white pixel inside the domain is selected. (

**b**) The BA searches for white and black pixels around the selected pixel in four orthogonal directions. (

**c**) The BA searches for white and black pixels around the detected white pixels in the previous iteration. (

**d**–

**m**) This process continues until there is no white pixel inside the domain (

**m**).

**Figure 2.**Modeling of an out-of-plane domain. (

**a**) An out-of-plane domain. (

**b**) A top view image of the domain. The image is used by the BA to detect the domain. (

**c**) The secondary image contains a black line that represents the maximum height. The regions with zero height are colored in white. (

**d**) A developed model based on the input images. (

**e**–

**i**) Smoothing the height of the meshed model using the iterative algorithm. (

**j**) Changes in the corrugation pattern in different iterations.

**Figure 3.**Modeling of in-plane domains. (

**a**) Image of a simple in-plane domain. (

**b**) The meshed model developed from the image in (

**a**). (

**c**) Image of an in-plane domain consisting of two subdomains. (

**d**) The meshed model developed from the image in (

**c**). (

**e**) Image of an in-plane domain with two subdomains and a discontinuity. (

**f**) The meshed model developed from the image in (

**e**). (

**g**) Image of an irregular-shaped domain with several discontinuities. (

**h**) The meshed model developed from the image in (

**g**). (

**i**) Image of a complex-shaped in-plane domain with several subdomains. (

**j**) The meshed model developed from the image in (

**i**).

**Figure 4.**Modeling of out-of-plane domains. The use of different secondary images in combination with the same input image, as shown in Figure 3a, results in the development of models with different corrugated patterns. (

**a**,

**d**,

**g**,

**j**) Secondary images contain information on corrugation spots. (

**b**,

**e**,

**h**,

**k**) Perspective views of the meshed models created based on the image shown in Figure 3a and secondary images shown in Figure 4a,d,g,j. (

**c**,

**f**,

**i**,

**l**) Side views of meshed models.

**Figure 5.**Modeling of the hind wing of the beetle Allomyrina dichotoma (Coleoptera: Scarabaeidae). (

**a**) Black and white image of the wing. (

**b**) The secondary image for generating corrugations showing the location of the elevated veins. (

**c**) Dorsal view of the generated model. (

**d**) Ventral view of the generated model.

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Eshghi, S.; Nooraeefar, V.; Darvizeh, A.; Gorb, S.N.; Rajabi, H.
*WingMesh*: A Matlab-Based Application for Finite Element Modeling of Insect Wings. *Insects* **2020**, *11*, 546.
https://doi.org/10.3390/insects11080546

**AMA Style**

Eshghi S, Nooraeefar V, Darvizeh A, Gorb SN, Rajabi H.
*WingMesh*: A Matlab-Based Application for Finite Element Modeling of Insect Wings. *Insects*. 2020; 11(8):546.
https://doi.org/10.3390/insects11080546

**Chicago/Turabian Style**

Eshghi, Shahab, Vahid Nooraeefar, Abolfazl Darvizeh, Stanislav N. Gorb, and Hamed Rajabi.
2020. "*WingMesh*: A Matlab-Based Application for Finite Element Modeling of Insect Wings" *Insects* 11, no. 8: 546.
https://doi.org/10.3390/insects11080546