CN118171605A - Grid processing method and device for overlapped grids - Google Patents
Grid processing method and device for overlapped grids Download PDFInfo
- Publication number
- CN118171605A CN118171605A CN202410600405.2A CN202410600405A CN118171605A CN 118171605 A CN118171605 A CN 118171605A CN 202410600405 A CN202410600405 A CN 202410600405A CN 118171605 A CN118171605 A CN 118171605A
- Authority
- CN
- China
- Prior art keywords
- grid
- interpolation
- unit
- contribution
- units
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 30
- 238000004364 calculation method Methods 0.000 claims abstract description 140
- 230000006854 communication Effects 0.000 claims abstract description 79
- 238000004891 communication Methods 0.000 claims abstract description 70
- 238000013507 mapping Methods 0.000 claims abstract description 67
- 238000012545 processing Methods 0.000 claims abstract description 47
- 238000004806 packaging method and process Methods 0.000 claims description 6
- 238000012546 transfer Methods 0.000 claims description 4
- 238000000034 method Methods 0.000 abstract description 67
- 230000008569 process Effects 0.000 abstract description 32
- 230000000875 corresponding effect Effects 0.000 description 80
- 238000004422 calculation algorithm Methods 0.000 description 19
- 238000003860 storage Methods 0.000 description 15
- 238000010586 diagram Methods 0.000 description 14
- 238000004590 computer program Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 7
- 238000012856 packing Methods 0.000 description 6
- 230000033001 locomotion Effects 0.000 description 4
- 238000005192 partition Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 239000003086 colorant Substances 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 239000012530 fluid Substances 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000007175 bidirectional communication Effects 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 235000019800 disodium phosphate Nutrition 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000011022 operating instruction Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
Landscapes
- Complex Calculations (AREA)
Abstract
The invention belongs to the technical field of computer graphics processing. The invention discloses a grid processing method and device for overlapped grids, wherein the method comprises the following steps: reading in an original calculation grid; dividing the original calculation grids into regions, and performing parallel assembly processing on grid blocks with overlapping relations after the region division, namely finishing judgment of the attributes of the grid units, and determining contribution units corresponding to each interpolation unit and grid block information corresponding to each interpolation unit; namely, the creation of the interpolation mapping relation is completed, and communication operation is carried out to obtain the interpolation mapping relation; according to the interpolation unit index and the coordinate information obtained by the communication operation, carrying out interpolation calculation on the grid block to which the contribution unit belongs; and sequentially assigning interpolation calculation results into the data container according to the assigned interpolation unit index sequence, transmitting the interpolation calculation results to corresponding network blocks at one time, and assigning values for all interpolation units. The invention optimizes the interpolation calculation process and improves the parallel calculation efficiency.
Description
Technical Field
The invention belongs to the technical field of computer graphics processing, and particularly relates to a grid processing method and device for overlapped grids.
Background
In the prior art, complex models are used in computational fluid dynamics (CFD, computational Fluid Dynamics) to generate high quality mesh techniques, where the computational area is discretized into a mesh, the quality of which is critical to the proper computation of the CFD. In order to reduce the difficulty of grid discretization of a complex shape and ensure the quality of the grid of each part attached to the body during the relative movement of multiple bodies, the grid discretization allows grids among the parts to be mutually overlapped, namely the overlapped grid technology has outstanding advantages in the aspect of generating high-quality grids. The overlapped grids do not need to carry out complicated topological partition any more, the quality of the body-attached grids of each part in the process of multi-body relative movement can be ensured, and the overlapped grids are widely focused and applied in the CFD field.
When the method is applied to engineering, large-scale parallel computation needs to be carried out on a high-performance parallel computer system due to large CFD computation amount. Existing CFD parallel computing may divide a computing region into hundreds or even thousands of sub-regions. Secondly, whether an overlapping relation exists before the subareas or not needs to be judged, and interpolation units and corresponding effective contribution units of the subareas are determined among the subareas with the overlapping relation. And finally, sequentially communicating the information of the contribution units to interpolation units of the subareas, and performing interpolation calculation to realize information interaction of flow field variables of each subarea. But the size of the traffic will vary due to the interpolation algorithm. Particularly for high precision algorithms, there is a need to communicate more flow field information adjacent to the active contribution unit. In the process of communicating flow field information near a contribution unit in one sub-area to another sub-area interpolation unit, extremely frequent communication operation and extremely large communication traffic are brought to CFD parallel calculation, and in the process of unsteady calculation of relative movement of each component grid, each unsteady iteration step needs to carry out similar operation, so that communication load is amplified more, the parallel calculation efficiency of CFD is seriously affected, and large-scale CFD calculation for engineering application is difficult to carry out.
Therefore, there is a need to provide a new grid processing method for an overlapped grid to solve the above-mentioned problems.
Disclosure of Invention
The method aims to solve the technical problems that in the existing method, communication load is amplified and even the parallel computing efficiency of CFD is seriously affected due to the fact that an effective contribution unit is required to be frequently communicated with an interpolation unit after being searched in a high-precision computing process. The application provides a grid processing method and device for overlapped grids.
The technical effects to be achieved by the application are realized by the following scheme:
The first aspect of the present invention provides a grid processing method for an overlapped grid, including: reading in an original computing grid, wherein the original computing grid comprises a background grid and an airplane component grid; dividing the original calculation grids into regions, performing parallel assembly processing on grid blocks after region division, namely judging the attributes of grid units, and determining contribution units corresponding to each interpolation unit and grid block information corresponding to each interpolation unit for the grid blocks with overlapping relations; based on the determined grid blocks with overlapping relation, creating an interpolation mapping relation in the grid blocks to which the interpolation unit belongs, and performing communication operation to obtain the interpolation mapping relation; in the grid block to which the contribution unit belongs, carrying out interpolation calculation by utilizing flow field information in the grid block to which the contribution unit belongs according to the interpolation mapping relation obtained by the communication operation; and sequentially assigning interpolation calculation results into the data containers according to a designated sequence, transmitting information carried by the data containers to network blocks to which the corresponding interpolation units belong at one time, and assigning values for the interpolation units.
According to an optional embodiment, in the grid block to which the contribution unit belongs, according to the interpolation mapping relationship obtained by the communication operation, interpolation calculation is performed by using flow field information in the grid block to which the contribution unit belongs, including: creating an interpolation mapping relation according to grid blocks to which the interpolation units belong, wherein the interpolation mapping relation comprises indexes of the units to be interpolated, space coordinate information of the units to be interpolated, contribution units corresponding to the units to be interpolated and information of grid blocks corresponding to the contribution units; and finishing interpolation calculation by utilizing the interpolation boundary information and flow field information in the grid block, wherein the flow field variables comprise speed, temperature and pressure.
According to an alternative embodiment, the following expression is used to perform interpolation calculation using flow field information in the grid block to which the contribution unit belongs:
;
Wherein, The flow field variable of the ith interpolation unit is represented, X represents the coordinate value of the ith interpolation unit along the X axis in a space coordinate system, Y represents the coordinate value of the ith interpolation unit along the Y axis in the space coordinate system, Z represents the coordinate value of the ith interpolation unit along the Z axis in the space coordinate system, and the space coordinate system is a rectangular coordinate system; /(I)The flow field variable of the grid point on the jth contribution unit or the flow field variable of the grid point on the adjacent grid unit adjacent to the jth contribution unit is represented by X, the coordinate value of the jth contribution unit along the X axis in a space coordinate system is represented by Y, the coordinate value of the jth contribution unit along the Y axis in the space coordinate system is represented by Z, the coordinate value of the jth contribution unit along the Z axis in the space coordinate system is represented by a rectangular coordinate system; w ij represents a distance weight coefficient,/>,/>Representing the distance of the center of the ith interpolation unit from the grid point on the jth contribution unit; n (i) represents the number of the contribution units corresponding to the ith interpolation unit and the adjacent units thereof, and N is a positive integer; and communicating the calculated value of the flow field variable of the ith interpolation unit to the interpolation unit corresponding to the grid block to which the unit to be interpolated belongs.
According to an alternative embodiment, the creating an interpolation mapping relationship in the grid blocks to which the interpolation unit belongs based on the determined grid blocks having the overlapping relationship, and performing a communication operation to obtain the interpolation mapping relationship includes: creating an interpolation relation mapping container, wherein the interpolation relation mapping container is used for recording related information of interpolation corresponding relation, and the related information of the interpolation corresponding relation comprises the following information: the interpolation correspondence of each interpolation unit in the first grid block having the overlapping relationship includes the number of interpolation units, the number and the spatial coordinates of the interpolation units, the contribution unit number corresponding to each interpolation unit, and the grid block number of one or more grid blocks having the overlapping relationship with the first grid block.
According to an alternative embodiment, the sending the information carried by the data container to the corresponding network block at one time includes: the data container converts different data format information of the first grid block into the same data format information, and the converted data information is communicated to one or more grid blocks in overlapping relation with the first grid block at one time according to the interpolation corresponding relation.
According to an optional embodiment, the determining the contribution unit corresponding to each interpolation unit and the grid block information corresponding to each interpolation unit for the grid blocks having the overlapping relationship includes: judging the grid attribute comprises determining an effective unit, an ineffective unit and a unit to be interpolated through a distance judging rule, namely, completing parallel assembly processing; and deleting invalid units from the grid blocks after parallel assembly processing, and merging and outputting.
According to an alternative embodiment, determining the attribute of each grid cell according to the distance from the grid point on each grid cell to the specified point or the specified surface of the aircraft component, wherein the grid point is determined to be an effective point when the distance from the grid point on the grid cell to be processed to the specified point or the specified surface of the aircraft component is smaller than the distance from the grid point on the grid cell to be processed to the specified point or the specified surface of the other aircraft component; and determining the grid point as an invalid point when the distance from the grid point on the grid unit to be processed to the designated point or the designated surface of the aircraft component is greater than or equal to the distance from the grid point to the designated point or the designated surface of another aircraft component.
According to an alternative embodiment, the grid cell to be processed is determined to be an interpolation cell in case there are valid points and invalid points in the grid points on the grid cell to be processed.
According to an alternative embodiment, the sequentially assigning interpolation calculation results in the data container according to a specified order includes: after determining the interpolation corresponding relation, the contribution unit starts to determine flow field information for interpolation calculation by using the interpolation mapping relation obtained by communication, and interpolation results are obtained by performing interpolation calculation by using the flow field information of the contribution unit and grid units nearby the contribution unit; sequentially packing interpolation calculation results in a data container according to a designated interpolation unit index sequence, and utilizing a designated interface to communicate data information carried by the data container to a grid block to which a corresponding interpolation unit belongs at one time; and then sequentially unpacking and then assigning interpolation calculation results to corresponding interpolation units.
A second aspect of the present invention provides a grid processing apparatus for an overlapped grid, where the grid processing apparatus is configured to implement the grid processing method for an overlapped grid according to the first aspect, and the grid processing apparatus includes: the reading-in processing module reads in an original calculation grid, wherein the original calculation grid comprises a background grid and an airplane component grid; the division processing module is used for dividing the original calculation grid into areas; the judging and determining module is used for carrying out parallel assembly processing on the grid blocks after the region division, namely judging the attribute of the grid units, and determining the contribution units corresponding to each interpolation unit and the grid block information corresponding to each interpolation unit for the grid blocks with overlapping relation; the creation processing module is used for creating an interpolation mapping relation in the grid blocks to which the interpolation unit belongs based on the determined grid blocks with the overlapping relation and performing communication operation to obtain the interpolation mapping relation; the interpolation calculation module is used for carrying out interpolation calculation by utilizing flow field information in the grid block to which the contribution unit belongs according to the interpolation mapping relation obtained by the communication operation in the grid block to which the contribution unit belongs; the assignment processing module sequentially assigns interpolation calculation results in the data container according to a designated sequence, sends information carried by the data container to a network block to which a corresponding interpolation unit belongs at one time, and assigns values for the interpolation units.
A third aspect of the present invention provides an electronic apparatus, comprising: a processor and a memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method of the first aspect of the invention.
A fourth aspect of the invention provides a computer readable storage medium storing one or more programs which, when executed by an electronic device comprising a plurality of application programs, cause the electronic device to perform the method of the first aspect of the invention.
Compared with the prior art, the method and the device can directly perform interpolation calculation in the grid block where the contribution units are located by optimizing the interpolation calculation process, when the number of the interpolation units is unchanged, the total interpolation calculation is not increased, and when high-precision interpolation calculation is performed by utilizing the flow field information of the adjacent units of the contribution units, the communication traffic of the flow field information around the contribution units is reduced, and the communication traffic in the interpolation calculation process is reduced.
The invention can directly carry out interpolation calculation in the grid blocks of the contribution unit, can realize the whole communication process by only calling the MPI interface once through packing communication based on the mapping relation, does not need to call the MPI communication interface for a plurality of times, can reduce the communication times in the interpolation calculation process, and further can effectively improve the parallel calculation efficiency.
In addition, for the incoherent local overlapping area, communication and calculation overlapping can be further realized, and the parallel calculation efficiency can be greatly improved.
In addition, through relation mapping, interpolation calculation adjustment and packaging communication, the communication process and the interpolation calculation can be isolated, a developer can automatically implement parallelization of different interpolation algorithms by writing interpolation algorithms with different precision under simple serial programming habit, maintainability and expandability of the CFD algorithm are improved, and programming difficulty in the interpolation calculation process is reduced.
Drawings
In order to more clearly illustrate the embodiments of the application or the prior art solutions, the drawings which are used in the description of the embodiments or the prior art will be briefly described below, it being obvious that the drawings in the description below are only some of the embodiments described in the present application, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a flow chart of a grid processing method for an overlapping grid in accordance with an embodiment of the present invention;
FIG. 2 is a schematic diagram of an example of a grid processing method for an overlapping grid to which embodiments of the present invention are applied;
FIG. 3 is a schematic diagram of an example of region partitioning in a grid processing method for an overlapping grid to which embodiments of the present invention are applied;
FIG. 4 is a schematic diagram of an example of grid blocks assembled in parallel in a grid processing method for an overlapping grid to which embodiments of the present invention are applied;
FIG. 5 is a schematic diagram of an example of determining the attribute of a grid cell in a grid processing method for an overlapped grid to which an embodiment of the present invention is applied;
FIG. 6 is a schematic diagram of an example of grid interpolation boundaries in an overlapping grid oriented grid processing method to which embodiments of the present invention are applied;
FIG. 7 is a schematic diagram of an example of grid interpolation computation in an overlapped grid-oriented grid processing method to which embodiments of the present invention are applied;
FIG. 8 is a schematic diagram of an example of a surface texture grid generating device according to an embodiment of the present invention;
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The application will be described in further detail below with reference to the drawings by means of specific embodiments. Wherein like elements in different embodiments are numbered alike in association. In the following embodiments, numerous specific details are set forth in order to provide a better understanding of the present application. The numbering of the components itself, e.g. "first", "second", etc., is used herein merely to distinguish between the described objects and does not have any sequential or technical meaning. The term "coupled" as used herein includes both direct and indirect coupling (coupling), unless otherwise indicated.
In view of the above problems, the present invention provides a grid processing method for overlapped grids, which can directly perform interpolation calculation in a grid block where a contribution unit is located by optimizing an interpolation calculation process, and when the number of interpolation units is unchanged, the total interpolation calculation is not increased, and when high-precision interpolation calculation is performed by using flow field information of a neighboring unit of the contribution unit, the traffic of flow field information around the contribution unit is reduced, and the traffic in the interpolation calculation process is reduced.
It should be noted that, the grid processing method facing the overlapped grid of the present invention is especially suitable for overlapped grid interpolation calculation of multi-body relative motion numerical calculation scenes, such as wind turbine stator/rotor interference flow, rotor and fuselage interference flow, high-speed train meeting, aircraft stores throwing, mother and child bullet throwing, space shuttle multistage separation, etc. Furthermore, it is also applicable to, for example, overlapping grid areas of wing tip parts of an aircraft wing (such as overlapping grid areas between upper and lower wing parts of a double wing aircraft, etc.), overlapping grid areas of propeller blades, etc.
Example 1
Various non-limiting embodiments of the present application are described in detail below in conjunction with fig. 1, 2, 3, 4, 5, 6, and 7.
As shown in fig. 1, the method of the present invention includes the following steps.
First, in step S101, an original calculation grid is read in, the original calculation grid including a background grid, an aircraft component grid.
In a specific embodiment, the specific process of the invention will be described by taking as an example the overlapping grid area (see in particular fig. 2) between the upper airfoil part and the lower airfoil part of a double-airfoil (upper airfoil part, lower airfoil part) aircraft.
Specifically, an original computing grid is read in from a grid file stored, for example, in a hard disk, the original computing grid including a background grid, an aircraft component grid. In the example of fig. 2, the aircraft component grid includes an upper airfoil grid, a lower airfoil grid (corresponding to the "upper airfoil" and "lower airfoil" in fig. 2).
It should be noted that the foregoing is merely illustrative of the present invention and is not to be construed as limiting thereof.
Next, in step S102, the original calculation grid is area-divided, and the area-divided grid blocks are subjected to parallel assembly processing.
Specifically, the read-in original computing grid is decomposed into a plurality of sub-areas (i.e., area division or grid partition), each of which becomes an independent grid block, and the above airfoil is exemplified as being divided into four sub-areas, i.e., grid block 0, grid block 1, grid block 2, and grid block 3 (see fig. 3 in particular).
In this example, the number of grid cells in the above four grid blocks is approximately equal, but is not limited thereto, and in other embodiments, one or more grid blocks may be divided into a specified number of grid cells. The foregoing is illustrative only and is not to be construed as limiting the invention.
And then, the partitioned grid blocks are assembled in parallel, wherein the parallel assembly is to judge the attribute of each grid unit according to certain judging rules (such as distance judging rules).
Specifically, the parallel assembly is a process of judging the attribute of the grid cells, and for the grid blocks with overlapping relation, determining the contribution units corresponding to each interpolation unit and the grid block information corresponding to each interpolation unit.
Further, determining the grid cell attribute (i.e., the attribute of the grid cell) includes determining a valid cell, an invalid cell, and a cell to be interpolated by a distance determination rule. The invalid units are deleted from the plurality of grid blocks after the parallel assembly processing, and then the outputs are merged (see fig. 4 in particular).
In one embodiment, the attributes of the grid cells are determined based on the distance of the grid points on each grid cell from a designated point or designated surface of the aircraft component.
Specifically, in the case where the distance from a grid point on a grid cell to be processed to a specified point or a specified surface of an aircraft component to which the grid point belongs (for example, the surface of an aircraft component) is smaller than the distance to a specified point or a specified surface of another aircraft component, the grid point is determined to be a valid point.
And determining the grid point as an invalid point in the case that the distance from the grid point on the grid unit to be processed to the specified point or the specified surface of the aircraft component to which the grid point belongs is greater than or equal to the distance from the grid point to the specified point or the specified surface of another aircraft component.
In the case where valid points exist and invalid points exist in grid points on the grid cell to be processed, the grid cell to be processed is determined as an interpolation unit.
In an alternative embodiment, the grid cell to be processed is determined to be an interpolation cell in case there are valid points and a specified number of invalid points in the grid points on the grid cell to be processed.
In a specific embodiment, for example, a plurality of grid blocks are combined and output, and the above airfoil component is exemplified, where interpolation units, invalidation units and calculation units are represented by using colors with different shades, and thus the interpolation units, invalidation units and calculation units are obtained.
For example, if the current grid point in the grid of the upper airfoil component is less than the distance from the upper airfoil component wall surface in the grid of the upper airfoil component, the current grid point in the grid of the upper airfoil component is determined to be a valid point.
For example, if the current grid point in the grid of the upper airfoil component is at a distance from the wall of the upper airfoil component that is greater than or equal to the distance from the current grid point in the grid of the upper airfoil component to the wall of the lower airfoil component, the current grid point in the grid of the upper airfoil component is determined to be an invalid point.
As shown in fig. 5, for the grid points on the grid cell B of the lower airfoil component, such as the point a and the point B, the distance from the point a to the wall surface of the component to which it belongs (the lower airfoil component) is S1, and the distance from the point a to the wall surface of the other component (the other component is the upper airfoil component in this example) is OS1, and the point a is an invalid point because S1 is greater than OS 1. For example, the distance from the point b to the wall surface of the member to which it belongs (lower airfoil member) is S2, and the distance from the point b to the wall surface of the other member (in this example, the other member is the upper airfoil member) is OS2, and since S2 is smaller than OS2, the point b is the effective point. Further, for the grid cell B, since there are both valid points and invalid points, the grid cell B is an interpolation unit. In order to more clearly show the relationship between the interpolation unit B and the grid points a, B (as a circular dotted line portion in fig. 5), an enlarged schematic view of the circular dotted line portion is shown on the right side of fig. 5 to more clearly show the relationship between the interpolation unit B and the grid points a, B, the grid point a being the corner point of the upper left corner of the interpolation unit B, and the grid point B being the corner point of the lower right corner of the interpolation unit B.
Determining a contribution unit corresponding to each interpolation unit and grid block information where the contribution unit is located for grid blocks with overlapping relation by judging the attribute of the grid units.
For example, in the example of fig. 6, on grid blocks assembled in parallel, upper and lower airfoils are exemplified, wherein different colors in each airfoil section represent different grid blocks (here, invalid grid cells have been discarded or deleted), and grid thickened portions represent interpolation boundaries, i.e., boundaries made up of interpolation units.
The grid blocks 1 of the upper airfoil part, the grid blocks 7 of the lower airfoil part and the interpolation boundaries in between are shown in fig. 6. As can be seen from fig. 6, the grid blocks 1 of the upper airfoil member have an overlapping relationship (i.e., a one-to-many overlapping relationship) with the grid blocks 4, 7 of the lower airfoil member. The grid blocks 0 of the upper airfoil component are in an overlapping relationship (i.e., one-to-one overlapping relationship) with the grid blocks 4 of the lower airfoil component. The grid blocks 2 of the upper airfoil part are in overlapping relationship with the grid blocks 6 of the lower airfoil part.
It should be noted that, the interpolation correspondence is determined in the grid blocks that overlap each other, different overlapping situations may correspond to more different interpolation correspondences, for example, grids of a plurality of components overlap each other, and the interpolation correspondence may record contribution unit information of each corresponding component. The foregoing is illustrative only and is not to be construed as limiting the invention.
Next, in step S103, based on the determined mesh blocks having the overlapping relationship, an interpolation map is created in the mesh blocks to which the interpolation unit belongs, and a communication operation is performed to obtain the interpolation map.
For grid blocks with overlapping relationships, interpolation mapping relationships are created.
The creating of the interpolation mapping relation comprises creating an interpolation relation mapping container, wherein the interpolation relation mapping container is used for recording related information of the interpolation corresponding relation, and the related information of the interpolation corresponding relation comprises the following information: the interpolation corresponding relation of each interpolation unit in the first grid block with the overlapping relation comprises the number of the interpolation units, the numbers of the interpolation units, the space coordinate information of the interpolation units, the contribution unit information corresponding to each interpolation unit and the grid information of one or more grid blocks with the overlapping relation with the first grid block. The information of the contribution units and the corresponding grid blocks specifically comprises the number and the number of the contribution units and the grid block number to which the contribution units belong.
In an optional implementation manner, an interpolation mapping relation is created according to the grid blocks to which the interpolation unit belongs, wherein the interpolation mapping relation comprises indexes of the unit to be interpolated, space coordinate information of the unit to be interpolated, contribution units corresponding to the unit to be interpolated and information of the grid blocks corresponding to the contribution units.
Specifically, the interpolation correspondence refers to a correspondence between each interpolation unit and a corresponding contribution unit in the grid blocks overlapped in a correlated manner. The interpolation boundary information comprises information of grid blocks which are overlapped in a related manner, and specifically comprises information of grid blocks which are corresponding to each interpolation unit and information of grid blocks which are corresponding to contribution units corresponding to each interpolation unit.
Furthermore, the interpolation relation mapping container is used for performing communication operation between grid blocks having an overlapping relation, for example, communicating information about a first grid block (such as grid block 1 in fig. 6) of the upper airfoil component to other grid blocks having an overlapping relation with the first grid block (such as grid block 7, grid block 4 of the lower airfoil component in fig. 6).
Optionally, the interpolation relation mapping container is configured to communicate interpolation relation mapping container information (i.e., information recorded or stored by the interpolation relation mapping container) in the first grid block to the grid blocks having an overlapping relation with the first grid block. In essence, an interpolation mapping relation is obtained from an interpolation unit in a first grid block, and is sent to a contribution unit in a grid block having an overlapping relation with the first grid block, and further, subsequent interpolation calculation is directly performed by using flow field information of the contribution unit in the grid block to which the contribution unit belongs based on the obtained interpolation mapping relation. Because the interpolation calculation operation is that the contribution units in the grid blocks directly acquire the flow field information from the grid blocks to which the contribution units belong, the communication operation that the interpolation units in the grid blocks acquire related information from the corresponding contribution units in the traditional method is not needed, and particularly when the number of the interpolation units is unchanged, the high-precision interpolation calculation is performed by utilizing the flow field information of the adjacent units of the contribution units, so that the communication traffic of the flow field information around the contribution units is effectively reduced.
Specifically, the interpolation mapping relation is sequentially converted and assigned according to the index sequence of the appointed interpolation units, stored or recorded in a data container, and can be sent to the network block to which the corresponding contribution unit belongs at one time.
For example, the related information of the grid block 1 is stored in an interpolation relation mapping container that communicates the related information of the grid block 1 to the grid block 7 having an overlapping relation with the grid block 1.
In the present invention, the first grid block and the second grid block having the overlapping relationship may perform bidirectional interaction, that is, bidirectional communication operation. The foregoing is illustrative only and is not to be construed as limiting the present invention.
In a specific embodiment, an interpolation relation mapping container is created, and the interpolation relation mapping container records, for example, interpolation unit information in a first grid block, specifically including the number of interpolation units, the spatial coordinates of the interpolation units, and the numbers of corresponding contribution units, and communicates with the grid blocks having an overlapping relation with the first grid block. After the communication operation, each grid block has interpolation boundary information of other grid blocks overlapped with each other (namely, an overlapping relation exists), wherein the interpolation boundary information comprises the number of grid block interpolation units, the number of interpolation units, the space coordinate information of the interpolation units, the number of corresponding contribution units and the like which have the overlapping relation. For example, the mesh block 7 acquires interpolation boundary information of the mesh block 1 having an overlapping relationship with the mesh block 1 (i.e., the first mesh block).
It should be noted that the foregoing is merely illustrative of the present invention and is not to be construed as limiting thereof.
Next, in step S104, in the grid block to which the contribution unit belongs, interpolation calculation is performed using flow field information in the grid block to which the contribution unit belongs, according to the interpolation mapping relationship obtained by the communication operation.
Specifically, according to the interpolation mapping relationship created by the grid block to which the interpolation unit belongs, the interpolation mapping relationship includes an index of the unit to be interpolated and spatial coordinate information of the unit to be interpolated, and information (interpolation boundary information) of the contribution unit corresponding to the unit to be interpolated and the grid block corresponding to the contribution unit, where the information of the contribution unit and the grid block corresponding to the contribution unit specifically includes: the number (N) of the neighboring units of the contribution unit and the grid block number to which the contribution unit belongs.
And in the grid block to which the contribution unit belongs, carrying out interpolation calculation by utilizing flow field information in the grid block to which the contribution unit belongs according to the interpolation mapping relation obtained by the communication operation.
Specifically, interpolation calculation is completed by utilizing the interpolation boundary information and flow field information in the grid block to which the contribution unit belongs, wherein the flow field variables comprise speed, temperature and pressure.
;
Wherein,The flow field variable of the ith interpolation unit is represented, X represents the coordinate value of the ith interpolation unit along the X axis in a space coordinate system, Y represents the coordinate value of the ith interpolation unit along the Y axis in the space coordinate system, Z represents the coordinate value of the ith interpolation unit along the Z axis in the space coordinate system, and the space coordinate system is a rectangular coordinate system; /(I)The flow field variable of the grid point on the jth contribution unit or the flow field variable of the grid point on the adjacent grid unit adjacent to the jth contribution unit is represented by X, the coordinate value of the jth contribution unit along the X axis in a space coordinate system is represented by Y, the coordinate value of the jth contribution unit along the Y axis in the space coordinate system is represented by Z, the coordinate value of the jth contribution unit along the Z axis in the space coordinate system is represented by a rectangular coordinate system; w ij represents a distance weight coefficient,/>,/>Representing the distance of the center of the ith interpolation unit from the grid point on the jth contribution unit; n (i) represents the number of contribution units corresponding to the ith interpolation unit, and N is a positive integer.
And communicating the calculated value of the flow field variable of the ith interpolation unit to the interpolation unit corresponding to the grid block to which the unit to be interpolated belongs.
In an alternative embodiment, an interpolation mapping relationship is obtained from a grid block to which the current contribution unit belongs, after determining the interpolation mapping relationship, spatial coordinate information of an interpolation unit corresponding to the current contribution unit can be obtained, interpolation calculation is performed on the grid block to which the current contribution unit belongs according to the current contribution unit and the adjacent flow field information thereof, and then the calculated flow field variable is sent to the grid block to which the interpolation unit corresponding to the current contribution unit belongs through communication operation. Compared with the traditional method, the method comprises the steps of firstly obtaining the contribution units of the grid blocks corresponding to the contribution units and the adjacent flow field information of the grid blocks corresponding to the interpolation units in a communication manner, and then carrying out interpolation calculation on the grid blocks corresponding to the interpolation units based on an interpolation formula.
In a specific embodiment, as shown in fig. 7, the grid blocks to which the interpolation unit B belongs in the lower airfoil grid communicate interpolation unit information to the upper airfoil grid blocks of the contribution unit a corresponding to the interpolation unit B (i.e., the corresponding grid blocks of the upper airfoil grid), the upper airfoil grid blocks reuse the flow field information (specifically, flow field variables and geometric positions) of the contribution unit a and the grid units (e.g., the grid units H, E, etc.) nearby the contribution unit a to perform interpolation calculation, and then the interpolation calculation result (e.g., the result of the above expression is obtained) And communicating to a grid block of the interpolation unit B in the lower airfoil grid, and assigning flow field variables of the interpolation unit B. And finishing interpolation calculation by utilizing the interpolation boundary information and the flow field information in the grid block to which the contribution unit belongs to obtain the flow field information of the interpolation unit, and acquiring the flow field information of the contribution unit without communication. In the conventional method, flow field information (specifically, flow field variable, geometric position and the like) of a contribution unit A and a grid unit (such as a grid unit H, E and the like) nearby the contribution unit A in an upper airfoil grid block is required to be communicated to a grid to which a lower airfoil interpolation unit B belongs, and then the lower airfoil performs interpolation calculation by using information obtained by communication to obtain the flow field variable of the interpolation unit B.
And finishing interpolation calculation by utilizing the interpolation boundary information and the flow field information in the grid block to which the contribution unit belongs to obtain the flow field information of the interpolation unit, communicating the grid block to which the contribution unit belongs to the grid block to which the interpolation unit belongs, and assigning the grid block to the corresponding interpolation unit. In the grid block to which the contribution unit belongs, the interpolation calculation does not need to acquire the flow field information around the contribution unit through communication operation when the flow field information is utilized, the flow field information around the contribution unit can be directly acquired, the communication traffic of the flow field information around the contribution unit can be effectively reduced, the communication traffic in the interpolation calculation process is reduced, and the high-precision interpolation calculation can be realized.
In another optional implementation manner, the communication and interpolation calculation mode can isolate the communication process from the interpolation calculation, and a developer only needs to write a plurality of interpolation algorithms with different precision under the simple serial programming habit, namely, the interpolation algorithm is realized by directly utilizing the information of the contribution unit in the grid block to which the contribution unit belongs, and no attention is paid to the interpolation correspondence and communication operation. When CFD calculation with different precision is performed simultaneously, parallelization calculation of different interpolation algorithms can be automatically realized through written interpolation algorithms with various precision, so that more effective parallelization interpolation calculation can be realized while programming difficulty in the interpolation calculation process is reduced, and maintainability and expandability of the CFD algorithm can be improved.
Next, in step S105, the interpolation calculation results are sequentially assigned to the data containers according to the specified order, and the information carried by the data containers is sent to the network blocks to which the corresponding interpolation units belong at one time, and the interpolation units are assigned.
And particularly, sequentially assigning interpolation calculation results in a data container according to a specified sequence. Sequentially packaging interpolation calculation results in a data container according to the designated interpolation unit index sequence, and utilizing a designated interface to communicate data information carried by the data container to a grid block to which a corresponding interpolation unit belongs at one time.
In particular, the specified interface is, for example, an information transfer interface (MESSAGE PASSING INTERFACE, MPI) or an MPI communication interface, implemented by invoking an MPI communication function.
In a specific embodiment, the interpolation calculation results are packed in a data container in turn according to the traversal sequence of the contribution units, and the data information carried by the data container is communicated to each corresponding grid block at one time by using a designated interface.
And then sequentially unpacking and then assigning interpolation calculation results to corresponding interpolation units.
Specifically, the flow field information after interpolation calculation is sequentially assigned in a data container according to the traversing sequence of the contribution units, and information carried by the data container is communicated to grid blocks with corresponding overlapping relations at one time by utilizing an information transfer interface (MESSAGE PASSING INTERFACE, MPI) MPI.
Further, the data container converts the different data format information of the first grid block into the same data format information and communicates the converted data information to one or more grid blocks in overlapping relation with the first grid block at a time.
According to the traversing sequence of the interpolation units, based on the mapping relation, the corresponding contribution units and grid blocks to which the contribution units belong are found, the contribution units are traversed in the grid blocks to which the contribution units belong, each grid block sequentially converts values obtained by interpolation calculation based on the numbers of the contribution units and adjacent units and flow field information of the contribution units into information of the same data type, the information is stored by a data container, for example, MPI communication functions of an information transfer interface (MESSAGE PASSING INTERFACE, MPI) are utilized to realize one-time communication operation of the data container, and after the grid blocks to which the interpolation units belong acquire the communicated information data, the information in the data container is sequentially read according to the traversing sequence of the interpolation units (solution Bao Fuzhi), so that the packaging communication process is completed.
Then, when the grid block or the grid blocks receive the converted data information, unpacking assignment is carried out. Specifically, after the communication operation is completed, the data containers obtained by communication are sequentially read from the corresponding grid blocks (for example, the grid block 7 and the grid block 1), and finally the calculated interpolation information is assigned to the corresponding interpolation unit.
Through interpolation mapping relation, optimization of interpolation calculation and packing communication, a communication process and the interpolation calculation can be isolated, a developer can automatically implement parallelization of different interpolation algorithms by writing the interpolation algorithms with different precision under a simple serial programming habit, maintainability and expandability of the CFD algorithm are improved, and programming difficulty in the interpolation calculation process is reduced.
It is noted that the figures are only schematic illustrations of processes involved in a method according to an exemplary embodiment of the invention and are not intended to be limiting. It will be readily understood that the processes shown in the figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Compared with the prior art, the method and the device can directly perform interpolation calculation in the grid block where the contribution units are located by optimizing the interpolation calculation process, when the number of the interpolation units is unchanged, the total interpolation calculation is not increased, and when high-precision interpolation calculation is performed by utilizing the flow field information of the adjacent units of the contribution units, the communication traffic of the flow field information around the contribution units is reduced, and the communication traffic in the interpolation calculation process is reduced.
The invention can directly carry out interpolation calculation in the grid blocks of the contribution unit, can realize the whole communication process by only calling the MPI interface once through packing communication based on the mapping relation, does not need to call the MPI communication interface for a plurality of times, can reduce the communication times in the interpolation calculation process, and further can effectively improve the parallel calculation efficiency.
In addition, for the incoherent local overlapping area, communication and calculation overlapping can be further realized, and the parallel calculation efficiency can be greatly improved.
In addition, through relation mapping, interpolation calculation adjustment and packaging communication, the communication process and the interpolation calculation can be isolated, a developer can automatically implement parallelization of different interpolation algorithms by writing interpolation algorithms with different precision under simple serial programming habit, maintainability and expandability of the CFD algorithm are improved, and programming difficulty in the interpolation calculation process is reduced.
Example 2
The following are examples of the apparatus of the present invention that may be used to perform the method embodiments of the present invention. For details not disclosed in the embodiments of the apparatus of the present invention, please refer to the embodiments of the method of the present invention.
Fig. 8 is a schematic structural view of an example of a mesh processing apparatus facing an overlapped mesh according to the present invention.
Referring to fig. 8, a second aspect of the present disclosure provides a grid processing apparatus 600 for an overlapped grid, which is used to implement the grid processing method for an overlapped grid according to embodiment 1. Specifically, the grid processing apparatus 600 includes a read-in processing module 610, a partition processing module 620, a judgment determining module 630, a creation processing module 640, an interpolation calculating module 650, and an assignment processing module 660.
In a specific embodiment, the read-in processing module 610 is configured to read in an original computing grid, where the original computing grid includes a background grid, an aircraft component grid. The partition processing module 620 performs region division on the original computing grid. The determining module 630 performs parallel assembly processing on the grid blocks after the region division, that is, determines the attribute of the grid cells, and determines the contribution unit corresponding to each interpolation unit and the grid block information corresponding to each interpolation unit for the grid blocks having the overlapping relationship. The creation processing module 640 creates an interpolation map in the mesh blocks to which the interpolation unit belongs, based on the determined mesh blocks to which the overlapping relationship exists, and performs a communication operation to obtain the interpolation map. The interpolation calculation module 650 performs interpolation calculation using flow field information in a grid block to which the contribution unit belongs, according to the interpolation mapping relationship obtained by the communication operation, in the grid block to which the contribution unit belongs. The assignment processing module 660 sequentially assigns interpolation calculation results in the data containers according to a designated sequence, and sends information carried by the data containers to the network blocks to which the corresponding interpolation units belong at one time, and assigns values for the interpolation units.
According to an alternative embodiment, in a grid block to which the contribution unit belongs, interpolation calculation is performed by using flow field information in the grid block to which the contribution unit belongs according to an interpolation mapping relationship obtained by a communication operation, including:
According to an interpolation mapping relation created by a grid block to which an interpolation unit belongs, the interpolation mapping relation comprises an index of the unit to be interpolated, space coordinate information of the unit to be interpolated, contribution units corresponding to the unit to be interpolated and information of the grid block corresponding to the contribution units; and finishing interpolation calculation by utilizing the interpolation boundary information and flow field information in the grid block, wherein the flow field variables comprise speed, temperature and pressure.
The following expression is adopted, and interpolation calculation is carried out by utilizing flow field information in the grid block to which the contribution unit belongs:
;
Wherein, The flow field variable of the ith interpolation unit is represented, X represents the coordinate value of the ith interpolation unit along the X axis in a space coordinate system, Y represents the coordinate value of the ith interpolation unit along the Y axis in the space coordinate system, Z represents the coordinate value of the ith interpolation unit along the Z axis in the space coordinate system, and the space coordinate system is a rectangular coordinate system; /(I)The flow field variable of the grid point on the jth contribution unit or the flow field variable of the grid point on the adjacent grid unit adjacent to the jth contribution unit is represented by X, the coordinate value of the jth contribution unit along the X axis in a space coordinate system is represented by Y, the coordinate value of the jth contribution unit along the Y axis in the space coordinate system is represented by Z, the coordinate value of the jth contribution unit along the Z axis in the space coordinate system is represented by a rectangular coordinate system; w ij represents a distance weight coefficient,/>,/>Representing the distance of the center of the ith interpolation unit from the grid point on the jth contribution unit; n (i) represents the number of contribution units corresponding to the ith interpolation unit, and N is a positive integer.
And communicating the calculated value of the flow field variable of the ith interpolation unit to the interpolation unit corresponding to the grid block to which the unit to be interpolated belongs.
According to an alternative embodiment, the creating an interpolation mapping relationship in the grid blocks to which the interpolation unit belongs based on the determined grid blocks having the overlapping relationship, and performing a communication operation to obtain the interpolation mapping relationship includes: creating an interpolation relation mapping container, wherein the interpolation relation mapping container is used for recording related information of interpolation corresponding relation, and the related information of the interpolation corresponding relation comprises the following information: the interpolation correspondence of each interpolation unit in the first grid block having the overlapping relationship includes the number of interpolation units, the number and the spatial coordinates of the interpolation units, the number of contribution units corresponding to each interpolation unit, the number of each contribution unit, and the grid block numbers of one or more grid blocks having the overlapping relationship with the first grid block.
According to an alternative embodiment, the sending the information carried by the data container to the corresponding network block at one time includes: the data container converts different data format information of the first grid block into the same data format information, and the converted data information is communicated to one or more grid blocks in overlapping relation with the first grid block at one time according to the interpolation corresponding relation.
According to an optional embodiment, the determining the contribution unit corresponding to each interpolation unit and the grid block information corresponding to each interpolation unit for the grid blocks having the overlapping relationship includes: judging the grid attribute comprises determining an effective unit, an ineffective unit and a unit to be interpolated through a distance judging rule, namely, completing parallel assembly processing; and deleting invalid units from the grid blocks after parallel assembly processing, and merging and outputting.
According to an alternative embodiment, the properties of the grid cells are determined from the distance of the grid points on each grid cell to a specified point or a specified surface of the aircraft component.
A grid point on a grid cell to be processed is determined to be a valid point if the distance of the grid point to a specified point or specified surface of the aircraft component to which it belongs (i.e., the object specified surface) is less than the distance to a specified point or specified surface of another aircraft component.
And determining the grid point as an invalid point when the distance from the grid point on the grid unit to be processed to the designated point or the designated surface of the aircraft component is greater than or equal to the distance from the grid point to the designated point or the designated surface of another aircraft component.
According to an alternative embodiment, the grid cell to be processed is determined to be an interpolation cell in case there are valid points and invalid points in the grid points on the grid cell to be processed.
According to an alternative embodiment, the sequentially assigning interpolation calculation results in the data container according to a specified order includes: after determining the interpolation corresponding relation, the contribution unit starts to determine flow field information for interpolation calculation by using the interpolation mapping relation obtained by communication, and interpolation results are obtained by performing interpolation calculation by using the flow field information of the contribution unit and grid units nearby the contribution unit; sequentially packing interpolation calculation results in a data container according to a designated interpolation unit index sequence, and utilizing a designated interface to communicate data information carried by the data container to a grid block to which a corresponding interpolation unit belongs at one time; and then sequentially unpacking and then assigning interpolation calculation results to corresponding interpolation units.
The method in the apparatus embodiment of the present invention is substantially the same as the method in the method embodiment of the present invention, and therefore, the description of the same parts is omitted.
Compared with the prior art, the method and the device can directly perform interpolation calculation in the grid block where the contribution units are located by optimizing the interpolation calculation process, when the number of the interpolation units is unchanged, the total interpolation calculation is not increased, and when high-precision interpolation calculation is performed by utilizing the flow field information of the adjacent units of the contribution units, the communication traffic of the flow field information around the contribution units is reduced, and the communication traffic in the interpolation calculation process is reduced.
The invention can directly carry out interpolation calculation in the grid blocks of the contribution unit, can realize the whole communication process by only calling the MPI interface once through packing communication based on the mapping relation, does not need to call the MPI communication interface for a plurality of times, can reduce the communication times in the interpolation calculation process, and further can effectively improve the parallel calculation efficiency.
In addition, for the incoherent local overlapping area, communication and calculation overlapping can be further realized, and the parallel calculation efficiency can be greatly improved.
In addition, through relation mapping, interpolation calculation adjustment and packaging communication, the communication process and the interpolation calculation can be isolated, a developer can automatically implement parallelization of different interpolation algorithms by writing interpolation algorithms with different precision under simple serial programming habit, maintainability and expandability of the CFD algorithm are improved, and programming difficulty in the interpolation calculation process is reduced.
Example 3
Fig. 9 is a schematic structural view of an electronic device according to an embodiment of the present application. Referring to fig. 9, at the hardware level, the electronic device includes a processor, and optionally an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory (non-volatilememory), such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, network interface, and memory may be interconnected by an internal bus, which may be an ISA (Industry Standard Architecture ) bus, a PCI (PERIPHERAL COMPONENTINTERCONNECT, peripheral component interconnect standard) bus, or EISA (Extended Industry Standard Architecture ) bus, among others. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 7, but not only one bus or type of bus.
And the memory is used for storing programs. In particular, the program may include program code including computer-operating instructions. The memory may include memory and non-volatile storage and provide instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form a model surface grid fairing processing method on a logic level. And the processor is used for executing the program stored in the memory and particularly used for executing the surface grid fairing processing method of any model.
The method disclosed in the embodiment of fig. 1 of the present application can be applied to a processor (i.e., a deletion control module in the present specification), or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (DIGITAL SIGNAL processors, DSPs), application specific integrated circuits (ApplicationSpecific Integrated Circuit, ASICs), field-Programmable gate arrays (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
The electronic device may also execute the method described in fig. 1 and implement the functions of the embodiment shown in fig. 1, which is not described herein.
The embodiments of the present application also provide a computer-readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by an electronic device comprising a plurality of application programs, enable the electronic device to perform the method of the embodiment of fig. 1, and in particular for performing any of the methods described above.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer 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 Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.
Claims (10)
1. A grid processing method for an overlapped grid, comprising:
reading in an original computing grid, wherein the original computing grid comprises a background grid and an airplane component grid;
Dividing the original calculation grids into regions, performing parallel assembly processing on grid blocks after region division, namely judging the attributes of grid units, and determining contribution units corresponding to each interpolation unit and grid block information corresponding to each interpolation unit for the grid blocks with overlapping relations;
Based on the determined grid blocks with overlapping relation, creating an interpolation mapping relation in the grid blocks to which the interpolation unit belongs, and performing communication operation to obtain the interpolation mapping relation;
In the grid block to which the contribution unit belongs, carrying out interpolation calculation by utilizing flow field information in the grid block to which the contribution unit belongs according to the interpolation mapping relation obtained by the communication operation;
And sequentially assigning interpolation calculation results into the data containers according to a designated sequence, transmitting information carried by the data containers to network blocks to which the corresponding interpolation units belong at one time, and assigning values for the interpolation units.
2. The grid processing method for overlapping grids according to claim 1, wherein the performing interpolation calculation using flow field information in a grid block to which the contribution unit belongs according to an interpolation mapping relationship obtained by the communication operation in the grid block to which the contribution unit belongs includes:
Creating an interpolation mapping relation according to grid blocks to which the interpolation units belong, wherein the interpolation mapping relation comprises indexes of the units to be interpolated, space coordinate information of the units to be interpolated, contribution units corresponding to the units to be interpolated and information of grid blocks corresponding to the contribution units;
And finishing interpolation calculation by utilizing the interpolation boundary information and flow field information in the grid block, wherein the flow field variables comprise speed, temperature and pressure.
3. The grid processing method for the overlapped grid according to claim 2, wherein interpolation calculation is performed by using flow field information in a grid block to which the contribution unit belongs by using the following expression:
;
Wherein, The flow field variable of the ith interpolation unit is represented, X represents the coordinate value of the ith interpolation unit along the X axis in a space coordinate system, Y represents the coordinate value of the ith interpolation unit along the Y axis in the space coordinate system, Z represents the coordinate value of the ith interpolation unit along the Z axis in the space coordinate system, and the space coordinate system is a rectangular coordinate system; /(I)The flow field variable of the grid point on the jth contribution unit or the flow field variable of the grid point on the adjacent grid unit adjacent to the jth contribution unit is represented by X, the coordinate value of the jth contribution unit along the X axis in a space coordinate system is represented by Y, the coordinate value of the jth contribution unit along the Y axis in the space coordinate system is represented by Z, the coordinate value of the jth contribution unit along the Z axis in the space coordinate system is represented by a rectangular coordinate system; w ij represents a distance weight coefficient,/>,/>Representing the distance of the center of the ith interpolation unit from the grid point on the jth contribution unit; n (i) represents the number of contribution units corresponding to the ith interpolation unit, and N is a positive integer;
and communicating the calculated value of the flow field variable of the ith interpolation unit to the interpolation unit corresponding to the grid block to which the unit to be interpolated belongs.
4. The grid processing method for an overlapped grid according to claim 1, wherein the creating an interpolation map in the grid blocks to which the interpolation unit belongs based on the determined grid blocks having the overlapped relationship, and performing a communication operation to obtain the interpolation map, comprises:
creating an interpolation relation mapping container, wherein the interpolation relation mapping container is used for recording related information of interpolation corresponding relation, and the related information of the interpolation corresponding relation comprises the following information:
the interpolation correspondence of each interpolation unit in the first grid block having the overlapping relationship includes the number of interpolation units, the number and the spatial coordinates of the interpolation units, the contribution units corresponding to each interpolation unit, the number of each contribution unit, and the grid block numbers of one or more grid blocks having the overlapping relationship with the first grid block.
5. The grid processing method for overlapping grids according to claim 1, wherein the step of transmitting the information carried by the data container to the corresponding network block at one time includes:
The data container converts different data format information of the first grid block into the same data format information, and the converted data information is communicated to one or more grid blocks in overlapping relation with the first grid block at one time according to the interpolation corresponding relation.
6. The grid processing method for an overlapped grid according to claim 1, wherein determining the contribution unit corresponding to each interpolation unit and the grid block information corresponding to each interpolation unit for the grid blocks having the overlapped relation comprises:
Judging the grid attribute comprises determining an effective unit, an ineffective unit and a unit to be interpolated through a distance judging rule, namely, completing parallel assembly processing;
and deleting invalid units from the grid blocks after parallel assembly processing, and merging and outputting.
7. The grid processing method for an overlapping grid as set forth in claim 6, wherein,
Determining the properties of the grid cells based on the distance of the grid points on each grid cell to a specified point or specified surface of the aircraft component, wherein,
Determining a grid point on a grid unit to be processed as a valid point in the case that the distance from the grid point to a specified point or a specified surface of the aircraft component to which the grid point is attached is smaller than the distance from the grid point to a specified point or a specified surface of another aircraft component;
And determining the grid point as an invalid point when the distance from the grid point on the grid unit to be processed to the designated point or the designated surface of the aircraft component is greater than or equal to the distance from the grid point to the designated point or the designated surface of another aircraft component.
8. The grid processing method for an overlapping grid as set forth in claim 7, wherein,
In the case where valid points exist and invalid points exist in grid points on the grid cell to be processed, the grid cell to be processed is determined as an interpolation unit.
9. The grid processing method for overlapping grids according to claim 1, wherein the sequentially assigning interpolation calculation results in the data container according to a specified order comprises:
After determining the interpolation corresponding relation, the contribution unit starts to determine flow field information for interpolation calculation by using the interpolation mapping relation obtained by communication, and interpolation results are obtained by performing interpolation calculation by using the flow field information of the contribution unit and grid units nearby the contribution unit;
Sequentially packaging interpolation calculation results in a data container according to a designated interpolation unit index sequence, and utilizing a designated interface to communicate data information carried by the data container to a grid block to which a corresponding interpolation unit belongs at one time, wherein the designated interface comprises an information transfer interface and an MPI communication interface;
and then sequentially unpacking and then assigning interpolation calculation results to corresponding interpolation units.
10. An overlapped mesh-oriented mesh processing apparatus for implementing the overlapped mesh-oriented mesh processing method of any one of claims 1 to 9, the mesh processing apparatus comprising:
the reading-in processing module reads in an original calculation grid, wherein the original calculation grid comprises a background grid and an airplane component grid;
the division processing module is used for dividing the original calculation grid into areas;
The judging and determining module is used for carrying out parallel assembly processing on the grid blocks after the region division, namely judging the attribute of the grid units, and determining the contribution units corresponding to each interpolation unit and the grid block information corresponding to each interpolation unit for the grid blocks with overlapping relation;
The creation processing module is used for creating an interpolation mapping relation in the grid blocks to which the interpolation unit belongs based on the determined grid blocks with the overlapping relation and performing communication operation to obtain the interpolation mapping relation;
The interpolation calculation module is used for carrying out interpolation calculation by utilizing flow field information in the grid block to which the contribution unit belongs according to the interpolation mapping relation obtained by the communication operation in the grid block to which the contribution unit belongs;
the assignment processing module sequentially assigns interpolation calculation results in the data container according to a designated sequence, sends information carried by the data container to a network block to which a corresponding interpolation unit belongs at one time, and assigns values for the interpolation units.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410600405.2A CN118171605B (en) | 2024-05-15 | Grid processing method and device for overlapped grids |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410600405.2A CN118171605B (en) | 2024-05-15 | Grid processing method and device for overlapped grids |
Publications (2)
Publication Number | Publication Date |
---|---|
CN118171605A true CN118171605A (en) | 2024-06-11 |
CN118171605B CN118171605B (en) | 2024-07-26 |
Family
ID=
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020114626A1 (en) * | 2001-02-09 | 2002-08-22 | Seiko Epson Corporation | Service providing system, management terminal, mobile member, service providing program, and service providing method |
CN114201823A (en) * | 2021-12-17 | 2022-03-18 | 西安前沿动力软件开发有限责任公司 | Explicit nested grid assembly method and device and storage medium |
CN117593486A (en) * | 2024-01-19 | 2024-02-23 | 中国空气动力研究与发展中心计算空气动力研究所 | Grid reconstruction method and device based on space particles |
CN117973252A (en) * | 2023-12-28 | 2024-05-03 | 北京空天技术研究所 | Efficient non-structural overlapped grid automatic assembly method and system capable of discriminating collision |
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020114626A1 (en) * | 2001-02-09 | 2002-08-22 | Seiko Epson Corporation | Service providing system, management terminal, mobile member, service providing program, and service providing method |
CN114201823A (en) * | 2021-12-17 | 2022-03-18 | 西安前沿动力软件开发有限责任公司 | Explicit nested grid assembly method and device and storage medium |
CN117973252A (en) * | 2023-12-28 | 2024-05-03 | 北京空天技术研究所 | Efficient non-structural overlapped grid automatic assembly method and system capable of discriminating collision |
CN117593486A (en) * | 2024-01-19 | 2024-02-23 | 中国空气动力研究与发展中心计算空气动力研究所 | Grid reconstruction method and device based on space particles |
Non-Patent Citations (3)
Title |
---|
叶靓;张颖;杨硕;董军;: "旋翼流场计算嵌套网格并行装配方法改进研究", 空气动力学学报, no. 04, 15 August 2018 (2018-08-15), pages 49 - 59 * |
梁姗;张鉴;陆忠华;: "大规模空气动力学数值模拟中的并行重叠网格装配技术", 科研信息化技术与应用, no. 03, 20 May 2016 (2016-05-20), pages 68 - 78 * |
赵钟;何磊;张健;徐庆新;张来平;: "湍流模拟壁面距离MPI/OpenMP混合并行计算方法", 空气动力学学报, no. 06, 15 December 2019 (2019-12-15), pages 19 - 28 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11587282B2 (en) | Hybrid hierarchy of bounding and grid structures for ray tracing | |
EP3940649A1 (en) | Methods and systems for constructing ray tracing acceleration structures | |
CN111028360B (en) | Data reading and writing method and system in 3D image processing, storage medium and terminal | |
CN110597935A (en) | Space analysis method and device | |
CN111275633A (en) | Point cloud denoising method, system and device based on image segmentation and storage medium | |
CN113095022A (en) | Parallel simulation processing method of gate-level circuit and computer readable storage medium | |
US20160239278A1 (en) | Generating a schedule of instructions based on a processor memory tree | |
CN104599320A (en) | Real-time drawing and comparing method for three-dimensional model | |
CN116822160A (en) | Cartesian grid generation method, device, equipment and medium | |
KR102657104B1 (en) | Operation device of convolutional neural network, operation method of convolutional neural network and computer program stored in a recording medium to execute the method thereof | |
CN118171605B (en) | Grid processing method and device for overlapped grids | |
Xia et al. | Highly efficient wall-distance-based parallel unstructured overset grid assembly | |
CN118171605A (en) | Grid processing method and device for overlapped grids | |
CN116663369A (en) | Parallel processing method and system for CFD shared storage of unstructured grid | |
CN115346005B (en) | Data structure construction method for object plane grid based on nested bounding box concept | |
CN116720410A (en) | Unstructured grid parallel processing method and device based on recursive dissection and reordering | |
CN115270378B (en) | Method for generating bow-shaped shock wave external field grid | |
CN116402963A (en) | Lane line vector model construction method and device, electronic equipment and storage medium | |
CN115330971B (en) | Geometric model lightweight method oriented to rendering performance optimization | |
Potter et al. | Ordered line integral methods for solving the eikonal equation | |
CN114492224A (en) | Jet flow interference flow field mixed grid computing method, system, equipment and medium | |
CN114022594A (en) | Slope-type geographic information element graph processing method and device | |
Khamayseh et al. | Use of the spatial kD-tree in computational physics applications | |
GB2593946A (en) | Methods and systems for constructing ray tracing acceleration structures | |
CN112927350B (en) | Multi-domain geologic body model construction method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |