A method and device for predicting fluid pressure field
By identifying the boundary type of the grid in the target area file, determining multiple connective domains and utilizing the reference points and pressures of each connective domain, the problem of inaccurate prediction of fluid pressure in the prior art is solved, and higher prediction accuracy is achieved.
Patent Information
- Application Number
- CN202211670441.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-26
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-12-26
AI Technical Summary
In the prior art, the target area containing multiple communication domains can only be predicted based on one reference point and reference pressure, resulting in inaccurate prediction of fluid pressure.
By identifying the boundary types of each grid in the target area file, multiple connecting domains of the target area are determined according to the boundary types of adjacent grids, and the predicted pressure of the target area is determined based on the reference point and reference pressure of each connecting domain.
The accuracy of fluid pressure prediction is improved, and the prediction inaccuracy problem caused by a single reference point in the prior art is solved.
Smart Images

Figure CN115906709B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of fluid mechanics, and in particular to a method and device for predicting a fluid pressure field. Background Art
[0002] In actual engineering, the pressure of a fluid is usually predicted by solving partial differential equations using the finite volume method. The principle of the finite volume method is to discretize the prediction area into a finite number of "grid cells", where the volume of each grid cell is "finitely small" and the "grid cells" are interconnected. In CFD (Computational Fluid Dynamics) software, a common method is to randomly select a reference point within the prediction area where the "grid cells" are interconnected, and specify the reference pressure at that reference point. If the finite number of "grid cells" in the prediction area are not all interconnected, but there are several "grid cells" in the prediction area that form different "connected domains", the fluid pressure in the target area cannot be predicted using a single reference point and reference pressure. Summary of the Invention
[0003] In view of this, the purpose of this application is to provide at least a prediction of a fluid pressure field by identifying the boundary type of each grid in the target area file, determining multiple connected domains of the target area based on the boundary type of adjacent grids, and thereby determining the predicted pressure of the target area based on the reference point and reference pressure of each connected domain. This solves the technical problem in the prior art that the predicted pressure of a target area containing multiple connected domains can only be determined based on one reference point and reference pressure, and achieves the technical effect of improving the accuracy of determining the predicted pressure.
[0004] This application mainly includes the following aspects:
[0005] In a first aspect, an embodiment of the present application provides a method for predicting a fluid pressure field, the prediction method comprising: obtaining a target area file containing the boundary type and label of each grid in the target area; determining multiple connected domains in the target area based on the boundary type between adjacent grids; the boundary type is used to describe whether adjacent grids are connected; determining the label and reference pressure of a reference point in each connected domain; substituting the label and reference pressure corresponding to each connected domain into the pressure Poisson equation to determine the predicted pressure of the target area.
[0006] Optionally, multiple connected domains in the target area are determined based on the boundary type between adjacent grids, including: randomly selecting a grid as a first grid from all grids in the target area file; determining a target connected domain containing the first grid based on the boundary type of the first grid and marking the target connected domain; determining whether the number of grids in the marked target connected domain is the same as the number of grids in the target area; if the number of grids in the marked target connected domain is different from the number of grids in the target area, randomly selecting a second grid that does not belong to the target connected domain in the target area; using the second grid as a new first grid, jumping to determining a target connected domain containing the first grid based on the boundary type of the first grid and marking the target connected domain, and continuing the execution until the number of grids in all marked target connected domains is the same as the number of grids in the target area; and treating all marked target connected domains as multiple connected domains in the target area.
[0007] Optionally, the boundary type includes connected and disconnected. According to the boundary type of the first grid, determining a target connected domain containing the first grid and marking the target connected domain includes: taking the first grid as the target grid; determining whether the target grid has a boundary with a connected boundary type; if the target grid does not have a boundary with a connected boundary type, taking the target grid as the target connected domain containing the first grid and marking the target connected domain.
[0008] Optionally, after determining whether the target grid has a boundary with a connected boundary type, the method further includes: if the target grid has a boundary with a connected boundary type, determining the boundary with a connected boundary type in the target grid as a first boundary; determining a third grid other than the target grid corresponding to the first boundary; determining whether the third grid is a target grid that has appeared before; if the third grid is not a target grid that has appeared before, taking the third grid as a new target grid, jumping to determining whether there is a boundary with a connected boundary type in all boundaries of the target grid and continuing the process until the third grid is a repeated target grid; combining all target grids into a target connected domain as the target connected domain that includes the first grid, and marking the target connected domain.
[0009] Optionally, determining the coordinates and reference pressure of a reference point in each connected domain includes: randomly determining a grid in each connected domain as a reference grid; using the midpoint of the reference grid as the reference point, and using a preset reference pressure as the reference pressure of the reference point.
[0010] Optionally, the boundary type includes non-connectedness, and the method further includes: determining whether the target area file contains a grid with a non-connected boundary type; if the target area file contains a grid with a non-connected boundary type, determining multiple connected domains in the target area based on the boundary types between adjacent grids; if the target area file does not contain a grid with a non-connected boundary type, determining all grids in the target area file as connected domains of the target area.
[0011] Optionally, the method further includes: randomly determining a grid among all grids in the target area as a reference grid; using the midpoint of the reference grid as the reference point, using the label of the reference grid as the label of the reference point, and using the preset reference pressure as the reference pressure of the reference point.
[0012] In the second aspect, an embodiment of the present application also provides a prediction device for a fluid pressure field, the prediction device including: an acquisition module for acquiring a target area file containing the boundary type and label of each grid in the target area; a first determination module for determining multiple connected domains in the target area based on the boundary type between adjacent grids; the boundary type is used to describe whether adjacent grids are connected; a second determination module for determining the label and reference pressure of a reference point in each connected domain; and a third determination module for substituting the label and reference pressure corresponding to each connected domain into the pressure Poisson equation to determine the predicted pressure of the target area.
[0013] In a third aspect, an embodiment of the present application further provides an electronic device comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the fluid pressure field prediction method in the above-mentioned first aspect or any possible implementation scheme of the first aspect.
[0014] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of predicting the fluid pressure field in the above-mentioned first aspect or any possible implementation scheme of the first aspect are executed.
[0015] The embodiment of the present application provides a method and device for predicting a fluid pressure field, wherein the method includes: obtaining a target area file containing the boundary type and label of each grid in the target area; determining multiple connected domains in the target area based on the boundary type between adjacent grids; the boundary type is used to describe whether adjacent grids are connected; determining the label and reference pressure of a reference point of each connected domain; substituting the label and reference pressure corresponding to each connected domain into the pressure Poisson equation to determine the predicted pressure of the target area. The present application identifies the boundary type of each grid in the target area file, determines multiple connected domains of the target area based on the boundary type of the adjacent grids, and thus determines the predicted pressure of the target area based on the reference point and reference pressure of each connected domain, thereby solving the technical problem in the prior art that the predicted pressure of a target area containing multiple connected domains can only be determined based on one reference point and reference pressure, thereby achieving the technical effect of improving the accuracy of determining the predicted pressure.
[0016] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 A flow chart of a method for predicting a fluid pressure field provided in an embodiment of the present application is shown.
[0019] Figure 2 A flow chart of another method for predicting fluid pressure field provided in an embodiment of the present application is shown.
[0020] Figure 3 One of the schematic diagrams of the target area provided in the embodiment of the present application is shown.
[0021] Figure 4 The second schematic diagram shows the target area provided in the embodiment of the present application.
[0022] Figure 5 The third schematic diagram shows the target area provided in the embodiment of the present application.
[0023] Figure 6 A fourth schematic diagram of the target area provided in an embodiment of the present application is shown.
[0024] Figure 7A functional module diagram of a fluid pressure field prediction device provided in an embodiment of the present application is shown.
[0025] Figure 8 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of illustration and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts can be implemented out of sequence, and steps without logical context can be reversed or implemented simultaneously. In addition, those skilled in the art, under the guidance of the contents of this application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.
[0027] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.
[0028] In the prior art, a prediction region including multiple connected domains is still predicted using one reference point and reference pressure, resulting in an inability to obtain the predicted fluid pressure.
[0029] Based on this, the embodiments of the present application provide a method and apparatus for predicting a fluid pressure field. By identifying the boundary types of each grid in a target area file, multiple connected domains of the target area are determined based on the boundary types of adjacent grids, and the predicted pressure of the target area is determined based on the reference point and reference pressure of each connected domain. This solves the technical problem in the prior art of inaccurate or unpredictable pressure prediction for a target area containing multiple connected domains based on only one reference point and reference pressure, thereby achieving the technical effect of improving the accuracy of determining the predicted pressure. The details are as follows:
[0030] See also Figure 1 , Figure 1 This is a flow chart of a method for predicting a fluid pressure field provided in an embodiment of the present application. Figure 1 As shown, the method for predicting the fluid pressure field provided in the embodiment of the present application includes the following steps:
[0031] S101: Acquire a target region file containing the boundary type and label of each grid in the target region.
[0032] That is, a target region file is obtained, which contains the boundary type of each grid in the target region, the total number of boundaries in the target region, and the label of each grid. The target region here is the fluid pressure field.
[0033] The boundary type describes whether adjacent meshes are connected. Boundary types include connected and disconnected. A mesh boundary refers to the contact area between adjacent meshes within the target region. For each mesh in the target region, if at least one boundary in that mesh is not connected to any other mesh outside of that mesh, it is considered a boundary mesh in the target region.
[0034] For example, see Figure 2 , Figure 2 This is a schematic diagram of the target area provided in the embodiment of the present application. Figure 2 As shown, the target area contains 24 grids. The grids numbered 1, 2, 3, 4, 5, 9, 13, 17, 8, 12, 16, 20, 21, 22, 23, and 24 are the boundary grids of the target area. The grid numbered 1 is abbreviated as grid 1, and the subsequent grids are abbreviated in the same way. Taking grid 1 as an example, grid 1 is adjacent to grid 2 and grid 5. It is considered that grid 1 has only two boundaries. The target area file includes: grid 1 has two boundaries, and the boundary type of each boundary is connected. Taking grid 6 as an example, grid 6 is adjacent to grid 2, grid 5, grid 7, and grid 10, so grid 6 has 4 boundaries. The target area file includes: grid 6 has 4 boundaries, one boundary type is disconnected, and the boundary type of three boundaries is connected.
[0035] S102: Determine multiple connected domains in the target area based on the boundary types between adjacent grids.
[0036] The method comprises the following steps: randomly selecting a grid as a first grid from all grids in the target area file; determining a target connected domain including the first grid according to the boundary type of the first grid and marking the target connected domain; determining whether the number of grids in the marked target connected domain is the same as the number of grids in the target area; if the number of grids in the marked target connected domain is different from the number of grids in the target area, randomly selecting a second grid that does not belong to the target connected domain in the target area; using the second grid as a new first grid, jumping to determining a target connected domain including the first grid according to the boundary type of the first grid and marking the target connected domain, and continuing the process until the number of grids in all marked target connected domains is the same as the number of grids in the target area; and treating all marked target connected domains as the multiple connected domains in the target area.
[0037] For example, Figure 2 As shown in the figure, if the first grid is grid 1, it is determined that the connected domain containing grid 1 is composed of all grids in the target area except grid 10 and grid 11; the connected domain containing grid 1 is marked as the first connected domain, there are 22 grids in the first connected domain, and it is determined that the number of grids in the first connected domain is less than the number of grids in the target area, then any grid that does not belong to the first connected domain is selected in the target area as grid 10; grid 10 is used as the new first grid, and the connected domain containing grid 10 is determined to be composed of grid 10 and grid 11 in the target area; grid 10 and grid 11 are combined and marked as the second connected domain; it is determined that the sum of the number of grids in the first connected domain and the second connected domain is equal to the number of grids in the target area, then the first connected domain and the second connected domain are regarded as multiple connected domains in the target area.
[0038] Determining a target connected domain containing the first grid and marking the target connected domain according to a boundary type of the first grid includes: taking the first grid as a target grid; determining whether the target grid has a boundary with a connected boundary type; if the target grid does not have a boundary with a connected boundary type, taking the target grid as a target connected domain containing the first grid and marking the target connected domain.
[0039] That is, the first grid is used as the target grid. If the boundary types of all boundaries of the target grid are non-connected, the target grid is used as a connected domain of the target area and the connected domain is marked.
[0040] After determining whether the target grid has a boundary with a connected boundary type, the method further includes: if the target grid has a boundary with a connected boundary type, determining the boundary with a connected boundary type in the target grid as a first boundary; determining a third grid other than the target grid corresponding to the first boundary; determining whether the third grid is a target grid that has appeared before; if the third grid is not a target grid that has appeared before, using the third grid as a new target grid, jumping to determining whether there are boundaries with a connected boundary type among all boundaries of the target grid and continuing the process until the third grid is a repeated target grid; and combining all target grids into a target connected domain as the target connected domain that includes the first grid, and marking the target connected domain.
[0041] For example, Figure 2 As shown in the figure, if grid 1 is the first randomly selected grid, grid 1 is used as the target grid. It is determined that the target grid has two connected boundaries: the boundary adjacent to grid 5 and the boundary adjacent to grid 2. Grids 5 and 2 are then determined as the third grids. It is determined that grids 5 and 2 do not overlap with grid 1. Grids 5 and 2 are then used as new target grids. The third grids corresponding to grid 5 and grid 2 are determined. The third grids corresponding to grid 5 are grid 6 and grid 9, and the third grids corresponding to grid 2 are grid 6 and grid 3. Grids 6, 9, and 3 do not overlap with grid 5, grid 2, and grid 1. Grids 6, 9, and 3 are used as new target grids. The query is stopped until the third grid has appeared as a target grid. All target grids are combined into the first connected domain containing grid 1.
[0042] Exemplarily, the number of grids in the target connected domain including grid 1 is different from the number of grids in the target area, and thus grid 10 is determined to be the new first grid, grid 10 is used as the target grid, and it is determined that grid 10 contains one boundary with a connected boundary type; the third grid corresponding to grid 10 is determined to be grid 11, grid 11 and grid 10 are not repeated, and thus grid 11 is used as the new target grid, and it is determined that grid 11 contains one boundary with a connected boundary type; the third grid corresponding to grid 11 is determined to be grid 10, and grid 10 is a target grid that has appeared, and the query is stopped, and all target grids, namely grids 10 and 11, are combined into a second connected domain including grid 10.
[0043] S103: Determine the label and reference pressure corresponding to a reference point in each connected domain.
[0044] Determining the coordinates and reference pressure of a reference point in each connected domain includes: randomly determining a grid in each connected domain as a reference grid; using the midpoint of the reference grid as the reference point, using the number of the reference grid as the number of the reference point, and using a preset reference pressure as the reference pressure of the reference point.
[0045] The preset reference pressure can be set by the user or a preset pressure value specified in the CFD software.
[0046] In other words, the user can randomly select a grid in each connected domain as the reference grid; use the midpoint of the reference grid as the reference point, the reference grid number as the number corresponding to the reference point, and the preset reference pressure set by the user as the reference pressure of the reference point. Alternatively, the CFD software can randomly select a grid in each connected domain as the reference grid; use the midpoint of the reference grid as the reference point, the reference grid number as the number corresponding to the reference point, and the preset pressure value in the CFD software as the reference pressure of the reference point.
[0047] S104: Substitute the label and reference pressure corresponding to each connected domain into the pressure Poisson equation to determine the predicted pressure of the target area.
[0048] (1)
[0049] (2)
[0050] (3)
[0051] Formula (1) to Formula (3) are Navier-Stokes equations, Formula (1) is the continuity equation, Formula (2) is the momentum conservation equation, and Formula (3) is the energy conservation equation.
[0052] In formula (1) to formula (3), is the fluid density in the target area, For time, is the fluid velocity in the target area, is the fluid pressure in the target area, is the first fluid viscosity coefficient in the target area, is the fluid temperature in the target area, is the second fluid viscosity coefficient of the target area and , is the acceleration due to gravity, is the total enthalpy of the target region and , is the fluid enthalpy in the target area, For kinetic energy and , is the thermal diffusivity of the fluid in the target area, is the fluid stress tensor in the target area.
[0053] When the target region is incompressible, the fluid density in the target region is constant. For most incompressible cases, the energy conservation equation is usually not necessary, so the Navier-Stokes equations can be simplified to:
[0054] (4)
[0055] (5)
[0056] In formula (4) and formula (5), is the kinematic viscosity coefficient of the target area and .
[0057] In formula (4) and formula (5), the unknown quantity is and , are both in the momentum equation. Compared to the compressible continuity equation, the incompressible continuity equation, Equation (4), becomes a velocity constraint and cannot be directly solved to obtain the fluid density. Therefore, in order to solve it, it is necessary to write it in the form of Laplace's equation, that is, the pressure Poisson equation.
[0058] The Poisson equation for pressure is:
[0059] (6)
[0060] In formula (6), is the first coefficient of the pressure Poisson equation, is the second coefficient of the pressure Poisson equation, n is the number of grids in the target area, Refers to the pressure of the grid labeled n in the target area.
[0061] That is to say, after determining the label and reference pressure corresponding to the reference point, the predicted pressure of each grid in the target area can be obtained according to the pressure Poisson equation, and the predicted pressure of each grid is used as the predicted pressure of the target area.
[0062] The method further includes: determining whether the target area file contains a grid with a non-connected boundary type; if the target area file contains a grid with a non-connected boundary type, determining multiple connected domains in the target area based on the boundary types between adjacent grids; if the target area file does not contain a grid with a non-connected boundary type, determining all grids in the target area file as connected domains in the target area.
[0063] That is, if no grid in the target region file contains a boundary with a non-connected boundary type, it is considered that there are no multiple connected domains in the target region, and all grids in the target region are combined as one connected domain.
[0064] The method also includes: randomly determining a grid among all grids in the target area as a reference grid; using the midpoint of the reference grid as the reference point, using the number of the reference grid as the number of the reference point, and using a preset reference pressure as the reference pressure of the reference point.
[0065] In other words, if the target area contains only one connected domain, the user randomly selects a grid from all the grids in the target area as the reference grid; the midpoint of the reference grid is used as the reference point, the grid number is used as the reference point number, and the user-set preset reference pressure is used as the reference pressure of the reference point. Alternatively, the CFD software randomly selects a grid from all the grids in the target area as the reference grid; the midpoint of the reference grid is used as the reference point, the grid number is used as the reference point number, and the CFD software's preset pressure value is used as the reference pressure of the reference point.
[0066] When calculating the pressure at the boundary of the target area, different boundary conditions are defined, which are generally divided into the first type of boundary conditions and the second type of boundary conditions. The first type of boundary condition is the pressure value at the specified boundary, or the boundary is a specified pressure boundary, that is, the specified , is the pressure value of the grid numbered i at the boundary of the target area. The second type of boundary condition is to specify the pressure derivative value at the boundary. Taking the pressure Poisson equation as an example, specify ,in Refers to the normal gradient of the pressure of grid i toward the preset x-axis direction, Refers to the normal gradient of the pressure of grid i toward the preset y-axis direction, Refers to the normal gradient of the pressure of grid i toward the preset z-axis direction, Refers to the preset normal gradient in the preset x-axis direction, Refers to the preset normal gradient in the preset y-axis direction, Refers to the preset normal gradient in the preset z-axis direction. The boundary conditions of all boundaries of the target area can be first-class boundary conditions, second-class boundary conditions, or both first-class and second-class boundary conditions.
[0067] When solving the pressure Poisson equation, if all boundary conditions are second-class boundary conditions, the equation cannot be uniquely solved. Wall conditions are a common example in CFD. In this case, it is necessary to select a reference point within the calculation domain and specify the reference pressure at that point.
[0068] There are several typical situations in the target area. For example, see Figure 3 , Figure 3 is one of the schematic diagrams of the target area. Figure 3As shown, the target areas are all connected together, the boundary types of all grids in the target area file are connected, and the target area has more than one boundary condition of the first type of boundary condition, that is, the boundary corresponding to p1, p1=p ambient , p ambient The reference pressure can be the ambient pressure or the user-specified pressure. In this case, there is no need to specify the reference point and reference pressure.
[0069] For example, see Figure 4 , Figure 4 This is the second schematic diagram of the target area. Figure 4 As shown, the target area is connected, and the boundary type of all meshes in the target area file is connected. The boundary conditions of all boundaries of the target area are second-class boundary conditions. In this case, the target area is considered a connected domain. You need to specify a reference point and a reference pressure at that reference point to calculate the pressure Poisson equation. For example, the black dot pointed to by p2 is the reference point, and p2 is the reference pressure.
[0070] See also Figure 5 , Figure 5 This is the third schematic diagram of the target area, as shown in Figure 5 As shown, the target area has more than one boundary condition, which is the specified pressure boundary condition, that is, the boundary corresponding to p3, p3=p ambient , p ambient The pressure is the ambient pressure or the pressure specified by the user. However, there is at least one connected domain surrounded by the second type of boundary conditions inside the target area, and the connected domain is not connected to the fluid outside the connected domain. In this case, it is necessary to specify the reference point and reference pressure in each connected domain, such as p 31 The black dot pointed to is the reference point, p 31 is the reference pressure.
[0071] For example, see Figure 6 , Figure 6 This is the fourth schematic diagram of the target area, such as Figure 6 As shown, the boundary conditions of all boundaries of the target area are walls or second-type boundary conditions. At the same time, there is at least one connected domain surrounded by the second-type boundary condition inside the target area, and the connected domain is not connected to the fluid outside the connected domain. In this case, it is necessary to specify a reference point and reference pressure in each connected domain, such as p 41 The black dot pointed to is the reference point, p 41 The part outside the connected domain that belongs to the target area is also a connected domain and also needs to specify the reference point and reference pressure, for example, p 42 The black dot pointed to is the reference point, p 42 is the reference pressure.
[0072] This application defaults the boundary conditions of all boundaries of the target area to walls or second-class boundary conditions, that is, the boundary conditions of the boundaries of the target area are not considered. The boundaries of the target area correspond to boundary conditions, which are divided into first-class boundary conditions and second-class boundary conditions; the boundaries of all grids in the target area correspond to boundary types, which are divided into connected and non-connected.
[0073] Based on the same application concept, the embodiments of the present application also provide a fluid pressure field prediction device corresponding to the fluid pressure field prediction method provided in the above embodiments. Since the principle of solving the problem by the device in the embodiments of the present application is similar to the fluid pressure field prediction method in the above embodiments of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0074] like Figure 7 As shown, Figure 7 This is a functional module diagram of a fluid pressure field prediction device provided in an embodiment of the present application. The fluid pressure field prediction device 10 includes: an acquisition module 101 , a first determination module 102 , a second determination module 103 , and a third determination module 104 .
[0075] An acquisition module 101 is used to obtain a target area file containing the boundary type and label of each grid in the target area; a first determination module 102 is used to determine multiple connected domains in the target area based on the boundary type between adjacent grids; the boundary type is used to describe whether adjacent grids are connected; a second determination module 103 is used to determine the label and reference pressure of a reference point in each connected domain; and a third determination module 104 is used to substitute the label and reference pressure corresponding to each connected domain into the pressure Poisson equation to determine the predicted pressure of the target area.
[0076] Based on the same application concept, see Figure 8 As shown, it is a structural diagram of an electronic device provided in an embodiment of the present application, the electronic device 20 includes: a processor 201, a memory 202 and a bus 203, the memory 202 stores machine-readable instructions executable by the processor 201, when the electronic device 20 is running, the processor 201 and the memory 202 communicate through the bus 203, and the machine-readable instructions are executed by the processor 201 when running to perform the steps of the fluid pressure field prediction method as described in any of the above embodiments.
[0077] Specifically, when the machine-readable instructions are executed by the processor 201, the following processing can be performed: obtaining a target area file containing the boundary type and label of each grid in the target area; determining multiple connected domains in the target area based on the boundary type between adjacent grids; the boundary type is used to describe whether adjacent grids are connected; determining the label and reference pressure of a reference point in each connected domain; substituting the label and reference pressure corresponding to each connected domain into the pressure Poisson equation to determine the predicted pressure of the target area.
[0078] Based on the same application concept, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, the steps of the fluid pressure field prediction method provided in the above embodiment are executed.
[0079] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, it can execute the above-mentioned fluid pressure field prediction method, by identifying the boundary type of each grid in the target area file, and determining multiple connected domains of the target area according to the boundary type of the adjacent grids, thereby determining the predicted pressure of the target area according to the reference point and reference pressure of each connected domain, solving the technical problem in the prior art that the predicted pressure of a target area containing multiple connected domains can only be determined based on one reference point and reference pressure, and achieving the technical effect of improving the accuracy of determining the predicted pressure.
[0080] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0081] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple grid units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0082] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0083] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or grid device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0084] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A method for predicting fluid pressure field, characterized in that: The prediction method comprises: Get the target area file containing the boundary type and label of each grid in the target area; Determining multiple connected domains in the target area based on the boundary type between adjacent grids; the boundary type is used to describe whether adjacent grids are connected; Determine the label and reference pressure of a reference point in each connected domain; Substituting the label and the reference pressure corresponding to each connected domain into the pressure Poisson equation to determine the predicted pressure of the target area; The step of determining the multiple connected domains in the target area based on the boundary types between adjacent grids includes: Randomly selecting a grid from all grids in the target area file as a first grid; Determining a target connected domain including the first grid according to a boundary type of the first grid and marking the target connected domain; Determine whether the number of grids in the marked target connected domain is the same as the number of grids in the target area; If the number of grids in the marked target connected domain is different from the number of grids in the target area, randomly selecting a second grid in the target area that does not belong to the target connected domain; Using the second grid as a new first grid, jumping to the target connected domain containing the first grid based on the boundary type of the first grid, marking the target connected domain, and continuing the process until the number of grids in all marked target connected domains is the same as the number of grids in the target area; Taking all marked target connected domains as multiple connected domains in the target area; The boundary type includes connected and disconnected, and determining a target connected domain including the first grid and marking the target connected domain according to the boundary type of the first grid includes: Using the first grid as the target grid; Determine whether the target grid has a boundary with a connected boundary type; If the target grid does not have a boundary with a connected boundary type, the target grid is used as a target connected domain containing the first grid and the target connected domain is marked; After determining whether the target grid has a boundary with a connected boundary type, the method further includes: If the target grid has a boundary with a connected boundary type, determining the boundary with a connected boundary type in the target grid as a first boundary; determining a third grid other than the target grid corresponding to the first boundary; Determining whether the third grid is the target grid that has appeared; If the third grid is not the target grid that has appeared before, the third grid is used as a new target grid, and the process jumps to determining whether there is a connected boundary among all boundaries of the target grid, and the process continues until the third grid is a repeated target grid. All target grids are combined into a target connected domain as the target connected domain including the first grid, and the target connected domain is marked.
2. The method according to claim 1, characterized in that Determining the coordinates and reference pressure of a reference point in each connected domain includes: A grid is randomly determined in each connected domain as a reference grid; The midpoint of the reference grid is used as the reference point, the number of the reference grid is used as the number of the reference point, and the preset reference pressure is used as the reference pressure of the reference point.
3. The method according to claim 1, characterized in that The boundary type includes non-connected, and the method further includes: Determine whether the target region file contains a grid with a non-connected boundary type; If the target area file contains grids with a non-connected boundary type, multiple connected domains in the target area are determined based on the boundary types between adjacent grids; If the target region file does not contain any grid with a non-connected boundary type, all grids in the target region file are determined as connected domains of the target region.
4. The method according to claim 3, characterized in that After determining all grids in the target region file as connected domains of the target region, the method further includes: Randomly determine a grid among all grids in the target area as a reference grid; The midpoint of the reference grid is used as the reference point, the number of the reference grid is used as the number of the reference point, and the preset reference pressure is used as the reference pressure of the reference point.
5. A device for predicting fluid pressure field, characterized in that: The prediction device comprises: An acquisition module, used for acquiring a target region file containing a boundary type and a label of each grid in the target region; A first determining module is configured to determine a plurality of connected domains in the target area based on boundary types between adjacent grids; the boundary types are used to describe whether adjacent grids are connected; A second determining module is used to determine the label and reference pressure of a reference point in each connected domain; a third determining module, configured to substitute the label and the reference pressure corresponding to each connected domain into a pressure Poisson equation to determine a predicted pressure of a target area; The first determination module is further configured to randomly select a grid as a first grid from all grids in the target area file; determine a target connected domain containing the first grid based on a boundary type of the first grid and mark the target connected domain; determine whether the number of grids in the marked target connected domain is the same as the number of grids in the target area; if the number of grids in the marked target connected domain is different from the number of grids in the target area, randomly select a second grid in the target area that does not belong to the target connected domain; use the second grid as a new first grid, jump to determining a target connected domain containing the first grid based on a boundary type of the first grid and mark the target connected domain, and continue executing until the number of grids in all marked target connected domains is the same as the number of grids in the target area; and regard all marked target connected domains as multiple connected domains in the target area; The boundary type includes connected and disconnected. The first determining module is further configured to use the first grid as a target grid; determine whether the target grid has a boundary of a connected boundary type; if the target grid does not have a boundary of a connected boundary type, use the target grid as a target connected domain containing the first grid and mark the target connected domain; The first determination module is further configured to: if the target grid has a boundary with a connected boundary type, determine the boundary with a connected boundary type in the target grid as a first boundary; determine a third grid other than the target grid corresponding to the first boundary; determine whether the third grid is a target grid that has appeared before; if the third grid is not a target grid that has appeared before, use the third grid as a new target grid, jump to determining whether there is a boundary with a connected boundary type among all boundaries of the target grid, and continue executing until the third grid is a repeated target grid; combine all target grids into a target connected domain as a target connected domain that includes the first grid, and mark the target connected domain.
6. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate through the bus. When the processor is running, the machine-readable instructions execute the steps of the fluid pressure field prediction method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for predicting the fluid pressure field according to any one of claims 1 to 4 are executed.
Citation Information
Patent Citations
Pressure field determination method and device
CN112560326A
Structured grid generation method and device, equipment and storage medium
CN114818224A