A phononic crystal topological optimization method, system, device and medium based on an improved genetic algorithm

By improving the genetic algorithm and combining it with the joint simulation of MATLAB and COMSOL, and using a hash table to store the band gap information of phononic crystals, the problem of large computational complexity in phononic crystal topology optimization was solved, and efficient optimization and fine structure design were achieved.

CN119358345BActive Publication Date: 2025-10-17XI AN JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411552407.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-10-17
Estimated Expiration
2044-11-01

AI Technical Summary

Technical Problem

In the existing technology, the phononic crystal topology optimization method based on genetic algorithm and finite element method has the problems of large solution space and low optimization efficiency. Especially in complex design problems, the calculation amount is large, resulting in a long optimization time.

Method used

An improved genetic algorithm is combined with the joint simulation of MATLAB and COMSOL. By establishing a hash table to store the band gap information of phononic crystals, the amount of finite element calculation is reduced. In addition, elite retention, selection, crossover and mutation are performed during the optimization process to improve the optimization efficiency.

Benefits of technology

The phononic crystal topology structure that meets engineering requirements is optimized in a relatively short time, which improves the optimization efficiency, reduces the amount of finite element calculation by about 90%, and improves the resolution of the topology structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119358345B_ABST
    Figure CN119358345B_ABST
Patent Text Reader

Abstract

The application discloses a phononic crystal topology optimization method, system, device and medium based on an improved genetic algorithm, establishes a finite element model of a phononic crystal and a hash table for storing calculated phononic crystal band gap information; population initialization is performed, and the phononic crystal band gaps corresponding to all individuals in the current population are calculated; for the phononic crystal structures that have been calculated, the band gap information thereof is directly called from the hash table, and the band gaps of other phononic crystal structures are calculated through a finite element method; for all generations except the first generation, elite reservation is performed until a termination condition is met. On the basis of a traditional phononic crystal topology optimization method based on a genetic algorithm, the application greatly reduces the calculation amount of the finite element in the algorithm by introducing the method of the hash table, improves the optimization efficiency of the algorithm, and can complete the topology optimization of the phononic crystal in a short time.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of phononic crystal topology optimization, and relates to a phononic crystal topology optimization method, system, device and medium based on an improved genetic algorithm. BACKGROUND

[0002] A phononic crystal is a periodic medium with an elastic wave band gap and has broad application prospects in the field of vibration and noise reduction. The key property of a phononic crystal is the band gap characteristic. Within the band gap range, the propagation of vibration and noise is limited by the phononic crystal, thereby achieving the effect of vibration and noise reduction. The band gap of a phononic crystal is related to its geometric parameters and material properties. In engineering practice, it is often necessary to design a corresponding phononic crystal structure according to the frequency band where vibration or noise is concentrated, which requires the aid of a phononic crystal topology optimization method. The phononic crystal topology optimization method takes an optimization target as input and automatically designs a phononic crystal topology structure that meets the optimization target.

[0003] In the prior art, the phononic crystal topology optimization method based on the genetic algorithm and the finite element method has problems such as a large solution space size and relatively low optimization efficiency. In order to improve the resolution of the phononic crystal topology structure, it is often necessary to discretize the phononic crystal structure to a small enough size, greatly increasing the size of the solution space. At the same time, the finite element method requires a large amount of time to solve the band gap of the phononic crystal, especially when facing complex phononic crystal design problems, the algorithm may need to calculate the band gaps of thousands of phononic crystals to converge to a satisfactory solution, which to some extent limits the application of the genetic algorithm in the field of phononic crystal optimization.

[0004] In view of the problems in the prior art, the present application proposes a phononic crystal topology optimization method and system based on an improved genetic algorithm. The method is realized through joint simulation of MATLAB and COMSOL. In MATLAB, the genetic algorithm is used to optimize the phononic crystal structure. In COMSOL, the finite element method is used to calculate the band gap of the phononic crystal. The use of a hash table greatly reduces the computational load of the finite element method and improves the optimization efficiency. The method can optimize the phononic crystal topology structure that meets the engineering requirements in a short time according to the needs of the optimization target, and has higher optimization efficiency than the traditional phononic crystal topology optimization method based on the genetic algorithm.

[0005] The application is realized by the following technical solutions:

[0006] A phononic crystal topology optimization method based on an improved genetic algorithm, comprising,

[0007] The finite element model of the phononic crystal is established and imported into the genetic algorithm. A hash table for storing the calculated band gap information of the phononic crystal is established, and genetic parameters are obtained.

[0008] initializing the population based on genetic parameters to obtain an initial population;

[0009] calculating the band gap of the phononic crystal corresponding to all individuals in the current population based on the initial population, the finite element model of the phononic crystal and the hash table storing the calculated band gap information of the phononic crystal, and storing the band gap information in the hash table;

[0010] performing elite reservation for all generations in the hash table except the first generation of the initial population, iteratively optimizing, selecting the optimal phononic crystal structure and its band gap characteristics, and realizing the topological optimization of the phononic crystal.

[0011] Preferably, the finite element model of the phononic crystal is imported into the genetic algorithm, and the specific process is as follows:

[0012] drawing the overall structure of the phononic crystal to be optimized in COMSOL, discretizing it into a plurality of grids, writing the material properties of the phononic crystal material into the finite element model, applying Floquet periodicity conditions on opposite sides of the phononic crystal, dividing the grid, and obtaining the finite element model of the phononic crystal;

[0013] connecting COMSOL and MATLAB through COMSOL LiveLink for MATLAB, writing the finite element model of the phononic crystal into the variables of the genetic algorithm, and controlling the simulation process of COMSOL through instructions in MATLAB.

[0014] Preferably, the hash table storing the calculated band gap information of the phononic crystal is established, and the specific process is as follows:

[0015] In MATLAB, a hash table is established through a dictionary or a containers.Map mapping container, wherein the key of the hash table is the character code corresponding to the band gap of the current phononic crystal, and the value of the hash table is the fitness of the phononic crystal.

[0016] Preferably, the genetic parameters include population size, chromosome length, crossover probability, mutation probability and termination condition.

[0017] Preferably, the population initialization has the following specific process:

[0018] A random matrix with 0 or 1 as elements is generated, and the number of rows is equal to the population size, the number of columns is equal to the chromosome length, and the number of elements is equal to the population size.

[0019] Preferably, the calculation of the band gap of the phononic crystal corresponding to all individuals in the current population has the following specific process:

[0020] Inquiring whether there is the band gap data of the phononic crystal corresponding to the current individual in the hash table; if yes, inquiring the hash table directly to obtain the band gap of the phononic crystal corresponding to the current individual; if no, obtaining the band gap of the phononic crystal corresponding to the current individual through finite element calculation based on the finite element model of the phononic crystal, and storing the band gap data of the phononic crystal into the hash table.

[0021] Preferably, for all generations in the hash table except the first generation of the initial population, elite reservation is performed, selection, crossover and mutation are sequentially performed, a new population is formed, the old population is replaced, the current generation number is output, the best individual of the current generation and the corresponding band gap are output, and the topological optimization of the phononic crystal is realized.

[0022] A phononic crystal topological optimization system based on an improved genetic algorithm, comprising:

[0023] A model establishing module is configured to establish a finite element model of a phononic crystal, import the finite element model into a genetic algorithm, store a hash table of calculated band gap information of the phononic crystal, and obtain genetic parameters;

[0024] A population initializing module is configured to initialize a population based on the genetic parameters, and obtain an initial population;

[0025] A calculation simulation module is configured to calculate the band gap of the phononic crystal corresponding to all individuals in a current population based on the initial population, the finite element model of the phononic crystal and the hash table of the calculated band gap information of the phononic crystal, and store the band gap information in the hash table;

[0026] A simulation optimization module is configured to perform elite reservation for all generations in the hash table except the first generation of the initial population, perform iterative optimization, output an optimal phononic crystal structure and its band gap characteristics, and realize the topological optimization of the phononic crystal.

[0027] An electronic device comprises a processor and a memory, and the memory stores at least one instruction, and the processor executes the instruction stored in the memory to realize the phononic crystal topological optimization method based on the improved genetic algorithm.

[0028] A computer readable storage medium stores a computer program, and the computer program is executed by a processor to realize the phononic crystal topological optimization method based on the improved genetic algorithm.

[0029] Compared with the prior art, the present application has the following beneficial technical effects:

[0030] The application provides a phononic crystal topology optimization method and system based on an improved genetic algorithm, which is based on a genetic algorithm and a finite element method, and is realized through joint simulation of MATLAB and COMSOL. In addition, according to the fact that fitness calculation of a phononic crystal topology optimization problem needs to be assisted by a finite element method, and the time-consuming characteristics of finite element calculation, the method simplifies the calculation amount of the finite element method by introducing a hash table method. A finite element model of the phononic crystal is established, and a hash table for storing the calculated phononic crystal band gap information is stored; population initialization is performed, and the corresponding phononic crystal band gap of all individuals in the current population is calculated; for the phononic crystal structure that has been calculated, the band gap information is directly called from the hash table, and the band gap of other phononic crystal structures is calculated through the finite element method; for all generations except the first generation, elite reservation is performed, and selection, crossover and mutation are sequentially performed; finally, whether the current population meets the termination condition is checked, if yes, the iteration is terminated, and if not, the band gap calculation step is returned until the termination condition is met. Compared with the traditional phononic crystal topology optimization method based on the genetic algorithm, the optimization efficiency of the algorithm is improved, and the optimization time is greatly reduced. In three random tests, the calculation amount of the finite element method is reduced by about 90%.

[0031] Further, due to the improvement of the phononic crystal topology optimization efficiency, under the same optimization time, the resolution of the optimized phononic crystal topology structure can be improved, so that the optimized phononic crystal topology structure is more fine. BRIEF DESCRIPTION OF DRAWINGS

[0032] Figure 1 The technical route of the application is shown in the figure;

[0033] Figure 2 The figure is an encoding diagram of a 1 / 8 symmetry structure;

[0034] Figure 3 The figure is an irreducible Brillouin zone of a two-dimensional phononic crystal of a 1 / 8 symmetry structure;

[0035] Figure 4 The figure is a discrete phononic crystal structure diagram;

[0036] Figure 5 The figure is a boundary condition setting in a phononic crystal finite element model;

[0037] Figure 6 The figure is a grid diagram of a discrete phononic crystal structure after grid division;

[0038] Figure 7 The figure is a fitness curve diagram in the iteration process of the improved genetic algorithm;

[0039] Figure 8 The figure is a phononic crystal topology structure diagram corresponding to some generations in the iteration process of the improved genetic algorithm;

[0040] Figure 9 To optimize the band structure diagram of the phononic crystal structure. DETAILED DESCRIPTION

[0041] The application will be described in further detail below with reference to specific embodiments. The description is explanatory of the application and not limiting.

[0042] In order for those skilled in the art to better understand the application, the technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only a part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative efforts should fall within the protection scope of the application.

[0043] Embodiment 1, a phononic crystal topology optimization method and system based on an improved genetic algorithm, the improved genetic algorithm is executed in MATLAB to optimize the phononic crystal structure, the band gap of the phononic crystal is calculated by the finite element method in COMSOL, and the optimization efficiency of the traditional phononic crystal topology optimization method based on the genetic algorithm is improved by introducing a hash table, and the method is characterized in that it comprises the following steps:

[0044] S1, a finite element model of the phononic crystal is established, and the model is imported into the genetic algorithm;

[0045] S2, a hash table storing the calculated band gap information of the phononic crystal is established, and genetic parameters are input;

[0046] S3, population initialization;

[0047] S4, the band gap of the phononic crystal corresponding to all individuals in the current population is calculated, and the band gap information is stored in the hash table;

[0048] S5, for all generations except the first generation, elite reservation is performed. Selection, crossover and mutation are sequentially performed to form a new population and replace the old population. The current generation number, the best individual in the current generation and the corresponding band gap are output;

[0049] S6, check whether the current population meets the termination condition. If yes, terminate the iteration; if not, return to S4 to continue the iteration until the termination condition is met.

[0050] The finite element model of the phononic crystal in S1 is established, and the specific process is as follows:

[0051] The phononic crystal is discretized into a 2N×2N grid, and several candidate materials for the phononic crystal are initially selected according to actual needs, and the material properties are stored in the model. The Floquet periodicity condition is applied to the opposite sides of the phononic crystal, and the grid is divided to obtain the finite element model of the phononic crystal. Through the establishment of a "solid mechanics" physical field interface, the boundary conditions are set, the grid is divided, and the wave vector k The band gap of the phononic crystal is calculated by scanning along the path of the irreducible Brillouin zone of the phononic crystal and performing "characteristic frequency" research on the phononic crystal.

[0052] The model is imported into the genetic algorithm in S1, and the specific process is as follows:

[0053] The connection between COMSOL and MATLAB is established through COMSOL LiveLink for MATLAB, and the finite element model of the phononic crystal established in COMSOL is written into the mphmodel variable of MATLAB, so that MATLAB can control the simulation process in COMSOL. In the optimization process, COMSOL is called to calculate the band gap of the current phononic crystal by the finite element method.

[0054] Preferably, the mphmodel variable has a data structure of a MATLAB object for storing a COMSOL model provided by COMSOL LiveLink for MATLAB.

[0055] The hash table storing the calculated band gap information of the phononic crystal in S2 has a key corresponding to the character code of the calculated phononic crystal and a value being the fitness of the phononic crystal. The fitness is determined according to the optimization target, and typical optimization targets include requiring the optimized phononic crystal to have the maximum band gap in a certain frequency band, or requiring the optimized phononic crystal to have the minimum weight while ensuring a certain band gap.

[0056] The genetic parameters in S2 include population size, chromosome length, crossover probability, mutation probability, and termination condition. The population size, crossover probability, mutation probability, and termination condition are determined according to experience, and the population size is usually 20-100, the crossover probability is usually 0.6-0.9, and the mutation probability is usually 0.01-0.1. The chromosome length is determined according to the number of grids after discretization and the number of candidate materials.

[0057] The population initialization in S3 has the following specific process:

[0058] A random matrix with row number equal to population size, column number equal to chromosome length, and element being 0 or 1 is generated.

[0059] The band gap of the phononic crystal corresponding to all individuals in the current population is calculated in S4, and the specific process is as follows:

[0060] Querying the hash table whether there is the band gap data of the current individual. If yes, querying the hash table directly to obtain the band gap of the phononic crystal corresponding to the current individual; if no, calculating the band gap of the phononic crystal corresponding to the current individual through the finite element method, and storing the band gap data into the hash table.

[0061] The elite reservation in S5, the specific process is:

[0062] The best individual (called elite individual) appeared in the evolution process of the population so far is not crossed and mutated, but directly copied into the next generation.

[0063] The selection in S5 can use roulette selection method, tournament selection method, linear ranking selection or exponential ranking selection method according to the needs of actual optimization problems.

[0064] The crossover in S5 can use single-point crossover, multi-point crossover or uniform crossover according to the needs of actual optimization problems.

[0065] The mutation in S5 can use bit mutation, random reset mutation, inversion mutation or shift mutation according to the needs of actual optimization problems.

[0066] The termination condition in S6 is generally that the iteration is terminated when it exceeds a certain number of iterations, or the fitness is not changed when it exceeds a certain number of iterations, or both of the above termination conditions are used.

[0067] Embodiment 2, a phononic crystal topology optimization system based on an improved genetic algorithm, comprising,

[0068] The improved genetic algorithm module executes the improved genetic algorithm by introducing a hash table in MATLAB, and optimizes the topology structure of the phononic crystal.

[0069] The phononic crystal band structure calculation module calculates the band structure of the phononic crystal through the finite element method in COMSOL, and returns the band gap information to MATLAB.

[0070] An electronic device comprising a processor and a memory, the memory storing at least one instruction, executing the instructions stored in the memory to implement the phononic crystal topology optimization method based on the improved genetic algorithm as described.

[0071] A computer readable storage medium, the computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the phononic crystal topology optimization method based on the improved genetic algorithm as described.

[0072] The phononic crystal topology optimization method based on the improved genetic algorithm can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The method of the present application, if implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium.

[0073] Based on this understanding, in the exemplary embodiments, the phononic crystal topology optimization method based on the improved genetic algorithm, if implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. The present application implements all or part of the processes in the above-mentioned embodiment methods, and can also be completed by instructing related hardware through a computer program. The computer program can be stored in the computer-readable storage medium, and the computer program can implement the steps of each method embodiment when executed by a processor. The computer program includes computer program codes, which can be in the form of source code, object code, executable files, or some intermediate forms, etc. The computer-readable storage medium includes permanent and non-permanent, removable and non-removable media, which can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules, or other data. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals. The computer storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CDs, DVDs, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid state disk (SSD), etc.).

[0074] An embodiment of the present application provides a terminal device. The terminal device of the embodiment includes a processor, a memory, and a computer program stored in the memory and executable on the processor.

[0075] The processor implements the steps of the phononic crystal topology optimization method based on the improved genetic algorithm when executing the computer program; or the processor implements the functions of each module / unit in each of the apparatus embodiment described above when executing the computer program. The terminal device can be a desktop computer, a notebook computer, a palm computer, a cloud server, and other computing devices. The terminal device can include, but is not limited to, a processor, a memory.

[0076] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0077] The memory can be used to store the computer program and / or modules, and the processor realizes various functions of the terminal device by running or executing the computer program and / or modules stored in the memory, and calling data stored in the memory.

[0078] The computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present application.

[0079] It should be noted that the terms in the specification and claims of the present application and the above-described drawings include a series of steps or units of processes, methods, systems, products or devices, which are not necessarily limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0080] Embodiment 3, refer to Figure 1 The overall implementation technical route of the present application.

[0081] The application provides a phononic crystal topology optimization method and system based on an improved genetic algorithm, which is based on a genetic algorithm and a finite element method, and is realized through joint simulation of MATLAB and COMSOL. In addition, according to the fact that fitness calculation of a phononic crystal topology optimization problem needs to be assisted by a finite element method, and the time-consuming characteristics of finite element calculation, the method simplifies the calculation amount of the finite element method by introducing a hash table method. A finite element model of the phononic crystal is established, and a hash table for storing calculated phononic crystal band gap information is established; population initialization is performed, and the band gaps of the phononic crystals corresponding to all individuals in the current population are calculated; for the phononic crystal structures that have been calculated, the band gap information is directly called from the hash table, and for other phononic crystal structures, the band gaps are calculated through the finite element method; for all generations except the first generation, elite reservation is performed, and selection, crossover and mutation are sequentially performed; finally, it is checked whether the current population meets the termination condition, and if yes, the iteration is terminated, and if not, the band gap calculation step is returned until the termination condition is met. Compared with the traditional phononic crystal topology optimization method based on the genetic algorithm, the application improves the optimization efficiency of the algorithm and greatly reduces the optimization time. In three random tests, the calculation amount of the finite element method is reduced by about 90%.

[0082] The application provides a phononic crystal topology optimization method based on an improved genetic algorithm, which is implemented according to the following specific steps:

[0083] S1, a finite element model of the phononic crystal is established, and the model is introduced into the genetic algorithm;

[0084] S2, a hash table for storing calculated phononic crystal band gap information is established, and genetic parameters are input;

[0085] S3, population initialization is performed;

[0086] S4, the band gaps of the phononic crystals corresponding to all individuals in the current population are calculated, and the band gap information is stored in the hash table;

[0087] S5, for all generations except the first generation, elite reservation is performed. Selection, crossover and mutation are sequentially performed to form a new population and replace the old population. The current generation number, the best individual in the current population and the corresponding band gap are output;

[0088] S6, it is checked whether the current population meets the termination condition. If yes, the iteration is terminated; if not, the iteration is continued in S4 until the termination condition is met.

[0089] (1) Establishing a finite element model of the phononic crystal

[0090] Draw the structure of the phononic crystal in COMSOL, and discretize it into a suitable grid structure. Select several candidate materials for the phononic crystal according to experience, and write the material properties into the finite element model. Establish the "solid mechanics" physical field interface, apply the Floquet periodicity condition on the opposite sides of the phononic crystal, and divide the grid. Let the wave vector k Perform "characteristic frequency" research on the phononic crystal by scanning along the boundary of its irreducible Brillouin zone. The band gap of the phononic crystal can be calculated.

[0091] (2) Import the finite element model of the phononic crystal into the genetic algorithm

[0092] Establish the connection between COMSOL and MATLAB through COMSOL LiveLink for MATLAB, write the established finite element model of the phononic crystal into the mphmodel variable of MATLAB, so that MATLAB can control the simulation process in COMSOL, and call COMSOL to calculate the band gap of the current phononic crystal through the finite element method during optimization.

[0093] (3) Establish a hash table to store the band gap information of the calculated phononic crystal

[0094] Establish a hash table in MATLAB through dictionary or containers.Map mapping container, the key of the hash table is the character code corresponding to the calculated phononic crystal, and the value is the fitness of the phononic crystal.

[0095] (4) Input genetic parameters

[0096] Determine the population size, crossover probability, mutation probability and termination condition according to experience, where the population size is usually 20-100, the crossover probability is usually 0.6-0.9, and the mutation probability is usually 0.01-0.1. Determine the chromosome length according to the number of grids and the number of candidate materials after discretization.

[0097] (5) Population initialization

[0098] Generate a random matrix with row size equal to population size, column size equal to chromosome length, and elements equal to 0 or 1. The row vector of the matrix represents the topological structure of the phononic crystal.

[0099] (6) Calculate the band gap of the phononic crystal corresponding to all individuals in the current population

[0100] For each individual in the current population, i.e. each row vector in the matrix, convert it into a string of decimal numbers and compare it with the keys in the hash table. If the key exists in the hash table, query the value corresponding to the key and return it to the algorithm; if the key does not exist, send the row vector into the finite element model in COMSOL, and in MATLAB, parse the row vector into the corresponding phononic crystal topology structure by COMSOL LiveLink for MATLAB, i.e. assign the corresponding material properties to the corresponding grid in the phononic crystal according to the elements in the row vector. MATLAB calls the finite element model in COMSOL which has been built previously, performs the "eigenfrequency" study, obtains the band gap of the phononic crystal topology structure, and transmits the band gap information back to MATLAB.

[0101] (7) Store the band gap information into the hash table

[0102] For the phononic crystal topology structure whose band gap has been calculated by COMSOL through the finite element method, convert its row vector into a string of decimal numbers and store it into the hash table as the key of the hash table; its fitness is also stored into the hash table as the value of the key in the hash table, forming a mapping relationship between the key and the value in the hash table.

[0103] (8) Perform elitist selection for all generations except the first generation

[0104] If the fitness of the best individual in the current generation is less than the fitness of the best individual in the previous generation, replace the worst individual in the current generation with the best individual in the previous generation (referred to as "elite").

[0105] (9) Perform selection, crossover, and mutation in turn to form a new population and replace the old population

[0106] Select appropriate selection, crossover, and mutation methods according to the actual problem. Common selection methods include roulette wheel selection, tournament selection, linear ranking selection, and exponential ranking selection. Common crossover methods include single-point crossover, multi-point crossover, and uniform crossover. Common mutation methods include bit mutation, random reset mutation, reverse bit mutation, and shift mutation. Replace the old population with the new population formed by selection, crossover, and mutation to participate in the next iteration.

[0107] (10) Output the current generation number, the best individual in the current generation, and its corresponding band gap

[0108] This operation is to facilitate monitoring of the process of phononic crystal topology optimization. This data will be used for subsequent plotting of the fitness curve.

[0109] (11) Check whether the current population meets the termination condition

[0110] If yes, terminate the iteration, and output the fitness curve; if no, return to the sixth step of "calculating the band gap of the phononic crystal corresponding to all individuals in the current generation", continue the iteration until the termination condition is met.

[0111] A specific application example is given below. In this application example, a square two-dimensional phononic crystal with a diagonal of 242 mm is considered for topology optimization. The optimization goal is set to maximize the band gap width of the optimized two-dimensional phononic crystal in the frequency range of 550-950 Hz. The candidate materials are epoxy resin, silicone rubber and lead, and their material properties are as follows: the density of epoxy resin is 1.15 g / cm3, the Young's modulus is 3.5 GPa, and the Poisson's ratio is 0.35; the density of silicone rubber is 1.1 g / cm3, the Young's modulus is 0.8 MPa, and the Poisson's ratio is 0.49; and the density of H62 brass is 8.9 g / cm3, the Young's modulus is 125 GPa, and the Poisson's ratio is 0.35.

[0112] To reduce the amount of calculation, the phononic crystal adopts a 1 / 8 symmetric structure, and the phononic crystal 1 / 8 symmetric structure after 8x8 grid discretization is shown in Figure 2 The green area is the area that needs to be encoded by the genetic algorithm, and the materials in the white area are determined by the materials in the green area. The same serial number indicates the use of the same material. Since there are three candidate materials, a binary variable is used to represent the material properties of a unit, and it is defined that

[0113]

[0114] The irreducible Brillouin zone of the 1 / 8 symmetric two-dimensional phononic crystal is shown in Figure 3

[0115] A finite element model of the phononic crystal is established. The structure of the two-dimensional phononic crystal is drawn in COMSOL, and it is discretized into a 20x20 grid, as shown in Figure 4 The edge length of each grid after discretization is 2.852 mm. The material properties of the three candidate materials, epoxy resin, silicone rubber and lead, are written into the finite element model. A "solid mechanics" physical field interface is established, and Floquet periodicity conditions are applied in the x direction and the y direction of the two-dimensional phononic crystal, as shown in Figure 5 The grid is divided, as shown in Figure 6 The wave vector k is scanned along the path of the irreducible Brillouin zone M→Γ→X→M, and the "characteristic frequency" study is performed on the phononic crystal, so that the band gap of the phononic crystal can be calculated. ​​​​​​​​​​

[0116] The finite element model is imported into the genetic algorithm. The connection between COMSOL and MATLAB is established through COMSOL LiveLink for MATLAB, and the established phononic crystal finite element model is written into the mphmodel variable of MATLAB, so that MATLAB can control the simulation process in COMSOL. In the optimization process, COMSOL is called to calculate the band gap of the current phononic crystal by the finite element method.

[0117] A hash table storing the calculated phononic crystal band gap information is established. In MATLAB, a hash table is established through a dictionary or a containers.Map mapping container. The key of the hash table is the character code corresponding to the calculated phononic crystal, and the value is the fitness of the phononic crystal. In this example, the fitness is determined according to the optimization goal as the band gap width of the current phononic crystal in the 0~200Hz frequency band.

[0118] Input genetic parameters. The genetic parameters are set as: population size , crossover probability , mutation probability , and termination condition is that the iteration exceeds 1000 generations, or the fitness does not change for more than 100 generations. The 1 / 8 symmetric structure of the 20×20 grid discrete two-dimensional phononic crystal needs to be determined by 55 grids, and each grid needs 2 binary character bits to determine its material properties, so the chromosome length chromlength =110.

[0119] Population initialization. A random matrix with popsize rows, columns chromlength , and elements of 0 or 1 is generated. The row vector of the matrix represents the topology of the phononic crystal.

[0120] Calculate the band gap of the phononic crystal corresponding to all individuals in the current population. For each individual in the current population, i.e. each row vector in the matrix, convert it to a decimal character and compare it with the key in the hash table. If the hash table has this key, query the value corresponding to the key and return it to the algorithm; if there is no such key, send the row vector to the finite element model of COMSOL, and in MATLAB, parse the row vector into the corresponding phononic crystal topology through COMSOL LiveLink for MATLAB, i.e. according to the elements in the row vector to assign the corresponding material properties to the corresponding grid in the phononic crystal. MATLAB calls the original finite element model in COMSOL to perform "characteristic frequency" research, obtains the band gap of the phononic crystal topology, and transmits the band gap information back to MATLAB.

[0121] The band gap information is stored in the hash table. For the phononic crystal topology structure whose band gap is calculated by COMSOL through the finite element method, the row vector is converted into the character of the decimal number and stored in the hash table as the key of the hash table; the fitness is also stored in the hash table as the value of the key of the hash table, forming a mapping relationship with the key in the hash table.

[0122] For all generations except the first generation, elite preservation is performed. If the fitness of the best individual of the current generation is less than the fitness of the best individual of the last generation, the individual with the lowest fitness of the current generation is replaced by the best individual of the last generation (referred to as "elite").

[0123] Selection, crossover and mutation are sequentially performed to form a new population and replace the old population. The roulette wheel selection method is used in selection, the single-point crossover method is used in crossover, and the bit mutation method is used in mutation. The new population formed after selection, crossover and mutation replaces the old population and participates in the next iteration.

[0124] The current generation number, the best individual of the current generation and the corresponding band gap are output. This operation is to facilitate the monitoring of the process of phononic crystal topology optimization, and the data will be used for the subsequent drawing of the fitness curve graph.

[0125] It is checked whether the current population meets the termination condition. If it meets, the iteration is terminated, and the fitness curve graph is output; if it does not meet, the step of "calculating the band gap of the phononic crystal corresponding to all individuals in the current population" is returned, and the iteration continues until the termination condition is met. The fitness curve graph after iteration is shown in Figure 7 , and the phononic crystal topology structure at several nodes during iteration is shown in Figure 8 . The band structure diagram of the best individual after optimization of 4mm thickness is shown in Figure 9 , which has a forbidden band between the sixth band and the seventh band, with a forbidden band range of 199-729Hz; there is a second forbidden band between the seventh band and the eighth band, with a forbidden band range of 735-935Hz; the total forbidden band bandwidth accounts for about 95% of the optimization target frequency band, which better achieves the design goal.

[0126] In order to reflect the optimization efficiency of the improved genetic algorithm, three random tests are performed, and the test results are shown in Table 1. As shown in Table 1, in the three random tests, compared with the genetic algorithm before improvement, the average reduced finite element band gap calculation amount is more than 90%. It is shown that by combining the hash table with the genetic algorithm, the optimization efficiency is greatly improved, and the optimized phononic crystal sound insulation and noise reduction topology structure can be obtained in a short time.

[0127] Table 1: Results of three random tests

[0128]

[0129] The above merely describes preferred embodiments of the present application, and is not intended to limit the present application in any form; any person skilled in the art can easily implement the present application according to the drawings and the above description; however, any person skilled in the art can make some changes, modifications and equivalent changes within the scope of the technical solutions of the present application, and the equivalent embodiments of the present application are still within the protection scope of the technical solutions of the present application.

Claims

1. A phononic crystal topology optimization method based on an improved genetic algorithm, characterized in that: include, Establish a finite element model of the phononic crystal and import it into the genetic algorithm, establish a hash table to store the calculated phononic crystal band gap information, and obtain the genetic parameters; Initialize the population based on genetic parameters to obtain the initial population; Calculate the band gaps of the phononic crystals corresponding to all individuals in the current population based on the initial population, the finite element model of the phononic crystal, and the hash table storing the calculated band gap information of the phononic crystals, and store the band gap information in the hash table; Iteratively optimize the population in the hash table to select the optimal phononic crystal structure and its band gap characteristics, thereby achieving topological optimization of the phononic crystal; The finite element model of the phononic crystal is introduced into the genetic algorithm, and the specific process is as follows: In COMSOL, the overall structure of the phononic crystal to be optimized is drawn and discretized into several grids. The material properties of the phononic crystal material are written into the finite element model. Floquet periodic conditions are applied to the opposite sides of the phononic crystal, and the grids are divided to obtain the finite element model of the phononic crystal. Establish a connection between COMSOL and MATLAB through COMSOL LiveLink for MATLAB, write the finite element model of the phononic crystal into the variables of the genetic algorithm, and control the COMSOL simulation process through commands in MATLAB; The specific process of establishing a hash table to store the calculated phononic crystal band gap information is as follows: In MATLAB, a hash table is established by mapping the container through dictionary or containers.Map, where the key of the hash table is the character code corresponding to the band gap of the current phononic crystal, and the value of the hash table is the fitness of the phononic crystal.

2. The phononic crystal topology optimization method based on an improved genetic algorithm according to claim 1, characterized in that: The genetic parameters include population size, chromosome length, crossover probability, mutation probability and termination condition.

3. The phononic crystal topology optimization method based on an improved genetic algorithm according to claim 1, characterized in that: The specific process of population initialization is as follows: Genetic parameters are generated into a random matrix with the number of rows equal to the population size, the number of columns equal to the chromosome length, and elements being 0 or 1, wherein the row vectors of the matrix represent the topological structure of the phononic crystal.

4. The phononic crystal topology optimization method based on an improved genetic algorithm according to claim 1, characterized in that: The specific process of calculating the band gap of the phononic crystal corresponding to all individuals in the contemporary population is as follows: For each individual of the contemporary population, convert it into a decimal character and compare it with the key in the hash table; query the hash table to see if there is band gap data of the phononic crystal corresponding to the current individual; if so, query the hash table to directly obtain the band gap of the phononic crystal corresponding to the current individual; If not, the band gap of the phononic crystal corresponding to the current individual is obtained through finite element calculation based on the finite element model of the phononic crystal, and the band gap data of the phononic crystal is stored in the hash table.

5. The phononic crystal topology optimization method based on an improved genetic algorithm according to claim 1, characterized in that: The iterative optimization of the population in the hash table to select the optimal phononic crystal structure and its band gap characteristics is as follows: For all generations except the first generation of the population in the hash table, elite retention is performed, and selection, crossover, and mutation are performed in sequence to form a new population and replace the old population. The current generation progress, the best individual of the current era, and its corresponding band gap are output to achieve topological optimization of the phononic crystal.

6. A phononic crystal topology optimization system based on an improved genetic algorithm, based on the phononic crystal topology optimization method according to any one of claims 1 to 5, characterized in that: include: A model building module is used to build a finite element model of the phononic crystal, import it into the genetic algorithm, store the hash table of the calculated phononic crystal band gap information, and obtain genetic parameters; The population initialization module is used to initialize the population based on genetic parameters and obtain the initial population; A calculation simulation module is used to calculate the band gaps of the phononic crystals corresponding to all individuals in the current population based on the initial population, the finite element model of the phononic crystal and the hash table storing the calculated band gap information of the phononic crystal, and store the band gap information in the hash table; The simulation optimization module performs elite retention and iterative optimization on all generations except the first generation of the initial population in the hash table to obtain the optimal phononic crystal structure and its band gap characteristics, thereby realizing the topological optimization of the phononic crystal.

7. An electronic device, characterized in that: The method comprises a processor and a memory, wherein at least one instruction is stored in the memory, and the instruction stored in the memory is executed to implement the phononic crystal topology optimization method based on the improved genetic algorithm as described in claims 1-5.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the phononic crystal topology optimization method based on an improved genetic algorithm as described in claims 1-5 is implemented.

Citation Information

Patent Citations

  • Liquid-liquid photonic crystal topological optimization method based on genetic algorithm and finite element method

    CN103246767A

  • Optimization method of two-dimension solid-phase phonon crystal mixed mode band gap

    CN103310049A