Method, apparatus, electronic device, and storage medium for generating environmental fluid distribution information
By determining the position information of the target object's surface geometric units and grid points and judging their associated surface geometric units and position relationships, the problems of low efficiency and poor accuracy of environmental fluid distribution information generation under complex surface shapes in the prior art are solved, and efficient and accurate generation of fluid distribution information is achieved.
Patent Information
- Application Number
- CN202210554876.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-20
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2042-05-20
AI Technical Summary
When generating environmental fluid distribution information, the prior art has a large number of grids and a long time to judge the ray method when facing complex surface shapes, resulting in low generation efficiency, easy errors and poor accuracy.
By obtaining the surface geometric model of the target object and its corresponding background Cartesian mesh and the initial object Cartesian mesh, the position information of the surface geometric unit in the background mesh and the position information of the grid point are determined, based on this information, the associated surface geometric unit of the grid point is determined, and the position relationship between the grid unit and the associated surface geometric unit is judged, and the grid unit to be encrypted is determined and the encryption process is performed to generate the target Cartesian mesh and environmental fluid distribution information.
It improves the accuracy and efficiency of environmental fluid distribution information generation, reduces the amount of calculation, optimizes the judgment logic, and adapts to target objects of various complex shapes.
Smart Images

Figure CN115048877B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of simulation technology, and particularly to a method, device, electronic device, and storage medium for generating environmental fluid distribution information. Background Art
[0002] Computational Fluid Dynamics (CFD) is a discipline that uses computers to simulate and study fluid motion problems, and has wide applications in industries such as aerospace, ships, and automobiles. With the increase in the complexity of object structures in practical applications, the accuracy and efficiency of CFD simulation are crucial. An efficient and high-quality method for generating fluid distribution information, as a prerequisite for numerical simulation of computational fluid dynamics, has always been a key research content. With the development of CFD, the geometric description of the target object is becoming more and more refined. Therefore, it is of great significance to study an efficient, accurate, and adaptable method for generating environmental fluid distribution information.
[0003] In the prior art, environmental fluid distribution information is mostly generated by Cartesian grids and ray methods. However, when the surface shape of the target object is complex, the number of grids is large, the judgment process of the ray method is time-consuming, the calculation amount is large, the grid generation efficiency decreases, resulting in low efficiency of generating fluid distribution information. Moreover, the algorithms in the judgment process mostly involve multiplication and division operations. Due to the limited precision of computer floating-point numbers, errors are easily generated when dealing with multi-size object surface structures, and the accuracy is poor. In addition, currently, the method of encrypting all flow field grids in a given range is mostly used. With the increase in the number of grid adaptions, a large amount of computing resources are occupied, resulting in low efficiency of generating fluid distribution information. Summary of the Invention
[0004] In view of the above problems in the prior art, the present invention discloses a method, device, electronic device, and storage medium for generating environmental fluid distribution information to achieve the rapid generation of environmental fluid distribution information and improve the accuracy and efficiency of generating environmental fluid distribution information. The technical solutions disclosed by the present invention are as follows:
[0005] According to one aspect of the embodiments disclosed by the present invention, a method for generating environmental fluid distribution information is provided, including:
[0006] Obtaining a surface geometric model of a target object, a background Cartesian grid corresponding to the surface geometric model, and an initial object Cartesian grid;
[0007] Determining first position information of each surface geometric unit in the surface geometric model in the background Cartesian grid, and determining second position information of grid points of each grid unit in the initial object Cartesian grid in the background Cartesian grid;
[0008] Based on the first position information and the second position information, determine the associated surface geometric unit of the grid point;
[0009] Determine the positional relationship between each grid cell and the associated surface geometric unit corresponding to each grid cell;
[0010] Based on the positional relationship, determine the grid cells to be encrypted in the initial object Cartesian grid;
[0011] Perform encryption processing on the grid cells to be encrypted in the initial object Cartesian grid to obtain a target Cartesian grid;
[0012] Generate environmental fluid distribution information corresponding to the target object based on the target Cartesian grid.
[0013] Optionally, the determining the first position information of each surface geometric unit in the surface geometric model in the background Cartesian grid includes:
[0014] Obtain the upper limit coordinate information and the lower limit coordinate information of each surface geometric unit;
[0015] Determine the first grid arrangement serial number corresponding to the upper limit coordinate information in the background Cartesian grid and the second grid arrangement serial number corresponding to the lower limit coordinate information in the background Cartesian grid;
[0016] Take the first grid arrangement serial number and the second grid arrangement serial number corresponding to each surface geometric unit as the first position information corresponding to each surface geometric unit.
[0017] Optionally, the determining the second position information of the grid points of each grid cell in the initial object Cartesian grid in the background Cartesian grid includes:
[0018] Obtain the coordinate information of the grid points of each grid cell;
[0019] Determine the third grid arrangement serial number corresponding to the coordinate information of the grid points of each grid cell in the background Cartesian grid;
[0020] Take the third grid arrangement serial number corresponding to the grid points of each grid cell as the second position information corresponding to the grid points of each grid cell.
[0021] Optionally, the determining the associated surface geometric unit of the grid point based on the first position information and the second position information includes:
[0022] Based on the first grid arrangement serial number and the second grid arrangement serial number, determine the grid sorting range of each surface geometric unit in the background Cartesian grid;
[0023] Based on the third grid arrangement serial number and the grid sorting range, obtain the associated surface geometric units of the grid points.
[0024] Optionally, the determining the positional relationship between each grid unit and the associated surface geometric unit corresponding to each grid unit includes:
[0025] Use the ray method to determine the positional relationship between the grid points corresponding to each grid unit and the associated surface geometric units of the grid points;
[0026] Based on the positional relationship, determine the positional relationship between each grid unit and the associated surface geometric unit corresponding to each grid unit.
[0027] Optionally, the determining the grid units to be encrypted in the initial object Cartesian grid based on the positional relationship includes:
[0028] Take the grid units with an intersection relationship as the grid units to be encrypted.
[0029] Optionally, the encrypting the grid units to be encrypted in the initial object Cartesian grid to obtain the target Cartesian grid includes:
[0030] Set new grid points in the grid units to be encrypted to obtain an updated Cartesian grid;
[0031] Based on the updated Cartesian grid, repeat the steps of determining the first position information of each surface geometric unit in the surface geometric model in the background Cartesian grid and the second position information of the grid points of each grid unit in the initial object Cartesian grid in the background Cartesian grid, until based on the positional relationship, determining the grid units to be encrypted in the initial object Cartesian grid, until the preset conditions are met, to obtain the target Cartesian grid.
[0032] According to another aspect of the disclosed embodiments of the present invention, there is provided an environmental fluid distribution information generation device, including:
[0033] A data acquisition module, configured to acquire the surface geometric model of the target object, the background Cartesian grid corresponding to the surface geometric model, and the initial object Cartesian grid;
[0034] A position information determination module, configured to determine the first position information of each surface geometric unit in the surface geometric model in the background Cartesian grid, and determine the second position information of the grid points of each grid unit in the initial object Cartesian grid in the background Cartesian grid;
[0035] An associated surface geometry unit generation module, configured to determine an associated surface geometry unit of the grid point based on the first position information and the second position information;
[0036] A position relationship determination module, configured to determine a position relationship between each grid unit and the associated surface geometry unit corresponding to each grid unit;
[0037] A grid unit to be encrypted generation module, configured to determine grid units to be encrypted in the initial object Cartesian grid based on the position relationship;
[0038] A target Cartesian grid generation module, configured to perform an encryption process on the grid units to be encrypted in the initial object Cartesian grid to obtain a target Cartesian grid;
[0039] An environmental fluid distribution information generation module, configured to generate environmental fluid distribution information corresponding to the target object based on the target Cartesian grid.
[0040] According to another aspect of the disclosed embodiments of the present invention, there is provided an electronic device, including: a processor; a memory for storing executable instructions of the processor; wherein, the processor is configured to execute the instructions to implement the environmental fluid distribution information generation method as described above.
[0041] According to another aspect of the disclosed embodiments of the present invention, there is provided a computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enabling the electronic device to execute the environmental fluid distribution information generation method of the disclosed embodiments of the present invention.
[0042] According to another aspect of the disclosed embodiments of the present invention, there is provided a computer program product including instructions, when it runs on a computer, enabling the computer to execute the environmental fluid distribution information generation method of the disclosed embodiments of the present invention.
[0043] The technical solutions provided by the disclosed embodiments of the present invention at least bring the following beneficial effects:
[0044] The method for generating environmental fluid distribution information provided by the present invention determines the first position information of each surface geometric unit in the surface geometric model of the target object in the background Cartesian grid, and the second position information of the grid points of each grid unit in the initial object Cartesian grid in the background Cartesian grid. It can quickly locate the positions of the surface geometric units and grid points through the first position information and the second position information during the spatial retrieval process. Moreover, by using the above first position information and second position information to determine the associated surface geometric units of the grid points, and then judging the positional relationship between each grid unit and the corresponding associated surface geometric unit, the amount of calculation in the judgment process is reduced, and at the same time, the judgment logic is optimized, improving the accuracy and efficiency of generating the environmental fluid distribution information corresponding to the target object.
[0045] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the present disclosure. Brief Description of the Drawings
[0046] The drawings herein are incorporated into the specification and form a part of this specification, showing embodiments consistent with the disclosure of the present invention, and are used together with the specification to explain the principles of the present disclosure, and do not constitute an improper limitation to the disclosure of the present invention.
[0047] Figure 1 is a flowchart of a method for generating environmental fluid distribution information shown according to an exemplary embodiment;
[0048] Figure 2 is a flowchart of a method for determining the first position information of a surface geometric unit shown according to an exemplary embodiment;
[0049] Figure 3 is a flowchart of a method for determining associated surface geometric units shown according to an exemplary embodiment;
[0050] Figure 4 is a flowchart of a method for determining the positional relationship between a grid unit and an associated geometric unit shown according to an exemplary embodiment;
[0051] Figure 5 is a block diagram of an environmental fluid distribution information generation device shown according to an exemplary embodiment;
[0052] Figure 6 is a block diagram of a terminal electronic device for generating environmental fluid distribution information shown according to an exemplary embodiment;
[0053] Figure 7 is a block diagram of a server electronic device for generating environmental fluid distribution information shown according to an exemplary embodiment. Detailed Embodiments
[0054] In order to enable those of ordinary skill in the art to better understand the technical solutions disclosed in the present invention, the technical solutions in the disclosed embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0055] It should be noted that the terms "first", "second", etc. in the specification, claims and above-mentioned drawings of the present invention are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention disclosed here can be implemented in an order other than those illustrated or described here. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0056] An environmental fluid distribution information generation method provided by the present invention can be applied to fluid mechanics simulation.
[0057] Figure 1 is a flowchart of an environmental fluid distribution information generation method shown according to an exemplary embodiment. As Figure 1 shown, the environmental fluid distribution information generation method is used for fluid mechanics simulation and includes the following steps.
[0058] S101: Obtain the surface geometric model of the target object, the background Cartesian grid corresponding to the surface geometric model, and the initial object Cartesian grid.
[0059] In a specific embodiment, the target object can be an object for which environmental fluid distribution information needs to be constructed, such as a car, an aircraft, etc. The surface geometric model of the target object can be a stereolithography geometric model capable of depicting the surface shape of the target object. The surface geometric model includes a plurality of surface geometric units. Specifically, the surface geometric units can be surface geometric units having a triangular shape.
[0060] In a specific embodiment, the background Cartesian grid and the initial object Cartesian grid can be composed of several grid units. Specifically, the grid units can include cuboid grid units, cube grid units, etc., but are not limited thereto.
[0061] S103: Determine the first position information of each surface geometric unit in the surface geometric model in the background Cartesian grid, and determine the second position information of each grid point of each grid unit in the initial object Cartesian grid in the background Cartesian grid.
[0062] In a specific embodiment, the first position information may be the grid position information of the surface geometric unit in the background Cartesian grid, and the second position information may be the grid position information of the grid points in the initial object Cartesian grid in the background Cartesian grid. Specifically, the grid position information may include the grid number.
[0063] In an alternative embodiment, Figure 2 is a flowchart of a method for determining the first position information of a surface geometric unit according to an exemplary embodiment; as Figure 2 shown, determining the first position information of each surface geometric unit in the surface geometric model in the background Cartesian grid may include:
[0064] S201: Obtain the upper limit coordinate information and the lower limit coordinate information of each surface geometric unit;
[0065] S203: Determine the first grid arrangement serial number corresponding to the upper limit coordinate information in the background Cartesian grid and the second grid arrangement serial number corresponding to the lower limit coordinate information in the background Cartesian grid;
[0066] S205: Use the first grid arrangement serial number and the second grid arrangement serial number corresponding to each surface geometric unit as the first position information corresponding to each surface geometric unit.
[0067] In a specific embodiment, the coordinate information of each surface geometric unit may be the coordinate information of the vertices of each surface geometric unit. Specifically, the upper limit coordinate information of each surface geometric unit may include the coordinate information of the point corresponding to the maximum coordinate value among the points forming each surface geometric unit, and the lower limit coordinate information of each surface geometric unit may include the coordinate information of the point corresponding to the minimum coordinate value among the points forming each surface geometric unit.
[0068] In an alternative embodiment, determining the first grid arrangement serial number corresponding to the upper limit coordinate information in the background Cartesian grid and the second grid arrangement serial number corresponding to the lower limit coordinate information in the background Cartesian grid may include:
[0069] Calculate the first grid arrangement serial number corresponding to the upper limit coordinate information in the uniform background Cartesian grid and the second grid arrangement serial number corresponding to the lower limit coordinate information in the background Cartesian grid according to the following formula,
[0070]
[0071] Taking the first grid arrangement serial number corresponding to the upper limit coordinate information in the background Cartesian grid as an example, i represents the grid arrangement serial number in the horizontal axis direction in the first grid arrangement serial number, j represents the grid arrangement serial number in the vertical axis direction in the first grid arrangement serial number, k represents the grid arrangement serial number in the vertical axis direction in the first grid arrangement serial number, x represents the abscissa in the upper limit coordinate information, y represents the ordinate in the upper limit coordinate information, z represents the vertical coordinate in the upper limit coordinate information, x minbackground represents the minimum abscissa of the uniform background Cartesian grid, y minbackground represents the minimum ordinate of the uniform background Cartesian grid, z minbackground represents the minimum vertical coordinate of the uniform background Cartesian grid, int represents rounding down, and Δ represents the unit grid spacing of the uniform background Cartesian grid.
[0072] In an alternative embodiment, the above-mentioned determining the second position information of the grid points of each grid cell in the initial object Cartesian grid in the background Cartesian grid may include:
[0073] Obtaining the coordinate information of the grid points of each grid cell;
[0074] Determining the third grid arrangement serial number corresponding to the coordinate information of the grid points of each grid cell in the background Cartesian grid;
[0075] Taking the third grid arrangement serial number corresponding to the grid points of each grid cell as the second position information corresponding to the grid points of each grid cell.
[0076] In a specific embodiment, the specific refinement steps of the above-mentioned determining the third grid arrangement serial number corresponding to the coordinate information of the grid points of each grid cell in the background Cartesian grid may refer to the specific refinement steps of the above-mentioned determining the first grid arrangement serial number corresponding to the upper limit coordinate information in the background Cartesian grid and the second grid arrangement serial number corresponding to the lower limit coordinate information in the background Cartesian grid, which will not be elaborated here.
[0077] In the above embodiments, in the process of determining the first position information of each surface geometric unit in the surface geometric model in the background Cartesian grid and determining the second position information of the grid points of each grid cell in the initial object Cartesian grid in the background Cartesian grid, introducing the grid arrangement serial number for determination can quickly locate the positions of the surface geometric unit and the grid points during the spatial retrieval process, improving the efficiency.
[0078] S105: Based on the first position information and the second position information, determine the associated surface geometric unit of the grid points.
[0079] In an alternative embodiment,Figure 3 is a flowchart of a method for determining an associated surface geometric unit shown according to an exemplary embodiment; as Figure 3 shown, determining the associated surface geometric unit of the grid point based on the first position information and the second position information may include:
[0080] S301: Determine the grid sorting range of each surface geometric unit in the background Cartesian grid based on the first grid arrangement serial number and the second grid arrangement serial number;
[0081] S302: Obtain the associated surface geometric unit of the grid point based on the third grid arrangement serial number and the grid sorting range.
[0082] In a specific embodiment, the associated surface geometric unit of the grid point may be determined according to whether the grid arrangement serial number of the grid point falls within the grid sorting range of the surface geometric unit. Specifically, it is determined by comparing the magnitude relationship between the third arrangement serial number and the first grid arrangement serial number and the second grid arrangement serial number. If the third arrangement serial number is between the first grid arrangement serial number and the second grid arrangement serial number, it indicates that the grid arrangement serial number of the grid point falls within the grid sorting range of the surface geometric unit.
[0083] S107: Determine the positional relationship between each grid unit and the associated surface geometric unit corresponding to each grid unit.
[0084] In a specific embodiment, each grid unit may correspond to at least one associated surface geometric unit.
[0085] In an alternative embodiment, Figure 4 is a flowchart of a method for determining the positional relationship between a grid unit and an associated geometric unit shown according to an exemplary embodiment; as Figure 4 shown, determining the positional relationship between each grid unit and the associated surface geometric unit corresponding to each grid unit may include:
[0086] S401: Use the ray method to determine the positional relationship between the grid point corresponding to each grid unit and the associated surface geometric unit of the grid point;
[0087] S403: Determine the positional relationship between each grid unit and the associated surface geometric unit corresponding to each grid unit according to the positional relationship.
[0088] In a specific embodiment, the position relationship between the grid points corresponding to each grid cell and the associated surface geometric element determined by the ray method can be that the grid points corresponding to each grid cell are inside or outside the associated surface geometric element. Specifically, determining whether the above grid points are inside or outside the associated surface geometric element by the ray method can include drawing a ray from the above grid points and judging the number of intersections of this ray with the associated surface geometric element. When the number of intersections is odd, it can be determined that the grid point is inside the associated surface geometric element; when the number of intersections is even, it can be determined that the grid point is outside the associated surface geometric element.
[0089] In a specific embodiment, the position relationship between each grid cell and the associated surface geometric element corresponding to each grid cell can include that the grid cell is inside the associated surface geometric element, the grid cell is outside the associated surface geometric element, and the grid cell and the associated surface element are in an intersecting relationship.
[0090] In a specific embodiment, determining the position relationship between each grid cell and the associated surface geometric element corresponding to each grid cell according to the position relationship can include: if all the grid points corresponding to the grid cell are inside the associated surface geometric element, then the grid cell is inside the associated surface element; if all the grid points corresponding to the grid cell are outside the associated surface geometric element, then the grid cell is outside the associated surface element; if some of the grid points corresponding to the grid cell are inside the associated surface geometric element and some are outside the associated surface geometric element, then the grid cell and the associated surface element are in an intersecting relationship.
[0091] In the above embodiment, the associated surface geometric element of the grid point is determined through the first position relationship and the second position information. In the process of determining the position relationship between the grid cell and the surface geometric element, only the position relationship between each grid cell and the corresponding associated surface geometric element needs to be judged, reducing the calculation amount in the judgment process, optimizing the judgment logic at the same time, and improving the accuracy and efficiency.
[0092] S109: Based on the position relationship, determine the grid cells to be encrypted in the initial object Cartesian grid.
[0093] In an optional embodiment, the above determining the grid cells to be encrypted in the initial object Cartesian grid based on the position relationship may include:
[0094] Taking the grid cells with the intersecting relationship as the grid cells to be encrypted.
[0095] S111: Perform encryption processing on the grid cells to be encrypted in the initial object Cartesian grid to obtain the target Cartesian grid.
[0096] In an optional embodiment, the above-mentioned encryption process for the grid cells to be encrypted in the initial object Cartesian grid to obtain the target Cartesian grid may include:
[0097] Setting new grid points in the grid cells to be encrypted to obtain an updated Cartesian grid;
[0098] Based on the updated Cartesian grid, repeating the step of determining the first position information of each surface geometric unit in the surface geometric model in the background Cartesian grid and the second position information of the grid points of each grid cell in the initial object Cartesian grid in the background Cartesian grid, until based on the position relationship, determining the grid cells to be encrypted in the initial object Cartesian grid, until a preset condition is met, to obtain the target Cartesian grid.
[0099] In a specific embodiment, setting new grid points in the grid cells to be encrypted may include dividing the grid cells to be encrypted to obtain the divided grid cells; using the vertices of the divided grid cells as the new grid points. Specifically, dividing the grid cells to be encrypted to obtain the divided grid cells may include evenly dividing the grid cells to be encrypted into a preset number of grid cells. Specifically, the preset number can be set according to actual applications. For example, the preset number can be set to 8.
[0100] In a specific embodiment, the preset condition may be the upper limit result of the encryption layer number of the pre-set updated Cartesian grid. Specifically, the preset condition may include whether the encryption layer number of the updated Cartesian grid reaches the upper limit. When the encryption layer number of the updated Cartesian grid does not meet the pre-set upper limit layer number, continue to determine the first position information of each surface geometric unit in the surface geometric model in the background Cartesian grid based on the above-mentioned updated Cartesian grid, and determine the second position information of the grid points of each grid cell in the above-mentioned updated Cartesian grid in the background Cartesian grid. Based on the first position information and the second position information, determine the associated surface geometric units of the grid points, and determine the position relationship between each grid cell and the associated surface geometric unit corresponding to each grid cell. Based on this position relationship, determine the grid cells to be encrypted in the updated Cartesian grid, and then perform an encryption process on the grid cells to be encrypted until the encryption layer number of the updated Cartesian grid meets the pre-set upper limit layer number.
[0101] S113: Generating the environmental fluid distribution information corresponding to the target object based on the target Cartesian grid.
[0102] In a specific embodiment, the environmental fluid distribution information corresponding to the target object may be the fluid distribution information in the three-dimensional spatial region around the target object. Specifically, the range of the spatial region may be preset according to actual applications; the fluid distribution information may include distribution information such as fluid velocity, density, and pressure. Specifically, the fluid may include air, water, etc., but is not limited thereto.
[0103] In a specific embodiment, generating the environmental fluid distribution information corresponding to the target object based on the target Cartesian grid may include discretely dividing the three-dimensional spatial region around the target object based on the target Cartesian grid to obtain a number of regional units of the spatial region; generating the environmental fluid distribution information corresponding to the target object by calculating the fluid distribution information corresponding to the points of each regional unit.
[0104] By implementing the above embodiments of the present invention, the environmental fluid distribution information generation method determines the first position information of each surface geometric unit in the surface geometric model of the target object in the background Cartesian grid, and the second position information of the grid points of each grid unit in the initial object Cartesian grid in the background Cartesian grid. It can quickly locate the positions of the surface geometric units and grid points through the first position relationship and the second position information during the spatial retrieval process. Moreover, the associated surface geometric unit of the grid point is determined through the first position relationship and the second position information, and then the position relationship between each grid unit and the corresponding associated surface geometric unit is judged, reducing the calculation amount in the judgment process, optimizing the judgment logic, and improving the accuracy and efficiency of generating the environmental fluid distribution information corresponding to the target object. At the same time, the environmental fluid distribution information generation process takes points as objects and is independent of the shape of the target object, and can adapt to target objects with various complex shapes, having good universality.
[0105] Figure 5 It is a block diagram of an environmental fluid distribution information generation device shown according to an exemplary embodiment. Refer to Figure 5 , the device includes:
[0106] A data acquisition module 510, configured to acquire the surface geometric model of the target object, the background Cartesian grid corresponding to the surface geometric model, and the initial object Cartesian grid;
[0107] A position information determination module 520, configured to determine the first position information of each surface geometric unit in the surface geometric model in the background Cartesian grid, and determine the second position information of the grid points of each grid unit in the initial object Cartesian grid in the background Cartesian grid;
[0108] An associated surface geometric unit generation module 530, configured to determine the associated surface geometric unit of the grid point based on the first position information and the second position information;
[0109] A position relationship determination module 540, configured to determine a position relationship between each grid cell and the associated surface geometric cell corresponding to each grid cell;
[0110] An encrypted grid cell generation module 550, configured to determine encrypted grid cells in the initial object Cartesian grid based on the position relationship;
[0111] A target Cartesian grid generation module 560, configured to perform encryption processing on the encrypted grid cells in the initial object Cartesian grid to obtain a target Cartesian grid;
[0112] An environmental fluid distribution information generation module 570, configured to generate environmental fluid distribution information corresponding to the target object based on the target Cartesian grid.
[0113] Optionally, the position information determination module 520 includes:
[0114] A first position information determination unit, configured to determine first position information of each surface geometric cell in the surface geometric model in the background Cartesian grid;
[0115] A second position information determination unit, configured to determine second position information of the grid points of each grid cell in the initial object Cartesian grid in the background Cartesian grid.
[0116] Optionally, the first position information determination unit includes:
[0117] A surface geometric cell coordinate information acquisition unit, configured to acquire upper limit coordinate information and lower limit coordinate information of each surface geometric cell;
[0118] A first grid arrangement serial number determination unit, configured to determine a first grid arrangement serial number corresponding to the upper limit coordinate information in the background Cartesian grid and a second grid arrangement serial number corresponding to the lower limit coordinate information in the background Cartesian grid;
[0119] A first position information determination subunit, configured to use the first grid arrangement serial number and the second grid arrangement serial number corresponding to each surface geometric cell as the first position information corresponding to each surface geometric cell.
[0120] Optionally, the second position information determination unit includes:
[0121] A grid point coordinate information acquisition unit, configured to acquire coordinate information of the grid points of each grid cell;
[0122] A second grid arrangement serial number determination unit, configured to determine a third grid arrangement serial number corresponding to the coordinate information of the grid points of each grid unit in the background Cartesian grid;
[0123] A second position information determination subunit, configured to use the third grid arrangement serial number corresponding to the grid points of each grid unit as the second position information corresponding to the grid points of each grid unit.
[0124] Optionally, the associated surface geometry unit generation module 530 includes:
[0125] A grid sorting range determination unit, configured to determine the grid sorting range of each surface geometry unit in the background Cartesian grid based on the first grid arrangement serial number and the second grid arrangement serial number;
[0126] An associated surface geometry unit determination unit, configured to obtain the associated surface geometry unit of the grid points based on the third grid arrangement serial number and the grid sorting range.
[0127] Optionally, the position relationship determination module 540 includes:
[0128] A first position relationship determination unit, configured to use the ray method to determine the position relationship between the grid points corresponding to each grid unit and the associated surface geometry unit of the grid points;
[0129] A second position relationship determination unit, configured to determine the position relationship between each grid unit and the associated surface geometry unit corresponding to each grid unit according to the position relationship.
[0130] Optionally, the grid unit to be encrypted generation module 550 includes:
[0131] A grid unit to be encrypted generation unit, configured to use the grid units with an intersection position relationship as the grid units to be encrypted.
[0132] Optionally, the target Cartesian grid generation module 560 includes:
[0133] An update unit, configured to set new grid points in the grid units to be encrypted to obtain an updated Cartesian grid;
[0134] A repeated execution unit, configured to repeat, based on the updated Cartesian grid, the steps of determining the first position information of each surface geometry unit in the surface geometry model in the background Cartesian grid and the second position information of the grid points of each grid unit in the initial object Cartesian grid in the background Cartesian grid until, based on the position relationship, the grid units to be encrypted in the initial object Cartesian grid are determined, until a preset condition is met, to obtain the target Cartesian grid.
[0135] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.
[0136] Figure 6 is a block diagram of an electronic device for generating environmental fluid distribution information shown according to an exemplary embodiment. The electronic device may be a terminal, and its internal structure diagram may be as Figure 6 shown. The electronic device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a method for generating environmental fluid distribution information. The display screen of the electronic device may be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device may be a touch layer covering the display screen, or may be a button, a trackball, or a touchpad provided on the housing of the electronic device, or may also be an external keyboard, a touchpad, or a mouse, etc.
[0137] Figure 7 is a block diagram of an electronic device for generating environmental fluid distribution information shown according to an exemplary embodiment. The electronic device may be a server, and its internal structure diagram may be as Figure 7 shown. The electronic device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a method for generating environmental fluid distribution information.
[0138] Those skilled in the art can understand that Figure 6 or Figure 7 the structures shown in
[0139] In an exemplary embodiment, an electronic device is further provided, including: a processor; a memory for storing executable instructions of the processor; wherein, the processor is configured to execute the instructions to implement the environmental fluid distribution information generation method in the disclosed embodiments of the present invention.
[0140] In an exemplary embodiment, a computer-readable storage medium is further provided. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the environmental fluid distribution information generation method in the disclosed embodiments of the present invention.
[0141] In an exemplary embodiment, a computer program product including instructions is further provided. When it runs on a computer, the computer is enabled to execute the environmental fluid distribution information generation method in the disclosed embodiments of the present invention.
[0142] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database or other medium used in the embodiments provided by the present invention can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate
[0143] SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0144] Other embodiments of the present invention will be readily apparent to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the invention disclosed, which follow the general principles disclosed herein and include known common general knowledge or conventional technical means in the technical field not disclosed herein. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the present invention are pointed out by the following claims.
[0145] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. A method for generating environmental fluid distribution information, characterized in that Including: Obtaining a surface geometric model of a target object, a background Cartesian grid corresponding to the surface geometric model, and an initial object Cartesian grid; Determining first position information of each surface geometric unit in the surface geometric model in the background Cartesian grid, and determining second position information of grid points of each grid unit in the initial object Cartesian grid in the background Cartesian grid, including: taking the grid arrangement serial numbers corresponding to the upper limit coordinate information and the lower limit coordinate information of each surface geometric unit in the background Cartesian grid as the first position information; and taking the third grid arrangement serial number corresponding to the grid points of each grid unit in the background Cartesian grid as the second position information; Based on the first position information and the second position information, determining the associated surface geometric unit of the grid point, including: obtaining the associated surface geometric unit of the grid point by comparing the third grid arrangement serial number and the grid sorting range of each surface geometric unit in the background Cartesian grid; Determining the positional relationship between each grid unit and the associated surface geometric unit corresponding to each grid unit, including: using the ray method to determine the positional relationship between the grid points corresponding to each grid unit and the associated surface geometric unit of the grid points; and determining the positional relationship between each grid unit and the corresponding associated surface geometric unit according to the positional relationship; Based on the positional relationship, determining the grid units to be encrypted in the initial object Cartesian grid; Performing encryption processing on the grid units to be encrypted in the initial object Cartesian grid to obtain a target Cartesian grid; Based on the target Cartesian grid, generating environmental fluid distribution information corresponding to the target object.
2. The method for generating environmental fluid distribution information according to claim 1, wherein The determining the first position information of each surface geometric unit in the surface geometric model in the background Cartesian grid further includes: Obtaining the upper limit coordinate information and the lower limit coordinate information of each surface geometric unit; Determining the first grid arrangement serial number corresponding to the upper limit coordinate information in the background Cartesian grid and the second grid arrangement serial number corresponding to the lower limit coordinate information in the background Cartesian grid; Taking the first grid arrangement serial number and the second grid arrangement serial number corresponding to each surface geometric unit as the first position information corresponding to each surface geometric unit.
3. A method for generating environmental fluid distribution information according to claim 2, characterized in that, The determining the second position information of the grid points of each grid unit in the initial object Cartesian grid in the background Cartesian grid further includes: Obtaining the coordinate information of the grid points of each grid unit; Determining the third grid arrangement serial number corresponding to the coordinate information of the grid points of each grid unit in the background Cartesian grid; Taking the third grid arrangement serial number corresponding to the grid points of each grid unit as the second position information corresponding to the grid points of each grid unit.
4. The method for generating environmental fluid distribution information according to claim 3, characterized in that The determining the associated surface geometric unit of the grid point based on the first position information and the second position information further includes: Determine the grid sorting range of each surface geometric unit in the background Cartesian grid based on the first grid arrangement serial number and the second grid arrangement serial number; Based on the third grid arrangement serial number and the grid sorting range, obtain the associated surface geometric unit of the grid point.
5. A method for generating environmental fluid distribution information according to any one of claims 1 to 3, characterized in that The determining of the grid cells to be encrypted in the initial object Cartesian grid based on the position relationship includes: Use the grid cells with an intersection relationship as the grid cells to be encrypted.
6. A method for generating environmental fluid distribution information according to any one of claims 1 to 3, characterized in that, The encrypting process of the grid cells to be encrypted in the initial object Cartesian grid to obtain the target Cartesian grid includes: Set new grid points in the grid cells to be encrypted to obtain an updated Cartesian grid; Based on the updated Cartesian grid, repeat the steps of determining the first position information of each surface geometric unit in the surface geometric model in the background Cartesian grid and the second position information of the grid points of each grid cell in the initial object Cartesian grid in the background Cartesian grid until, based on the position relationship, the steps of determining the grid cells to be encrypted in the initial object Cartesian grid are satisfied to obtain the target Cartesian grid.
7. An environmental fluid distribution information generation device, characterized in that, Include: A data acquisition module for acquiring the surface geometric model of the target object, the background Cartesian grid corresponding to the surface geometric model, and the initial object Cartesian grid; A position information determination module for determining the first position information of each surface geometric unit in the surface geometric model in the background Cartesian grid, and determining the second position information of the grid points of each grid cell in the initial object Cartesian grid in the background Cartesian grid; And using the grid arrangement serial numbers corresponding to the upper limit coordinate information and the lower limit coordinate information of each surface geometric unit in the background Cartesian grid as the first position information; and using the third grid arrangement serial number corresponding to the grid point of each grid cell in the background Cartesian grid as the second position information; An associated surface geometric unit generation module for determining the associated surface geometric unit of the grid point based on the first position information and the second position information; And obtaining the associated surface geometric unit of the grid point by comparing the third grid arrangement serial number and the grid sorting range of each surface geometric unit in the background Cartesian grid; A position relationship determination module for determining the position relationship between each grid cell and the associated surface geometric unit corresponding to each grid cell; A grid cell to be encrypted generation module for determining the grid cells to be encrypted in the initial object Cartesian grid based on the position relationship; A target Cartesian grid generation module for encrypting the grid cells to be encrypted in the initial object Cartesian grid to obtain the target Cartesian grid; An environmental fluid distribution information generation module for generating the environmental fluid distribution information corresponding to the target object based on the target Cartesian grid; Among them, the position relationship determination module includes: a first position relationship determination unit, configured to determine the position relationship between the grid points corresponding to each grid cell and the associated surface geometric cell of the grid points by using the ray method; a second position relationship determination unit, configured to determine the position relationship between each grid cell and the corresponding associated surface geometric cell according to the position relationship.
8. An electronic device, characterized in that, Comprising: a processor; a memory for storing executable instructions of the processor; Among them, the processor is configured to execute the instructions to implement the environmental fluid distribution information generation method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is enabled to execute the environmental fluid distribution information generation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Self-adaptive Cartesian grid generation method for three-dimensional streaming problem of any shape
CN113505443A
Cartesian grid-based motion simulation method, device and equipment
CN114444215A