Electromagnetic simulation grid generation method and device, storage medium and program product
By converting a 3D model into a 2D graphic subdivision and performing mesh generation and refinement based on node information on the target plane, the problem of low efficiency in electromagnetic simulation of complex 3D models at multiple scales is solved, achieving more efficient electromagnetic simulation.
Patent Information
- Application Number
- CN202410557153.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-07
- Publication Date
- 2025-11-07
AI Technical Summary
Existing mesh generation methods are poorly suited for complex 3D models at multiple scales (such as multilayer PCB circuit boards), resulting in low efficiency in electromagnetic simulation. Furthermore, the reliance on the a posteriori results of electromagnetic simulation algorithms for mesh refinement leads to wasted computational resources and low simulation efficiency.
The 3D model is divided into a preset number of 2D graphics in a preset direction. The nodes of each 2D graphic are projected onto the target plane to perform meshing. The initial mesh is then refined to generate an electromagnetic simulation mesh.
This reduces the complexity of mesh generation and decreases the reliance on a posteriori results of electromagnetic simulation algorithms, thereby improving the efficiency of electromagnetic simulation.
Smart Images

Figure CN120911053A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of electromagnetic simulation, and particularly relate to a method, device, storage medium and program product for generating an electromagnetic simulation grid. BACKGROUND
[0002] Mesh partitioning generally refers to dividing a region or object into smaller geometric shapes (usually rectangles, triangles or tetrahedrons) for analysis, calculation or visualization. In the process of electromagnetic simulation, the mesh serves as input data for electromagnetic simulation, and the quantity and quality of the mesh will affect the speed and accuracy of electromagnetic simulation. Therefore, mesh partitioning is a very important preparatory work.
[0003] Existing mesh partitioning methods include the wave front method, the Delaunay method and the mapping method. The wave front method starts from the boundary of a region, and inserts nodes into the boundary to perform mesh partitioning. The Delaunay method is a method for generating tetrahedral meshes, and has poor applicability to triangular prism meshes, hexahedral meshes and pyramid meshes. The mapping method maps a complex region to a simple geometric shape, generates a mesh on the simple geometric shape, and then maps the mesh back to the original region.
[0004] For a multi-scale complex three-dimensional model (such as a multi-layer PCB circuit board), there are problems such as complex boundary, inability to determine the boundary position, and difficulty in mapping into a regular polyhedron. The applicability of related mesh partitioning methods is poor, and thus it is usually necessary to rely on the post-processing results of electromagnetic simulation algorithms to locally encrypt the mesh to ensure the simulation accuracy. Frequent comparison and verification cause waste of computing resources and seriously affect the efficiency of simulation. SUMMARY
[0005] Embodiments of the present application provide a method, device, storage medium and program product for generating an electromagnetic simulation grid, to at least solve the problem of low electromagnetic simulation efficiency for a multi-scale complex three-dimensional model.
[0006] In a first aspect, a method for generating an electromagnetic simulation grid is provided, including: dividing a three-dimensional model into a preset number of two-dimensional graphs in a preset direction; projecting nodes of each two-dimensional graph to a first target plane, determining a mesh partitioning region according to projection position information of each node on the first target plane, and performing mesh division on the mesh partitioning region to obtain an initial mesh of each two-dimensional graph; and performing encryption partitioning on the initial mesh of each two-dimensional graph to obtain an electromagnetic simulation mesh of the three-dimensional model.
[0007] In a second aspect, an embodiment of the present application provides a system for generating an electromagnetic simulation grid, comprising: a segmentation module configured to segment a three-dimensional model into two-dimensional graphics in a preset direction and in a preset number of layers; a division module configured to project nodes of each layer of the two-dimensional graphics onto a first target plane, determine a grid division region according to projection position information of each node on the first target plane, and divide the grid division region to obtain an initial grid of each layer of the two-dimensional graphics; and a generation module configured to obtain an electromagnetic simulation grid of the three-dimensional model by encrypting and dividing the initial grid of each layer of the two-dimensional graphics.
[0008] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions executable on the processor, and the programs or instructions are executed by the processor to implement the steps of the method according to the first aspect.
[0009] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores programs or instructions, and the programs or instructions are executed by a processor to implement the steps of the method according to the first aspect.
[0010] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising a computer program stored on a non-transitory computer readable storage medium, wherein the computer program comprises program instructions, and the program instructions are executed by a computer to implement the steps of the method according to the first aspect.
[0011] The technical solutions provided in the embodiments of the present application bring at least the following beneficial effects:
[0012] The three-dimensional model is segmented into two-dimensional graphics in a preset direction and in a preset number of layers, the nodes of each layer of the two-dimensional graphics are projected onto a first target plane, an initial grid of each layer of the two-dimensional graphics is obtained by determining a grid division region according to projection position information of each node on the first target plane and dividing the grid division region, and an electromagnetic simulation grid of the three-dimensional model is obtained by encrypting and dividing the initial grid of each layer of the two-dimensional graphics. In the embodiments of the present application, the complex three-dimensional model is converted into the division of the two-dimensional graphics, the initial grid is divided based on the projection position information of the nodes of each layer of the two-dimensional graphics on the target plane and is encrypted and divided, which can reduce the complexity of the grid division, reduce the dependence on the posteriori results of the electromagnetic simulation algorithm, and thus is conducive to improving the electromagnetic simulation efficiency.
[0013] It should be understood that the general description above and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS
[0014] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0015] Figure 1 A flowchart illustrating a method for generating an electromagnetic simulation mesh according to an embodiment of this application is shown.
[0016] Figure 2 An example diagram of a two-dimensional graphic provided in an embodiment of this application is shown;
[0017] Figure 3 It shows Figure 2 A schematic diagram of the initial grid division of a 2D graphic;
[0018] Figure 4 It shows Figure 2 A schematic diagram of the first encrypted grid division in a two-dimensional graphic;
[0019] Figure 5 It shows Figure 2 A schematic diagram of the second encrypted grid division in a two-dimensional graphic;
[0020] Figure 6 It shows Figure 2 A schematic diagram of the third encrypted grid division in a two-dimensional graphic;
[0021] Figure 7 This paper illustrates another flowchart of the electromagnetic simulation mesh generation method provided in an embodiment of this application.
[0022] Figure 8 A schematic diagram of the structure of the electromagnetic simulation mesh generation system provided in an embodiment of this application is shown;
[0023] Figure 9 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0024] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0025] Electromagnetic simulation plays an important role in the process of PCB circuit design, and effective electromagnetic simulation can improve the design efficiency and effect. In the process of electromagnetic simulation, the grid as the input data of electromagnetic simulation, its quantity and quality will affect the speed and accuracy of electromagnetic simulation. Therefore, the grid partitioning is a very important preparatory work. However, for multi-scale complex three-dimensional models (such as multi-layer PCB circuit board, etc.), there are problems such as complex boundary, unable to determine the boundary position, difficult to map into regular polyhedron, etc., and the applicability of related grid partitioning methods is poor, so it usually depends on the posteriori results of electromagnetic simulation algorithm to locally encrypt the grid to ensure the simulation accuracy, that is, through the iteration of electromagnetic simulation algorithm, the results of one-time electromagnetic simulation calculation and the results of the last time are compared, and it is determined whether to encrypt the grid through comparison, and the frequent comparison verification causes the waste of computing resources, and seriously affects the efficiency of electromagnetic simulation.
[0026] In view of the problems existing in the above electromagnetic simulation process, the embodiment of the application provides a method for generating electromagnetic simulation grid, which converts a complex three-dimensional model into a two-dimensional graph, and divides the initial grid and performs encryption partitioning based on the projection position information of the nodes of each layer of the two-dimensional graph on the target plane, so as to reduce the complexity of grid partitioning and improve the efficiency of electromagnetic simulation.
[0027] Please refer to Figure 1 , Figure 1 The flowchart of the method for generating electromagnetic simulation grid provided by the embodiment of the application is shown. The execution subject of the method can be a terminal device or a server, wherein the terminal device can be a device such as a personal computer, or a mobile terminal device such as a mobile phone and a tablet computer, and the terminal device can be a terminal device used by a user. The server can be a server or a server cluster composed of multiple servers, and the server can be a background server of a certain service or a background server of a certain platform or application program (for example, an electromagnetic simulation software or system, a grid generator, etc.). In the embodiment of the application, the execution subject is taken as an example for description, and for the case of the terminal device, the related content can be processed according to the following description, which will not be described here. As shown in the figure, the method for generating electromagnetic simulation grid 100 can include the following steps:
[0028] S101: Divide the three-dimensional model into two-dimensional graphs of a preset number of layers in a preset direction.
[0029] Among them, the three-dimensional model can be a PCB circuit board, can be an integrated circuit, a capacitor, a transistor and other electronic components on the PCB circuit board, a wire, a circuit, a wiring structure on the PCB circuit board, and can be an antenna, a filter, a coupler and other electromagnetic components.
[0030] In specific implementation, target model three-dimensional data input by a user can be acquired, which can include information such as geometry of the target model and boundary conditions; a three-dimensional model is generated according to the target model three-dimensional data, and the generated three-dimensional model is segmented into two-dimensional graphics of a preset number of layers in a preset direction. Specifically, an xy plane with different z coordinates can be used to intersect the three-dimensional model to obtain two-dimensional graphics intersecting the three-dimensional model at the z coordinate position, so as to acquire two-dimensional graphics of the preset number of layers.
[0031] In this way, by cutting the three-dimensional model into two-dimensional graphics according to the specified number of layers, the model structure of the three-dimensional model can be simplified, and convenient data forms are provided for subsequent mesh partitioning.
[0032] S102: Projecting nodes of each layer of two-dimensional graphics onto a first target plane, determining a mesh partitioning region according to projection position information of each node on the first target plane, and performing mesh division on the mesh partitioning region to obtain initial meshes of each layer of two-dimensional graphics.
[0033] In specific implementation, the xy plane or a plane with a specific angle can be used as the first target plane. For each layer of two-dimensional graphics, the projection position of the node of the layer of two-dimensional graphics on the first target plane is calculated, so as to obtain the projection position information of each node on the first target plane; the mesh partitioning region is determined according to the projection position information of each node on the first target plane, which can include the projection position information of all nodes, and then the determined mesh partitioning region is divided into meshes to obtain the initial meshes of each layer of two-dimensional graphics.
[0034] In this way, by projecting the nodes of each layer of two-dimensional graphics onto the first target plane, the information of the three-dimensional model can be mapped onto a plane to facilitate subsequent mesh division; according to the projection position information of each node on the target plane, the region of mesh partitioning is determined to ensure that the mesh division covers the entire three-dimensional model, and mesh division with different densities can be performed on different regions according to needs to obtain the initial meshes of each layer of two-dimensional graphics.
[0035] S103: Obtaining electromagnetic simulation meshes of the three-dimensional model by performing encryption partitioning on the initial meshes of each layer of two-dimensional graphics.
[0036] In specific implementation, the initial meshes of each layer of two-dimensional graphics can be further subdivided into smaller mesh units according to the needs of electromagnetic simulation to obtain more fine electromagnetic simulation meshes, thereby facilitating improvement of simulation accuracy and reliability.
[0037] By the above steps, the complex three-dimensional model is converted into a section of a two-dimensional graph, the initial grid is divided and the section is encrypted based on the projection position information of the nodes of each layer of the two-dimensional graph on the target plane, which can reduce the complexity of the grid section, reduce the dependence on the post-processing results of the electromagnetic simulation algorithm, and thus improve the electromagnetic simulation efficiency.
[0038] In a possible implementation, the step S101 of dividing the three-dimensional model into two-dimensional graphs of a preset number of layers in a preset direction includes:
[0039] determining a division plane of the three-dimensional model according to the preset direction, dividing the three-dimensional model into initial two-dimensional graphs of a preset number of layers according to the division plane, and performing merging processing on each layer of the initial two-dimensional graphs to obtain the two-dimensional graphs.
[0040] In the embodiments of the present application, first, a division plane for dividing the three-dimensional model is determined according to a preset direction. The division plane can be a plane perpendicular to a coordinate axis or a plane in an arbitrary direction, for example, the preset direction is z-direction, and the division plane can be set as an xy plane with different z coordinates. Then, the three-dimensional model is divided using the division plane to obtain initial two-dimensional graphs of a preset number of layers. Each initial two-dimensional graph is a cross section or a profile of the three-dimensional model at a specific z coordinate position. The initial two-dimensional graphs of each layer are merged to obtain the two-dimensional graphs. Specifically, two nodes with a node distance less than a preset distance threshold can be aligned or merged in each node of each layer of the initial two-dimensional graphs, and each layer of the two-dimensional graphs is discretized into n (n≥0) straight line segments and m (m≥0) curve segments. Here, a minimum grid size threshold N can be set, and two nodes with a node distance d < N / 10 are aligned or merged.
[0041] In this way, the closed graph is converted into independent straight line segments or curve segments, which can reduce the complexity of the grid section and make the grid section more efficient. At the same time, the obtained independent straight line segments or curve segments are mapped to the coordinate axis direction of the first target plane, which can avoid manually specifying the mapping plane and the mapping direction, and improve the automation degree of processing.
[0042] In a possible implementation, the step S102 of determining a grid section area according to the projection position information of each node on the first target plane and performing grid division on the grid section area to obtain the initial grid of each layer of the two-dimensional graph includes:
[0043] obtaining coordinate extreme values in coordinate values corresponding to the projection position information of each node on the first target plane, and determining a mesh division region according to the coordinate extreme values; the coordinate extreme values include maximum coordinate values and minimum coordinate values in the coordinate values corresponding to the projection position information of each node; and performing mesh division on each two-dimensional graph according to the mesh division region, to obtain initial meshes of the two-dimensional graphs.
[0044] In the embodiments of the present application, for each node on the first target plane, coordinate values corresponding to the projection position information of the node on the plane are obtained, maximum coordinate values and minimum coordinate values in the coordinate values corresponding to the projection position information of each node, i.e. coordinate extreme values, are calculated. A mesh division region of the three-dimensional model is determined according to the coordinate extreme values. The mesh division region can be a rectangular frame, or a circular frame, a polygonal frame, etc., to ensure that the mesh division region covers the entire three-dimensional model. Then, mesh division is performed on each two-dimensional graph according to the mesh division region, to obtain initial meshes of the two-dimensional graphs. Specifically, the region can be divided into meshes according to the coordinate axis direction, to ensure that the size of each mesh is appropriate and covers all the two-dimensional graphs.
[0045] The mesh division region is divided into a plurality of meshes using the first scanning line passing through at least one node; each mesh is divided according to a preset mesh division size, to obtain a plurality of mesh lines; and the plurality of mesh lines are projected onto each two-dimensional graph, to obtain initial meshes of the two-dimensional graphs.
[0046] The mesh division region is divided into a plurality of meshes using the first scanning line passing through at least one node; each mesh is divided according to a preset mesh division size, to obtain a plurality of mesh lines; and the plurality of mesh lines are projected onto each two-dimensional graph, to obtain initial meshes of the two-dimensional graphs.
[0047] The first scanning line can include a horizontal line and a vertical line.
[0048] In an exemplary embodiment, as shown in Figure 2 The two-dimensional graphs of the specified layer are a rectangle 21 and a triangle 22, and the mesh division region is a. The mesh division region a is divided into a plurality of meshes using the first scanning line l passing through the node, a preset mesh division size M is obtained, each mesh is divided according to the mesh division size M to obtain a plurality of mesh lines; and the plurality of mesh lines are projected onto each two-dimensional graph, to obtain initial meshes of the two-dimensional graphs, as shown in Figure 3 .
[0049] In a possible implementation, in S103, the initial meshes of the two-dimensional graphs are encrypted and divided, to obtain the electromagnetic simulation meshes of the three-dimensional model, including:
[0050] The initial mesh of each layer of two-dimensional graphics is encrypted and divided to obtain encrypted meshes corresponding to each layer of two-dimensional graphics; and the electromagnetic simulation mesh of the three-dimensional model is generated according to the encrypted meshes corresponding to each layer of two-dimensional graphics.
[0051] In the embodiments of the present application, adaptive encryption and division are performed based on the initial mesh of each layer of two-dimensional graphics to obtain encrypted meshes corresponding to each layer of two-dimensional graphics, and the encrypted mesh corresponding to each layer of two-dimensional graphics is mapped to other layers to obtain the electromagnetic simulation mesh of the three-dimensional model. In this way, the adaptive encryption of the initial mesh can reduce the dependence on the posteriori results of the electromagnetic simulation algorithm and improve the electromagnetic simulation efficiency.
[0052] In a possible implementation, the encrypted mesh includes a first encrypted mesh; and the encryption and division of the initial mesh of each layer of two-dimensional graphics to obtain the encrypted mesh corresponding to each layer of two-dimensional graphics includes:
[0053] For each layer of two-dimensional graphics, a target mesh region in which an intersection point of the initial mesh and a boundary of the layer of two-dimensional graphics is located is determined; the target mesh region corresponding to the layer of two-dimensional graphics is encrypted and divided with the coordinate line of the initial mesh as a second scanning line until a preset encryption stop condition is met to obtain a first encrypted mesh line corresponding to the layer of two-dimensional graphics; the first encrypted mesh line corresponding to the layer of two-dimensional graphics is projected into a two-dimensional graphic of a target layer, which is a two-dimensional graphic of another layer other than the layer of two-dimensional graphics; and the first encrypted mesh corresponding to each layer of two-dimensional graphics is determined.
[0054] In a specific implementation, the global mesh can be adaptively encrypted until the encryption stop condition is met. Based on the parallel technology, each layer is encrypted and divided respectively, and then the encrypted mesh lines are projected to other layers. Specifically, the coordinate line of the initial mesh can be taken as a second scanning line, each layer of graphic elements (i.e., the mesh region in which the intersection point of the initial mesh and the boundary of the two-dimensional graphic is located) is traversed, and encryption and division are performed at the mesh intersecting with the graphic elements to obtain the first encrypted mesh line l1 corresponding to the layer of two-dimensional graphics, as shown in FIG. 3. Figure 4 d wherein the graphic elements do not include microelements and elements coinciding with the mesh line, and the microelement is a graphic element with a feature size f d <N / 10. In this way, the adaptive encryption of the global mesh can greatly improve the simulation calculation accuracy, and the parallel division can greatly improve the mesh division efficiency.
[0055] In another possible implementation, the encrypted mesh includes a second encrypted mesh; and the encryption and division of the initial mesh of each layer of two-dimensional graphics to obtain the encrypted mesh corresponding to each layer of two-dimensional graphics includes:
[0056] obtaining target graphic elements of each layer of two-dimensional graphics coinciding with the grid lines of the initial grid; projecting the target graphic elements corresponding to each layer of two-dimensional graphics onto a second target plane, and performing encryption subdivision on target initial grids in the initial grid that are in close proximity to the target graphic elements until a second encryption grid line is obtained that satisfies the encryption stop condition;
[0057] In a specific implementation, the grid at the mutation can be adaptively encrypted until the encryption stop condition is satisfied. The adaptive encryption method of the grid at the mutation includes: projecting each layer of target graphic elements coinciding with the grid lines onto the same xy plane, then traversing the target graphic elements A, and locating the grid near the graphic element A for encryption, that is, performing encryption subdivision on the target initial grids in the initial grid that are in close proximity to the target graphic elements to obtain a second encryption grid line l2, and finally projecting the encrypted grid line onto each layer, as shown in Figure 5 Thus, by adaptively encrypting the grid at the mutation, the simulation calculation accuracy can be significantly improved.
[0058] It should be noted that the mutation here refers to the shape mutation of the graphic with respect to the xy plane, and refers to the medium interface with respect to the z direction of each layer.
[0059] In another possible implementation, the encryption grid includes a third encryption grid; and the encryption subdivision on the initial grid of each layer of two-dimensional graphics to obtain the encryption grid corresponding to each layer of two-dimensional graphics includes:
[0060] The initial grid is encrypted and subdivided using an adaptive interpolation method, so that the ratio between the sizes of any adjacent grids in the initial grid is within a preset threshold range until the encryption stop condition is satisfied to obtain the third encryption grid corresponding to each layer of two-dimensional graphics.
[0061] In a specific implementation, the local grid can be adaptively encrypted until the encryption stop condition is satisfied to ensure the uniformity of the size gradient of each coordinate axis direction of the grid. Specifically, the grid lines in the x, y, and z directions of the coordinate axis can be traversed respectively, and the adaptive interpolation method is used to make the size ratio r of adjacent grids within a preset threshold range, for example, 1 < r < 10, as shown in Figure 6 Finally, the third grid line l3 encrypted in the x and y directions is projected onto each layer to obtain the third encryption grid corresponding to each layer of two-dimensional graphics.
[0062] The encryption stop condition includes at least one of the following:
[0063] The number of encryption subdivisions reaches a preset number threshold r n ;
[0064] The size of the encryption grid reaches a preset grid size threshold N, and the encryption grid includes a first encryption grid, a second encryption grid, and a third encryption grid.
[0065] In a possible implementation, the generating of the electromagnetic simulation grid of the three-dimensional model according to the encryption grids corresponding to the two-dimensional graphs of the layers includes:
[0066] According to the two-dimensional graphs of any two adjacent layers in the layers and the discrete line segments of the preset direction, a segmented column is generated; the segmented column is adaptively encrypted to obtain an encryption grid corresponding to the segmented column; and the electromagnetic simulation grid of the three-dimensional model is generated according to the encryption grids corresponding to the two-dimensional graphs of the layers and the encryption grid corresponding to the segmented column.
[0067] In a specific implementation, a segmented column can be generated between layers according to a corresponding two-dimensional graph and a z-direction discrete line segment, and the segmented column is adaptively encrypted to ensure that the number of z-direction grids nz between layers is greater than or equal to 3, so as to finally obtain a non-uniform three-dimensional grid, which is used as the electromagnetic simulation grid of the three-dimensional model. In addition, the two-dimensional grid is divided into a non-uniform quadrilateral grid, which can be divided into a triangular grid; the three-dimensional grid is a hexahedral grid or a triangular prism grid, which can be further divided into a pyramid grid or a tetrahedral grid. The method has strong adaptability to multi-scale complex three-dimensional models.
[0068] Figure 7 Another flowchart of the method for generating an electromagnetic simulation grid is shown, and the method includes the following steps:
[0069] Step 701: Preprocessing target model three-dimensional data to obtain k layers of planar graphs, and discretizing each layer of planar graph into n (n≥0) straight line segments and m (m≥0) curved line segments of graph elements;
[0070] Step 702: Projecting nodes of each layer of planar graph to the same xy plane and discretizing according to a grid division size M; taking z-direction coordinate values as nodes and discretizing according to the grid division size M to obtain an initial grid;
[0071] Step 703: Adaptively encrypting a global grid based on a multi-layer parallel technology until a stop condition of encryption is met;
[0072] Step 704: Adaptively encrypting a grid at a mutation until a stop condition of encryption is met;
[0073] Step 705: Interpolatively encrypting a local grid until a stop condition of encryption is met;
[0074] Step 706: generating segmented columns between layers with corresponding two-dimensional graphs and z-direction discrete line segments, and finally obtaining a non-uniform grid.
[0075] The embodiment of the present application provides a method for generating an electromagnetic simulation grid, the method comprising: dividing a three-dimensional model into two-dimensional graphs of a preset number of layers in a preset direction; projecting nodes of each layer of the two-dimensional graphs onto a first target plane, determining a grid division region according to projection position information of each node on the first target plane, and performing grid division on the grid division region to obtain initial grids of each layer of the two-dimensional graphs; and performing encryption division on the initial grids of each layer of the two-dimensional graphs to obtain an electromagnetic simulation grid of the three-dimensional model. In this way, by converting a complex three-dimensional model into division of two-dimensional graphs, initial grids are divided based on projection position information of nodes of each layer of the two-dimensional graphs on a target plane and encryption division is performed, which can reduce the complexity of grid division and reduce dependence on a posteriori result of an electromagnetic simulation algorithm, thereby facilitating improvement of electromagnetic simulation efficiency.
[0076] Figure 8 A structure diagram of a system for generating an electromagnetic simulation grid is shown, the system can implement all or part of the embodiments as shown in Figure 1 The system for generating an electromagnetic simulation grid 800 comprises:
[0077] A division module 810 is configured to divide a three-dimensional model into two-dimensional graphs of a preset number of layers in a preset direction.
[0078] A division module 820 is configured to project nodes of each layer of the two-dimensional graphs onto a first target plane, determine a grid division region according to projection position information of each node on the first target plane, and perform grid division on the grid division region to obtain initial grids of each layer of the two-dimensional graphs.
[0079] A generation module 830 is configured to perform encryption division on the initial grids of each layer of the two-dimensional graphs to obtain an electromagnetic simulation grid of the three-dimensional model.
[0080] In a possible implementation, the division module 810 comprises:
[0081] A plane determination unit is configured to determine a division plane of the three-dimensional model according to the preset direction.
[0082] A graph division unit is configured to divide the three-dimensional model into initial two-dimensional graphs of a preset number of layers according to the division plane.
[0083] A merging processing unit is configured to perform merging processing on each layer of the initial two-dimensional graphs to obtain the two-dimensional graphs.
[0084] In a possible implementation, the division module 820 comprises:
[0085] a region determining unit configured to obtain coordinate extreme values in coordinate values corresponding to the projection position information of each node on the first target plane, and determine a mesh division region according to the coordinate extreme values; wherein the coordinate extreme values include maximum coordinate values and minimum coordinate values in the coordinate values corresponding to the projection position information of each node;
[0086] a mesh dividing unit configured to divide each layer two-dimensional graph according to the mesh division region to obtain an initial mesh of each layer two-dimensional graph.
[0087] The mesh dividing unit, when dividing each layer two-dimensional graph according to the mesh division region to obtain an initial mesh of each layer two-dimensional graph, is specifically configured to:
[0088] divide the mesh division region into a plurality of meshes using a first scan line passing through at least one node;
[0089] divide each mesh according to a preset mesh division size to obtain a plurality of mesh lines;
[0090] project the plurality of mesh lines onto each layer two-dimensional graph to obtain an initial mesh of each layer two-dimensional graph.
[0091] In a possible implementation, the generating module 830 includes:
[0092] an encryption dividing unit configured to perform encryption division on the initial mesh of each layer two-dimensional graph to obtain an encryption mesh corresponding to each layer two-dimensional graph;
[0093] a mesh generating unit configured to generate an electromagnetic simulation mesh of the three-dimensional model according to the encryption mesh corresponding to each layer two-dimensional graph.
[0094] In a possible implementation, the encryption mesh includes a first encryption mesh; and the encryption dividing unit, when performing encryption division on the initial mesh of each layer two-dimensional graph to obtain an encryption mesh corresponding to each layer two-dimensional graph, is specifically configured to:
[0095] for each layer two-dimensional graph, determine a target mesh region in which an intersection point of the initial mesh and a boundary of the layer two-dimensional graph is located;
[0096] perform encryption division on the target mesh region corresponding to the layer two-dimensional graph with the coordinate line of the initial mesh as a second scan line until a preset encryption stop condition is met to obtain a first encryption mesh line corresponding to the layer two-dimensional graph;
[0097] projecting the first encrypted grid lines corresponding to the two-dimensional graph of the layer into the two-dimensional graph of a target layer, the two-dimensional graph of the target layer being a two-dimensional graph of another layer other than the two-dimensional graph of the layer;
[0098] determining the first encrypted grid corresponding to the two-dimensional graph of each layer.
[0099] In another possible implementation, the encrypted grid includes a second encrypted grid; and the encryption and division unit, when used for encrypting and dividing the initial grid of each two-dimensional graph of the layer to obtain the encrypted grid corresponding to each two-dimensional graph of the layer, is specifically used for:
[0100] obtaining a target graph element of each two-dimensional graph of the layer that coincides with a grid line of the initial grid;
[0101] projecting the target graph element corresponding to each two-dimensional graph of the layer onto a second target plane, encrypting and dividing a target initial grid in the initial grid that is immediately adjacent to the target graph element until a second encrypted grid line is obtained by satisfying the encryption stop condition;
[0102] projecting the second encrypted grid line onto each two-dimensional graph of the layer to obtain a second encrypted grid corresponding to each two-dimensional graph of the layer.
[0103] In yet another possible implementation, the encrypted grid includes a third encrypted grid; and the encryption and division unit, when used for encrypting and dividing the initial grid of each two-dimensional graph of the layer to obtain the encrypted grid corresponding to each two-dimensional graph of the layer, is specifically used for:
[0104] encrypting and dividing the initial grid by using an adaptive interpolation method, so that a ratio between sizes corresponding to any adjacent grids in the initial grid is within a preset threshold range, until a third encrypted grid corresponding to each two-dimensional graph of the layer is obtained by satisfying the encryption stop condition.
[0105] The encryption stop condition includes at least one of the following:
[0106] a number of times of encryption and division reaches a preset number threshold;
[0107] a size of the encrypted grid reaches a preset grid size threshold, the encrypted grid including the first encrypted grid, the second encrypted grid, and the third encrypted grid.
[0108] In a possible implementation, the grid generation unit, when used for generating the electromagnetic simulation grid of the three-dimensional model according to the encrypted grid corresponding to each two-dimensional graph of the layer, is specifically used for:
[0109] generating a segmented column according to the two-dimensional graph of any two adjacent layers in the two-dimensional graph of each layer and the discrete line segment of the preset direction;
[0110] The segmented column is encrypted and divided to obtain an encrypted grid corresponding to the segmented column;
[0111] According to the encrypted grid corresponding to each layer two-dimensional graph and the encrypted grid corresponding to the segmented column, an electromagnetic simulation grid of the three-dimensional model is generated.
[0112] The embodiment of the present application provides a system for generating an electromagnetic simulation grid, which comprises a segmentation module, a division module and a generation module. The segmentation module divides a three-dimensional model into two-dimensional graphs of a preset number of layers in a preset direction. The division module projects nodes of each layer two-dimensional graph onto a first target plane, determines a grid division area according to projection position information of each node on the first target plane, and performs grid division on the grid division area to obtain an initial grid of each layer two-dimensional graph. The generation module performs encrypted division on the initial grid of each layer two-dimensional graph to obtain an electromagnetic simulation grid of the three-dimensional model. In the embodiment of the present application, the complex three-dimensional model is converted into a two-dimensional graph, the initial grid is divided based on the projection position information of the nodes of each layer two-dimensional graph on the target plane, and encrypted division is performed, which can reduce the complexity of grid division, reduce the dependence on the posterior results of the electromagnetic simulation algorithm, and thus is beneficial to improving the electromagnetic simulation efficiency.
[0113] Figure 9 A hardware structure schematic diagram of an electronic device is shown, and with reference to the diagram, at the hardware level, the electronic device 900 comprises a processor 910, and optionally comprises an internal bus 920, a network interface 930 and a memory 940. The memory 940 can include a memory 941, for example, a high-speed random access memory (RAM), and can also include a non-volatile memory 942, for example, at least one disk memory. Of course, the electronic device 900 can also include other hardware required by the business.
[0114] The processor 910, the network interface 930 and the memory can be connected to each other through the internal bus 920, which can be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one bidirectional arrow is used in the diagram, but it does not mean that there is only one bus or one type of bus.
[0115] Memory 940 stores programs. Specifically, the program may include program code, which includes computer operation instructions. Memory 940 may include main memory 941 and non-volatile memory 942, and provides instructions and data to processor 910.
[0116] The processor 910 reads the corresponding computer program from the non-volatile memory 942 into memory and then runs it, forming a device for locating the target user at the logical level. The processor 910 executes the program stored in memory and specifically performs the following: Figure 1 or Figure 7 The methods disclosed in the embodiments shown achieve the functions and beneficial effects of the methods described in the preceding method embodiments, and will not be repeated here.
[0117] The above is as stated in this application. Figure 1 or Figure 7 The methods disclosed in the illustrated embodiments can be applied to or implemented by processor 910. Processor 910 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above methods can be completed by integrated logic circuits in the hardware or by instructions in software form within processor 910. The processor 910 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0118] The computer device can also execute the methods described in the foregoing method embodiments and achieve the functions and advantages of the methods described in the foregoing method embodiments, which will not be repeated here.
[0119] Of course, in addition to the software implementation, the electronic device 900 of the present application does not exclude other implementation manners, such as a logic device or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or a logic device.
[0120] The embodiments of the present application also propose a computer readable storage medium, the computer readable medium stores one or more programs, when the one or more programs are executed by an electronic device comprising a plurality of application programs, the electronic device executes Figure 1 or Figure 7 The methods disclosed in the embodiments and achieve the functions and advantages of the methods described in the foregoing method embodiments, which will not be repeated here.
[0121] The computer readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0122] Further, the embodiments of the present application also provide a computer program product, the computer program product includes a computer program stored on a non-transitory computer readable storage medium, the computer program includes program instructions, when the program instructions are executed by a computer, the following flow is realized: Figure 1 or Figure 7 The methods disclosed in the embodiments and achieve the functions and advantages of the methods described in the foregoing method embodiments, which will not be repeated here.
[0123] The embodiments of the present application can be applied to various electronic device cooperation or interconnection scenarios, including: mobile phone and notebook computer / tablet computer cooperation and interconnection; mobile terminal and smart television / display cooperation and interconnection; mobile phone, or tablet computer and vehicle entertainment system cooperation and interconnection; mobile terminal and smart conference system cooperation and interconnection, etc. Thus, the user's needs in smart home, smart office, smart travel and other diversified scenarios are met.
[0124] In summary, the above only describes the preferred embodiments of the present application, and does not limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
[0125] The systems, apparatuses, modules, or units in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0126] Computer readable media 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. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can store information accessible by a computing device. According to the definition herein, computer readable media does not include transitory media such as modulated data signals and carriers.
[0127] It should also be noted that the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, so that processes, methods, articles or devices including a series of elements not only include those elements, but also include other elements not explicitly listed or inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or device including the element.
[0128] The embodiments in the specification are described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, the system embodiments are described simply because they are basically similar to the method embodiments, and the relevant parts can be referred to the description of the method embodiments.
Claims
1. A method of generating an electromagnetic simulation mesh, characterized by, The method comprises the steps of: dividing a three-dimensional model into two-dimensional graphs of a preset number of layers in a preset direction; projecting nodes of each layer of two-dimensional graphs onto a first target plane, determining a mesh division area according to the projection position information of each node on the first target plane, and performing mesh division on the mesh division area to obtain initial meshes of each layer of two-dimensional graphs; performing encryption division on the initial meshes of each layer of two-dimensional graphs to obtain electromagnetic simulation meshes of the three-dimensional model.
2. The method of claim 1, wherein, The step of dividing the three-dimensional model into two-dimensional graphs of a preset number of layers in a preset direction comprises the steps of: determining a division plane of the three-dimensional model according to the preset direction; dividing the three-dimensional model into initial two-dimensional graphs of a preset number of layers according to the division plane; performing merging processing on each layer of initial two-dimensional graphs to obtain the two-dimensional graphs.
3. The method of claim 1, wherein, The step of determining a mesh division area according to the projection position information of each node on the first target plane and performing mesh division on the mesh division area to obtain initial meshes of each layer of two-dimensional graphs comprises the steps of: obtaining coordinate extreme values in coordinate values corresponding to the projection position information of each node on the first target plane, and determining a mesh division area according to the coordinate extreme values; wherein the coordinate extreme values comprise a maximum coordinate value and a minimum coordinate value in the coordinate values corresponding to the projection position information of each node; performing mesh division on each layer of two-dimensional graphs according to the mesh division area to obtain initial meshes of each layer of two-dimensional graphs.
4. The method of claim 3, wherein, The step of performing mesh division on each layer of two-dimensional graphs according to the mesh division area to obtain initial meshes of each layer of two-dimensional graphs comprises the steps of: dividing the mesh division area into a plurality of meshes using a first scan line passing through at least one node; dividing each mesh according to a preset mesh division size to obtain a plurality of mesh lines; projecting the plurality of mesh lines onto each layer of two-dimensional graphs to obtain initial meshes of each layer of two-dimensional graphs.
5. The method of claim 1, wherein, The step of performing encryption division on the initial meshes of each layer of two-dimensional graphs to obtain electromagnetic simulation meshes of the three-dimensional model comprises the steps of: performing encryption division on the initial meshes of each layer of two-dimensional graphs to obtain encryption meshes corresponding to each layer of two-dimensional graphs; generating electromagnetic simulation meshes of the three-dimensional model according to the encryption meshes corresponding to each layer of two-dimensional graphs.
6. The method of claim 5, wherein, The encryption meshes comprise first encryption meshes; the step of performing encryption division on the initial meshes of each layer of two-dimensional graphs to obtain encryption meshes corresponding to each layer of two-dimensional graphs comprises the steps of: for each layer of two-dimensional graphs, determining a target mesh area in which an intersection point of the initial mesh and a boundary of the layer of two-dimensional graphs is located; performing encryption division on the target mesh area corresponding to the layer of two-dimensional graphs using a coordinate line of the initial mesh as a second scan line until a preset encryption stop condition is met to obtain first encryption mesh lines corresponding to the layer of two-dimensional graphs; projecting the first encryption mesh lines corresponding to the layer of two-dimensional graphs onto two-dimensional graphs of target layers, wherein the two-dimensional graphs of the target layers are two-dimensional graphs of other layers except the layer of two-dimensional graphs; determining first encryption meshes corresponding to each layer of two-dimensional graphs.
7. The method of claim 5, wherein, The encryption meshes comprise second encryption meshes; the step of performing encryption division on the initial meshes of each layer of two-dimensional graphs to obtain encryption meshes corresponding to each layer of two-dimensional graphs comprises the steps of: obtaining target graphic elements of each layer of two-dimensional graphics coinciding with grid lines of the initial grid; projecting the target graphic elements corresponding to each layer of two-dimensional graphics onto a second target plane, and performing encryption subdivision on target initial grids in the initial grid that are immediately adjacent to the target graphic elements, until a second encryption grid line is obtained that satisfies the encryption stop condition; projecting the second encryption grid line onto each layer of two-dimensional graphics to obtain a second encryption grid corresponding to each layer of two-dimensional graphics.
8. The method of claim 5, wherein, The encryption grid includes a third encryption grid; and the encryption subdivision on the initial grid of each layer of two-dimensional graphics to obtain an encryption grid corresponding to each layer of two-dimensional graphics includes: performing encryption subdivision on the initial grid using an adaptive interpolation method, so that the ratio between the sizes of any adjacent grids in the initial grid is within a preset threshold range, until a third encryption grid corresponding to each layer of two-dimensional graphics is obtained that satisfies the encryption stop condition.
9. The method according to any one of claims 6 to 8, characterized in that, The encryption stop condition includes at least one of the following: the number of encryption subdivisions reaches a preset number threshold; the size of the encryption grid reaches a preset grid size threshold, and the encryption grid includes a first encryption grid, a second encryption grid, and a third encryption grid.
10. The method of claim 5, wherein, The generation of the electromagnetic simulation grid of the three-dimensional model according to the encryption grid corresponding to each layer of two-dimensional graphics includes: generating a segmented column according to the discrete line segments of the preset direction and any two adjacent two-dimensional graphics in each layer of two-dimensional graphics; performing encryption subdivision on the segmented column to obtain an encryption grid corresponding to the segmented column; generating the electromagnetic simulation grid of the three-dimensional model according to the encryption grid corresponding to each layer of two-dimensional graphics and the encryption grid corresponding to the segmented column.
11. An electronic device, comprising: The electronic device includes a processor and a memory, the memory stores programs or instructions executable on the processor, and the programs or instructions are executed by the processor to implement the steps of the method according to any one of claims 1 to 10.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores programs or instructions, and the programs or instructions are executed by the processor to implement the steps of the method according to any one of claims 1 to 10.
13. A computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the steps of the method according to any one of claims 1 to 10.
Citation Information
Cited By
Electromagnetic simulation grid generation method and device and electronic device
CN121859832A