Accelerated iterative simulation method for HVAC airflow organization based on multi-grid method
Through an accelerated iterative simulation method based on the multi-grid method, combined with hierarchical half-side conversion and non-fitting and fitting grids, the problems of low computational efficiency and limited accuracy of HVAC organization simulation in the prior art are solved, and efficient and accurate simulation results are achieved.
Patent Information
- Application Number
- CN202411010433.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-07-26
AI Technical Summary
The existing HVAC tissue simulation methods have low computational efficiency, complex grid generation, difficult processing of boundary conditions, limited simulation accuracy, and difficult to meet the needs of rapid design and optimization.
The accelerated iterative simulation method based on the multi-grid method is adopted to generate half-side structure data through hierarchical half-side transformation, combine non-fitting and fitting grids, establish non-linear partial differential equations, and solve them using the multi-grid method to generate simulation results.
It improves the accuracy of simulation results, reduces calculation time, simplifies grid generation and adjustment complexity, and improves the efficiency of data processing and simulation modeling.
Smart Images

Figure CN118940521B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of HVAC airflow organization simulation, and more specifically to an accelerated iterative simulation method for HVAC airflow organization based on a multi-grid method. Background Art
[0002] In modern building design and HVAC system optimization, the simulation of airflow organization is a crucial link. Traditional airflow simulation methods have problems such as large amount of calculation, long time consumption and limited accuracy, which can hardly meet the needs of rapid design and optimization. The existing airflow simulation methods have the following main shortcomings: low computational efficiency, especially under high-resolution grids, the calculation time increases significantly; complex grid generation, especially when dealing with complex geometric structures, requires a lot of manual adjustments; boundary conditions are difficult to handle and prone to errors; limited simulation accuracy, it is difficult to fully reflect the actual airflow distribution.
[0003] For example, a Chinese patent with authorization announcement number CN109933814B discloses an air conditioning air flow directivity simulation method, including: creating an air conditioning three-dimensional surface mesh model based on air flow directivity; determining whether the air conditioning three-dimensional surface mesh model based on air flow directivity has the same components as a predefined basic surface mesh model; in response to the air conditioning three-dimensional surface mesh model based on air flow directivity having at least all the components in the basic surface mesh model, generating an air conditioning three-dimensional volume mesh model based on air flow directivity; obtaining boundary condition setting information; judging whether the boundary condition setting information conforms to a predefined basic boundary condition model corresponding to the basic surface mesh model, setting an air conditioning air flow directivity calculation model and parameters related to the air conditioning air flow directivity calculation model in response to the boundary condition setting information conforming to the basic boundary condition model, and performing calculations to obtain results related to the air conditioning air flow directivity.
[0004] The above method has the problems existing in the background technology. In order to overcome the above shortcomings, a HVAC airflow organization simulation method should be developed to improve the accuracy of the simulation results and reduce the calculation time. Summary of the invention
[0005] In view of the shortcomings of the prior art, the purpose of the present invention is to provide an accelerated iterative simulation method for HVAC airflow organization based on a multi-grid method, which is used to construct half-edge structure data, and utilize the multi-grid method to solve the nonlinear partial differential equations of the target HVAC system to complete the accelerated iterative simulation of the target HVAC system.
[0006] In a first aspect, an embodiment of the present disclosure provides an accelerated iterative simulation method for HVAC airflow organization based on a multi-grid method, comprising:
[0007] Obtaining system information and the first three-dimensional model of the target HVAC system;
[0008] Based on the first three-dimensional model, hierarchical half-edge conversion is performed to generate half-edge structure data;
[0009] generating a non-fitting mesh based on the first three-dimensional model and the half-edge structure data, and simultaneously or subsequently generating a fitting mesh based on the first three-dimensional model and the half-edge structure data;
[0010] Based on the system information, non-fitting grids and fitting grids, a nonlinear partial differential equation of the target HVAC system is established, and a multi-grid method is used to solve the equation to generate a simulation result of the target HVAC system.
[0011] As an optional implementation manner, performing hierarchical half-edge conversion based on the first three-dimensional model to generate half-edge structure data includes:
[0012] Preprocessing the first three-dimensional model;
[0013] A data structure defining the half-edge structure data includes: vertices, half-edges, edges, faces, and airflow paths;
[0014] Extracting a target airflow path from the first three-dimensional model, and recording each key node and connection relationship in the target airflow path;
[0015] Based on the target airflow path, the target three-dimensional model is divided into a plurality of sub-grids, wherein each sub-grid represents an independent airflow segment;
[0016] Extracting polygonal faces from each of the sub-networks, and recording vertex information on each polygonal face;
[0017] For each of the polygonal faces, based on the vertex information, traverse each vertex of the polygonal face, generate corresponding half-edges, and set link relationships between the half-edges;
[0018] After all the half-edges of the first three-dimensional model are generated, the relative half-edge of each half-edge is matched to generate half-edge structure data.
[0019] As an optional implementation manner, performing hierarchical half-edge conversion based on the first three-dimensional model to generate half-edge structure data further includes:
[0020] An airflow path object is created for each of the airflow paths, and a starting point and an end point of each of the airflow paths are recorded.
[0021] Based on the system information, defining a system layer of the target HVAC system;
[0022] For the target HVAC system layer, create a device layer based on the system information;
[0023] For each of the device layers, create a path layer;
[0024] Based on the airflow path object of each of the airflow paths, each of the airflow paths is added to a path layer corresponding to the airflow path object.
[0025] As an optional implementation manner, dividing the target three-dimensional model into a plurality of sub-grids includes:
[0026] Using a first edge detection method on the first three-dimensional model to determine boundary information of each HVAC component in the target HVAC system;
[0027] Determine the geometric features and connection points of each HVAC component in the target HVAC system based on the boundary information of each HVAC component;
[0028] Based on the geometric features and connection points of each of the HVAC components, the target three-dimensional model is divided into a plurality of sub-grids.
[0029] As an optional implementation manner, the system information includes: material properties; the first edge detection method includes:
[0030] Before the edge detection, calculating the local area statistical characteristics of the three-dimensional model;
[0031] Based on the local area statistical characteristics and the material characteristics, dynamically adjusting a high threshold for detecting a strong edge and a low threshold for detecting a weak edge;
[0032] The calculating of the local area statistical characteristics of the three-dimensional model comprises:
[0033] Calculate the mean μ on the 3D model using the sliding window method local and standard deviation σ local , the calculation formula is:
[0034]
[0035] Among them, μ local (x, y, z) is the local mean, which represents the average value of the pixel intensity in the sliding window centered at point (x, y, z), σ local (x, y, z) represents the discrete intensity of the pixel intensity in the window centered at point (x, y, z), N is the number of pixels in the sliding window, l is the image intensity value, and i, j, and k are the offsets of the sliding window in the x, y, and j directions, respectively;
[0036] Based on the local statistical characteristics, the high threshold T is dynamically adjusted. high and low threshold T low The calculation formula is:
[0037] T high (x, y, z) = μ local (x, y, z)+k high ·σ local (x, y, z)
[0038] T low (x, y, z) = μ local (x, y, z)-k low ·σ local (x, y, z)
[0039] Among them, k high and k low It is an adjustment parameter set according to the material characteristics of the system.
[0040] As an optional implementation manner, the generating a non-fitting mesh based on the first three-dimensional model and the half-edge structure data, and simultaneously or thereafter, generating a fitting mesh based on the first three-dimensional model and the half-edge structure data comprises:
[0041] Based on the first three-dimensional model and the half-edge structure data, an initial non-fitting mesh is generated using a preset mesh unit; wherein the geometry and topological relationship of the initial non-fitting mesh are determined based on the half-edge structure data;
[0042] Based on the initial non-fitting grid, the grid is gradually refined, and the positions of grid cells in the non-fitting grid are adjusted by using the half-edge structure data during each refinement to generate a plurality of non-fitting grids with higher resolutions;
[0043] Based on the first three-dimensional model and the half-edge structure data, generating an initial fitting grid;
[0044] Based on the initial fitted grid, the mesh is refined step by step, and the positions of the mesh units in the fitted grid are adjusted using the half-edge structure data during each refinement to generate a plurality of fitted grids with higher resolutions.
[0045] As an optional implementation manner, the establishing of the nonlinear partial differential equation of the target HVAC system based on the system information, the non-fitting grid and the fitting grid includes:
[0046] Based on the system information, determining a simulation target of the target HVAC system;
[0047] Based on the simulation target of the target HVAC system, the type of nonlinear partial differential equation that needs to be established and solved is determined.
[0048] As an optional implementation, the method of using a multi-grid method to solve and generate simulation results of the target HVAC system includes:
[0049] Decomposing the nonlinear differential equation into a plurality of linear equations;
[0050] Based on the system information, determining initial conditions and boundary conditions of the target HVAC system;
[0051] Using a high-order interpolation method, the initial conditions and boundary conditions of the target HVAC system are interpolated to each node of the initial non-fitting grid, and the linear equation is solved to generate an initial solution;
[0052] Interpolating the initial solution into the initial fitted grid by a first interpolation method, and performing iterative calculation on the initial fitted grid;
[0053] In response to the iterative calculation result reaching a preset termination condition, the equation solution is output as the first simulation result.
[0054] As an optional implementation, the using of a multi-grid method to solve and generate the simulation result of the target HVAC system further includes:
[0055] The resolution of each level of grid in the non-fitting grid corresponds one-to-one to the resolution of each level of grid in the fitting grid;
[0056] Solving the linear equations based on each level of grid in the non-fitting grid;
[0057] Interpolate the solutions of each level of the non-fitting grid into the fitting grid of the corresponding resolution;
[0058] Iteratively solving the linear equation using each level of grid in the fitted grid after interpolation;
[0059] In response to completion of iterative solution of the highest level grid in the fitted grid, a solution of the highest level grid is output as a simulation result of the target HVAC system.
[0060] As an optional implementation manner, the iteratively solving the linear equation using each level of the interpolated fitted grid includes:
[0061] For the initial solution of each level of grids other than the non-initial fitting grids in the fitting grids, the error is calculated and corrected based on the solution of the previous level of grids in the fitting grids.
[0062] The beneficial effects of the present invention are as follows: through the multi-grid method combining coarse and fine grids, the initial solution of the coarse grid is used as the initial guess of the fine grid, which reduces the number of iterations of the fine grid and improves the simulation speed. The hierarchical half-edge conversion and structured data processing methods simplify the complexity of grid generation and adjustment, and improve the efficiency of data processing and simulation modeling. The dynamic threshold adjustment and local adaptive method enable the simulation process to better adapt to the characteristics of different materials and regions, improve the accuracy of the simulation results, and reduce the calculation time. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 A flowchart of a method for accelerating iterative simulation of HVAC airflow organization based on a multi-grid method provided in an embodiment of the present disclosure;
[0064] Figure 2 A flowchart of a hierarchical half-edge conversion method provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure is not intended to limit the scope of the present disclosure claimed for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0066] See also Figure 1 , Figure 1 The present invention is a flow chart of the accelerated iterative simulation method of HVAC airflow organization based on the multi-grid method.
[0067] Among them, HVAC airflow organization refers to the flow and distribution of air in the HVAC system to achieve effective ventilation, heating, cooling and air purification. The goal of airflow organization design is to ensure the comfort, health and energy efficiency of indoor space through reasonable air distribution. Specifically, HVAC airflow organization includes the path design of supply air, return air, exhaust air and fresh air, the control of airflow speed and temperature, and the guarantee of airflow uniformity and stability.
[0068] The HVAC airflow organization accelerated iterative simulation method based on the multi-grid method of the present invention can be applied to the design and optimization of HVAC systems of various types of buildings. The method includes steps S101 to S104:
[0069] S101, obtaining system information and a first three-dimensional model of a target HVAC system;
[0070] S102, performing hierarchical half-edge conversion based on the first three-dimensional model to generate half-edge structure data;
[0071] S103, generating a non-fitting mesh based on the first three-dimensional model and the half-edge structure data, and simultaneously or subsequently generating a fitting mesh based on the first three-dimensional model and the half-edge structure data;
[0072] S104: Based on the system information, the non-fitting grid and the fitting grid, a nonlinear partial differential equation of the target HVAC system is established, and a multi-grid method is used to solve the equation to generate a simulation result of the target HVAC system.
[0073] In the specific implementation, in the process of realizing the simulation of the target HVAC system, it is first necessary to obtain the detailed information of the system and the first three-dimensional model. This can be done by exporting the three-dimensional model of the HVAC system from BIM (Building Information Modeling) software or other three-dimensional design tools, and extracting relevant system information, such as duct path, vent location, equipment parameters, etc. Next, hierarchical half-edge conversion is performed based on the three-dimensional model to generate corresponding half-edge structure data. In this process, through geometric and topological analysis, the geometric bodies in the three-dimensional model are decomposed into basic units such as vertices, half-edges, edges and faces, and this information is stored through the half-edge data structure. The half-edge structure can clearly represent the topological relationship of the geometric body, which is helpful for the geometric processing and topological operations of the subsequent mesh generation and solution process. Then, the generated half-edge structure data and the three-dimensional model are used to generate a non-fitting mesh, and a fitting mesh is generated at the same time or later. When generating a non-fitting mesh, a tetrahedron or regular hexahedron mesh generation algorithm, such as Delaunay triangulation or Voronoi diagram generation, can be used to divide the three-dimensional space into a preliminary mesh structure. Subsequently, a fitted grid is generated based on the three-dimensional model and half-edge structure data to ensure that the grid strictly follows the geometric boundaries. Based on the obtained system information, the generated non-fitting grid and the fitted grid, the nonlinear partial differential equation of the target HVAC system is established. The physical characteristics and operating conditions of the system can be converted into a mathematical model using the basic equations of fluid mechanics and thermodynamics, such as the Navier-Stokes equation and the energy equation. By combining the multi-grid method for solution, the solution of the coarse grid is used as the initial guess of the fine grid to improve the efficiency and accuracy of the solution. Finally, the simulation results show the key performance parameters of the target HVAC system, such as airflow distribution, temperature field and pressure field, providing a basis for system design optimization and operation control.
[0074] Among them, non-fitting mesh means that the edges and faces of the mesh units do not need to be strictly aligned with the boundaries of the geometric model. This kind of mesh generation is relatively simple, and a preliminary mesh structure can be quickly generated on a complex geometric model. Fitting mesh means that the edges and faces of the mesh units are strictly aligned with the boundaries and internal delimiters of the geometric model. This kind of mesh has high accuracy in geometric details and boundaries, and can accurately describe complex geometric shapes.
[0075] Regarding S101 above:
[0076] In the specific implementation, the 3D model of the target HVAC system is exported from Building Information Modeling (BIM) software or other 3D design tools. Commonly used software includes Revit, AutoCAD, Navisworks, etc.
[0077] For example, extract the system information of the HVAC system from the BIM model. The system information includes but is not limited to the following aspects:
[0078] Equipment information: such as fan model, power, air volume, air pressure and other parameters; valve type and control method; sensor location and type; pipeline information: such as duct material, diameter, length, insulation thickness, etc.; spatial information: such as the area and volume of the air supply area; design parameters: such as the designed indoor temperature and humidity.
[0079] The above system information can be obtained through the query and export functions of BIM software. Specific methods include using the attribute query tool of BIM software, or writing plug-ins and scripts to automatically extract the required information.
[0080] Convert the geometric data in the BIM model into a format suitable for numerical simulation. Geometry processing tools or programming languages (such as Python, MATLAB) can be used to parse and convert geometric data.
[0081] Regarding S102 above:
[0082] See also Figure 2 , Figure 2 A flowchart of a hierarchical half-edge conversion method provided by an embodiment of the present invention, as an optional implementation, performs hierarchical half-edge conversion based on a first three-dimensional model to generate half-edge structure data including steps S21 to S27:
[0083] Step S21, preprocessing the first three-dimensional model;
[0084] Step S22, defining the data structure of the half-edge structure data, including: vertices, half-edges, edges, faces, and airflow paths;
[0085] Step S23, extracting the target airflow path from the first three-dimensional model, and recording each key node and connection relationship in the target airflow path;
[0086] Step S24: based on the target airflow path, segment the target three-dimensional model into a plurality of sub-grids, wherein each sub-grid represents an independent airflow segment;
[0087] Step S25, extracting polygonal faces from each sub-network, and recording vertex information on each polygonal face;
[0088] Step S26: for each polygonal face, based on the vertex information, traverse each vertex of the polygonal face, generate corresponding half-edges, and set link relationships between the half-edges;
[0089] Step S27: After all the half-edges of the first three-dimensional model are generated, the relative half-edge of each half-edge is matched to generate half-edge structure data.
[0090] For the above step S21:
[0091] In the specific implementation, the 3D model of the HVAC system of the office building is exported from the BIM software (such as Revit or AutoCAD) and a preliminary check is performed. The model is geometrically simplified using the simplification tools provided by the BIM software or third-party plug-ins. For example, unnecessary small parts and details are removed, including bolts, brackets and other accessories, which do not affect the results in the simulation calculation but increase the calculation complexity.
[0092] After removing unnecessary details, use geometry simplification algorithms, such as Mesh Decimation or Polygon Folding, to reduce the number of polygons in the model and improve the efficiency of subsequent calculations.
[0093] In addition, noise filtering tools are used to identify and remove outliers and irregular data in the model to ensure the smoothness and consistency of the model.
[0094] Finally, the simplified and noise-filtered model is checked for integrity to ensure that all key components and geometric features are correctly preserved. It is saved in a format suitable for subsequent processing (such as IFC, DWG or STL) and imported into the next processing software.
[0095] In this way, the computational complexity of the model can be effectively reduced, the simulation efficiency can be improved, and at the same time, the geometric and topological information of the model can be ensured to be complete and accurate.
[0096] For the above step S22:
[0097] In the specific implementation, the data structures of vertices, half-edges, edges, faces and airflow paths are defined. Vertices represent key points of the geometric model, and each vertex contains its spatial coordinate information (x, y, z) and the connected half-edges. The definition of the vertex structure aims to clarify the position of each vertex in three-dimensional space and establish associations with other geometric elements.
[0098] The vertex data structure is defined as follows:
[0099] Coordinate information: three-dimensional coordinates of the vertex (x, y, z).
[0100] Connecting half-edge: points to a half-edge connected to the vertex, used to navigate to adjacent geometric elements.
[0101] Half-edges represent the connection relationship between vertices and are the core of the half-edge data structure. Each half-edge contains the starting vertex, the adjacent next half-edge, the opposite half-edge, and the face to which it belongs. Through this structure, the topological relationship of the geometric body can be clearly represented, and traversal and operation can be conveniently performed.
[0102] The data structure of a half-edge is defined as follows: starting vertex: points to the starting vertex of a half-edge; adjacent next half-edge: points to the next half-edge on the same face, used to loop through all half-edges on the face; opposite half-edge: points to the opposite half-edge, the starting point of this half-edge is the end point of the current half-edge; face: points to the face containing the half-edge.
[0103] An edge consists of two opposite half-edges, representing a straight line connection between two vertices. The edge data structure is mainly used to represent straight line segments in geometric models and establish associations with half-edges.
[0104] The data structure of an edge is defined as follows: Half-edge 1: the first half-edge pointing to the edge; Half-edge 2: the second half-edge pointing to the edge, opposite to the first half-edge; a face is composed of a set of circular half-edges, representing a polygonal face in a geometric model; the face data structure is used to represent the surface of a model, and establishes associations with vertices and edges through half-edges.
[0105] The data structure of a face is defined as follows: Boundary half-edge: points to a half-edge on the face. Looping through this half-edge can access all half-edges and vertices on the face.
[0106] The airflow path represents the flow path of air in the HVAC system, and records the nodes and connections in the path. The data structure of the airflow path is used to simulate the flow of air in the HVAC system to ensure the continuity and accuracy of the path.
[0107] The data structure of the airflow path is defined as follows: path node: a group of vertices, representing the key nodes in the airflow path; path edge: a group of edges, representing the connection relationship between nodes; starting point: the starting vertex of the airflow path; end point: the end vertex of the airflow path.
[0108] Exemplarily, define the starting vertex, the adjacent next half-edge, the opposite half-edge and the face to which it belongs for each half-edge. For example, on a rectangular duct cross-section, each edge can be divided into two opposite half-edges, and each half-edge contains the starting vertex and the adjacent next half-edge information. Define an edge structure for each pair of opposite half-edges. For example, the edge of an air duct is composed of two opposite half-edges, representing a boundary segment of the air duct. Define a face structure for each polygonal face, including boundary half-edge information. For example, the cross-section of a rectangular air duct can be represented as a face structure composed of four half-edges. Define the path nodes, path edges, starting points and end points for each air flow path. For example, an air supply path can be defined as a path from a fan (starting point) to each air outlet (end point), including all nodes and connection relationships in the path.
[0109] For the above step S23:
[0110] In a specific implementation, by using a path identification algorithm, the supply and return air paths in the model can be automatically identified, and the key node positions in each airflow path can be recorded in detail, including the starting point, end point, and intermediate nodes. For example, a graph search-based path identification algorithm, such as depth-first search (DFS) or breadth-first search (BFS), is used to analyze and identify the airflow paths in the model.
[0111] For example, when using the breadth-first search (BFS) algorithm to extract the airflow path, the duct network in the three-dimensional model is represented as a graph structure, where vertices represent key nodes (such as duct connection points, vents, and equipment), and edges represent duct segments. Each edge can be accompanied by a weight, such as the length or resistance coefficient of the duct.
[0112] Select the fan outlet as the starting point of the air supply path and the return air outlet as the starting point of the return air path. Add these starting points to the search queue.
[0113] The graph structure is traversed by the breadth-first search algorithm, starting from the starting node, and searching adjacent nodes layer by layer until all reachable nodes are visited. The specific steps are as follows:
[0114] Remove the current node from the queue.
[0115] Record the current node's position (x, y, z) and connection relationship.
[0116] Add all unvisited neighboring nodes of the current node to the queue and continue searching.
[0117] Mark the current node as visited to prevent repeated searches.
[0118] In this way, the entire supply air path can be traversed from the fan outlet, and the entire return air path can be traversed from the return air outlet, ensuring that all airflow path nodes are identified and recorded.
[0119] During the search process, the key node positions in each airflow path are recorded, including the starting point, end point and intermediate nodes. Each node records its geometric coordinates (x, y, z) and the connection relationship with the adjacent nodes. For example, the intermediate nodes such as the bifurcation point, elbow, valve, etc. of the air duct are recorded. After the search is completed, detailed airflow path data is generated, including the geometric coordinates and connection relationship of the starting point, end point and intermediate nodes of each path.
[0120] For the above step S24:
[0121] In the specific implementation, the three-dimensional model is segmented according to the extracted airflow path. The airflow path includes the supply air path and the return air path, and each path consists of multiple key nodes. These nodes divide the model into multiple independent airflow segments, each of which represents a specific area or functional part, such as the main air duct segment, the branch air duct segment, and the air outlet segment.
[0122] During the segmentation process, starting from the main fan outlet, the model is segmented along the air supply path. First, the main duct segment is identified, that is, the portion from the fan outlet to the first bifurcation point. This portion is treated as an independent sub-grid and marked as "main duct segment 1". Next, segmentation is performed along each branch path, with each branch duct segment being treated as an independent sub-grid. For example, starting from the bifurcation point of the main duct, segmentation is performed along the first branch duct path, marking it as "branch duct segment 1", and similar processing is continued along other branch paths to generate sub-grids such as "branch duct segment 2" and "branch duct segment 3".
[0123] For the return air path, a similar method is used for segmentation. Starting from the return air outlet, segmentation is performed along the return air path to identify the main return air duct segment and each branch return air duct segment. Each return air duct segment is marked and numbered as an independent sub-grid. For example, the section from the return air outlet to the first bifurcation point is marked as "main return air duct segment 1", and segmentation is performed along the first branch path from the bifurcation point to generate "branch return air duct segment 1", and so on.
[0124] After the segmentation is completed, each sub-grid is marked and numbered to facilitate subsequent processing and management. For example, the main air duct segment is numbered as "main air duct segment 1", and each branch air duct segment is numbered as "branch air duct segment 1", "branch air duct segment 2", etc. Similarly, the main return air duct segment and the branch return air duct segment are numbered to form a sub-grid structure.
[0125] For the above step S25:
[0126] In the specific implementation, the geometric data of each sub-grid is imported, and the polygonal faces in the sub-grid are identified using geometric analysis tools. These tools can be the geometric processing functions of the CAD software itself, or they can be specialized geometric analysis software or programming libraries (such as OpenCASCADE, CGAL, etc.). Through these tools, the polygonal faces of each sub-grid can be automatically identified, including the geometric faces of the cross-section, bifurcation, elbow, etc. of the duct.
[0127] For example, in the main duct section, the polygonal surface of each duct section is identified by a geometric analysis tool. Each section is usually a regular polygon, such as a rectangle or a circle. The boundary vertices of these polygonal surfaces are extracted, and the three-dimensional coordinate information (x, y, z) of each vertex is recorded. For example, a rectangular section has four vertices, and the coordinate information of these vertices is recorded respectively.
[0128] For each branch duct segment, a similar method is used to extract polygonal surfaces. The polygonal surfaces of the branch duct segment include the cross section of the bifurcation point, the elbow cross section in the duct path, etc. By identifying these polygonal surfaces one by one, their boundary vertices are extracted and the coordinate information of the vertices is recorded.
[0129] For the above step S26:
[0130] In a specific implementation, after extracting the vertex information of each polygonal face, each vertex of the polygonal face is traversed based on the extracted vertex information to generate the corresponding half-edge. Each polygonal face is composed of multiple vertices and edges. For example, a rectangular cross section is composed of four vertices and four edges. For each edge, the corresponding half-edge is generated to ensure that each half-edge contains the information of its starting vertex and the adjacent next half-edge.
[0131] For example, a rectangular cross section has four vertices A, B, C, and D, which are connected in sequence to form a polygonal surface. The process of generating a half edge is as follows:
[0132] Generate half-edge AB from vertex A to vertex B, and record its starting vertex A and the adjacent next half-edge BC.
[0133] Generate half edge BC from vertex B to vertex C, and record its starting vertex B and the adjacent next half edge CD.
[0134] Generate half edge CD from vertex C to vertex D, and record its starting vertex C and the adjacent next half edge DA.
[0135] Generate half-edge DA from vertex D to vertex A, and record its starting vertex D and the adjacent next half-edge AB.
[0136] For each half edge, set its next adjacent half edge. For example, for half edge AB, its next adjacent half edge is BC; for half edge BC, its next adjacent half edge is CD, and so on. In this way, it is ensured that the half edges of each polygonal face form a circular chain that can fully represent the geometric structure of the face.
[0137] Each half-edge has a half-edge opposite to it. For example, for half-edge AB, there is a half-edge BA, whose starting point is B and the end point is A. Set the opposite half-edge of each half-edge to ensure the consistency of geometric and topological relationships. For example, for half-edge AB, its opposite half-edge is BA; for half-edge BC, its opposite half-edge is CB.
[0138] All generated half-edges are stored in a data structure to ensure that all half-edges of each polygon face are fully represented. Each half-edge contains information about its starting vertex, the next adjacent half-edge, and the opposite half-edge.
[0139] For the above step S27:
[0140] In the specific implementation, all generated half-edges are stored in a data structure, and each half-edge records its starting vertex, the adjacent next half-edge and the relative half-edge information. On this basis, the half-edge matching operation begins.
[0141] Create an initial data structure for all half edges of each polygon face, which contains the start vertex, end vertex, and other related information of the half edge. Store all half edges in a list or array for traversal and matching operations.
[0142] Traverse each half edge in the list and find its opposite half edge. For each half edge, record the coordinates of its starting vertex and the ending vertex. For example, for half edge AB, record the coordinates of vertex A and vertex B.
[0143] Match the opposite half-edge of each half-edge through vertex coordinates and boundary information. Specifically, for each half-edge, find the other half-edge with its terminal vertex as the starting point, that is, the opposite half-edge. For example, for half-edge AB, find half-edge BA with vertex B as the starting point and vertex A as the end point.
[0144] During the matching process, vertex coordinates are used for comparison to ensure an accurate match. For example, if the coordinates of the starting vertex A of half-edge AB are (x1, y1, z1) and the coordinates of the ending vertex B are (x2, y2, z2), then the half-edge with the starting vertex (x2, y2, z2) and the ending vertex (x1, y1, z1) is searched as the opposite half-edge.
[0145] After finding the relative half-edge, set the relative half-edge pointer of the current half-edge. For example, after finding BA, set the relative half-edge of AB to BA, and set the relative half-edge of BA to AB. In this way, the link relationship between each half-edge and its relative half-edge is ensured.
[0146] For example, a centralized approach can be used to manage vertices and edges shared by all polygonal faces. This is achieved by creating a global vertex list and edge list. Each vertex and edge is assigned a unique identifier when it is created, so that even if they are shared by multiple faces, they can be correctly identified and referenced.
[0147] When generating the half-edge data structure, each half-edge needs to point to its starting vertex and the next half-edge connected to it. In addition, each half-edge needs a link to the opposite half-edge. This opposite half-edge usually belongs to adjacent polygon faces and shares the same edge. In this way, the faces can be connected to each other through the shared edges to form a continuous geometric structure.
[0148] After completing the matching operation for all half-edges, perform a verification check to ensure that each half-edge is correctly matched to the opposite half-edge. Check the start and end vertex coordinates of each pair of opposite half-edges to ensure consistency. For example, verify that AB and BA are correctly matched and check whether their vertex coordinate relationships are correct.
[0149] It should be noted that in some cases, there may be boundary half-edges without corresponding half-edges, which usually appear at the boundary of the model. For these boundary half-edges, record their boundary information to ensure the integrity of the data structure. For example, for some boundary half-edges, mark them as boundaries and store relevant information so that these boundary conditions can be considered in subsequent processing.
[0150] In this way, complete half-edge structure data is generated. This ensures a complete representation of the geometry and topological relationships of the entire model. This structured data format can simplify the data processing process. For example, when generating meshes, performing geometric operations, and traversing graphs, the structured organization of data reduces the complexity of search and update operations and improves processing efficiency. Complete half-edge structure data also makes the subsequent transition between different types of meshes smoother, because the data between meshes can be accurately matched and transferred, which is particularly important when dealing with nonlinear partial differential equations, because the processing of nonlinear partial differential equations depends on the accuracy of the mesh solutions at each level to iteratively approximate the final solution. Complete half-edge structure data can improve overall computational efficiency and stability.
[0151] In addition, the half-edge structure data ensures the integrity and accuracy of the data by accurately recording the topology and boundary information of the geometric body. In simulation and numerical calculation, the accurate description of topology and boundary directly affects the boundary condition processing and result accuracy of equation solving. The correct topological relationship helps to reduce calculation errors and improve the reliability of results.
[0152] As an optional implementation, based on the first three-dimensional model, hierarchical half-edge conversion is performed, and generating half-edge structure data also includes: creating an airflow path object for each airflow path, and recording the starting point and end point of each airflow path; based on the system information, defining the system layer of the target HVAC system; for the layer of the target HVAC system, creating a device layer based on the system information; for each device layer, creating a path layer; based on the airflow path object of each airflow path, each airflow path is added to the path layer corresponding to the airflow path object.
[0153] In the specific implementation, an airflow path object is created for each airflow path, and the starting point and end point of each airflow path are recorded in detail. Use Python scripts in combination with BIM software (such as Revit or AutoCAD) for automated processing. Through the API interface, key data of the airflow path can be extracted and recorded. Specifically, a Python script can be written to use Revit's API or AutoCAD's LISP script to extract the airflow path information in the model and create an airflow path object containing the starting point, end point, nodes, and edges. For example, for the air supply path, starting from the fan outlet, along the duct path to each air outlet, record the fan outlet as the starting point and the air outlet as the end point.
[0154] Based on the system information, define the system layer of the target HVAC system. The system layer is the highest level, representing the overall structure of the entire HVAC system. The system layer contains multiple device layers, each of which represents a major device or component in the system, such as the main fan system, cooling system, and heating system. Use structured data files (such as JSON or XML) to record the information of the system layer for subsequent processing. You can write a Python script to generate a JSON or XML file to define the system layer and reserve a place for each device layer.
[0155] For the target HVAC system layer, create a device layer based on the system information. The device layer represents each major device or component in the system, and each device layer contains all airflow paths and components related to the device. For example, under the main fan system, create an air supply device layer, which contains all airflow paths related to air supply; under the cooling system, create a cooling device layer, which contains all airflow paths related to cooling.
[0156] For each equipment layer, create a path layer. The path layer represents the specific airflow path in the equipment layer, and each path layer contains one or more airflow path objects. These path layers are used to organize and manage the airflow paths in the equipment layer to ensure the logic and continuity of the paths. For example, under the air supply equipment layer, create an air supply path layer containing all air supply path objects; under the cooling equipment layer, create a cooling path layer containing all cooling path objects.
[0157] Based on the airflow path object of each airflow path, add each airflow path to the path layer corresponding to the airflow path object. Organize the airflow paths into appropriate path layers according to the starting and ending points of the airflow path objects. For example, add the supply air path objects from the fan outlet to each air outlet to the supply air path layer; add the return air path objects from each return air outlet to the return fan inlet to the return air path layer.
[0158] In this way, a hierarchical airflow path structure is established to ensure that each airflow path is fully recorded and accurately represented. This not only improves the management and organization efficiency of airflow paths, but also ensures the accuracy of HVAC system simulation data.
[0159] As an optional implementation, dividing the target three-dimensional model into several sub-grids includes: using a first edge detection method on the first three-dimensional model to determine the boundary information of each HVAC component in the target HVAC system; based on the boundary information of each HVAC component in the target HVAC system, determining the geometric features and connection points of each HVAC component; based on the geometric features and connection points of each HVAC component, dividing the target three-dimensional model into several sub-grids.
[0160] In a specific implementation, tools such as OpenCV or PCL (Point Cloud Library) can be used for edge detection. For example, the Canny edge detection algorithm in OpenCV or the edge extraction algorithm in PCL is used to process the three-dimensional model and identify the boundary of each HVAC component.
[0161] Based on the boundary information of each HVAC component in the target HVAC system, the geometric features and connection points of each HVAC component are determined. The geometric features include the shape and size of the component, and the connection points represent the connection relationship between the components.
[0162] Divide the 3D model into multiple sub-grids by geometric features and connection points. Use MeshLab to perform interactive meshing.
[0163] As an optional implementation, the system information includes: material properties; the first edge detection method includes: before edge detection, calculating local area statistical properties of the three-dimensional model; based on the local area statistical properties and material properties, dynamically adjusting a high threshold for detecting strong edges and a low threshold for detecting weak edges;
[0164] Calculating local area statistics of the three-dimensional model includes:
[0165] Calculate the mean μ on the 3D model using the sliding window method local and standard deviation σ local , the calculation formula is:
[0166]
[0167] Among them, μ local (x, y, z) is the local mean, which represents the average value of the pixel intensity in the sliding window centered at point (x, y, z), σ local (x, y, z) represents the discrete intensity of the pixel intensity in the window centered at point (x, y, z), N is the number of pixels in the sliding window, l is the image intensity value, and i, j, and k are the offsets of the sliding window in the x, y, and j directions, respectively;
[0168] Based on local statistical characteristics, dynamically adjust the high threshold T high and low threshold T low The calculation formula is:
[0169] T high (x, y, z) = μ local (x, y, z)+k high ·σ local (x, y, z)
[0170] T low (x, y, z) = μ local (x, y, z)-k low ·σ local (x, y, z)
[0171] Among them, k high and k low It is an adjustment parameter set according to the material characteristics of the system.
[0172] In specific implementations, the image brightness and contrast in different regions may be different, and a single global threshold cannot adapt to the changes in all regions. By calculating the local mean and standard deviation, the threshold can be dynamically adjusted to adapt to the characteristics of the local area.
[0173] Local area statistical characteristics can help identify and filter noise. The thresholds for high contrast areas (strong edges) and low contrast areas (weak edges) require different settings, and dynamic adjustment can effectively distinguish edges from noise.
[0174] Different materials have different performance characteristics in the image (such as reflectivity, light transmittance, etc.), which leads to different performance of their edges in the image. For example, metal materials usually have high contrast and clear boundaries, while the boundaries of plastic or fiberglass materials may be fuzzy.
[0175] Setting appropriate adjustment parameters for different materials can make the edge detection algorithm more targeted. For example, metal materials can use a higher k high and k low For materials with fuzzy boundaries, lower parameter values are required.
[0176] For example, a 3D model of a HVAC system has large variations in contrast and brightness in different parts. For example, the inside of the duct may have a high reflectivity, resulting in high contrast, while the outside of the duct may have a low contrast due to different materials. Calculate the mean μ of the local area local and standard deviation σ local , which can help dynamically adjust the threshold to adapt to these changes.
[0177] For example, at position (5, 5, 5) we get:
[0178] μ local (5,5,5)=124.56
[0179] σ local (5,5,5)=5.78
[0180] For local areas, if only the global threshold is used, the edge may not be detected accurately. By dynamically adjusting the high and low thresholds to match the statistical characteristics of the local area, the edge can be better identified. For example:
[0181] T high (5, 5, 5) = 124.56 + 2.0 5.78 = 136.12
[0182] T low (5, 5, 5) = 124.56 - 0.8 5.78 = 119.98
[0183] These dynamic thresholds allow the edge detection algorithm to more accurately distinguish strong and weak edges in local areas.
[0184] Different materials have different performance in edge detection. For example, the edges of metal materials are usually clear, while the edges of fiberglass materials are fuzzy. By setting adjustment parameters based on material characteristics, you can optimize the edge detection effect in a targeted manner.
[0185] For example, for metal materials, higher adjustment parameters are set:
[0186] k high =2.0, k low =0.8
[0187] For the fiberglass material, set the adjustment parameters lower:
[0188] k high =1.2, k low =0.3
[0189] For the metal part of the air duct, a higher threshold can avoid noise interference and ensure clear detection of the boundary; while for the fiberglass part, a lower threshold can capture more edge details.
[0190] In this way, the high threshold for detecting strong edges and the low threshold for detecting weak edges can be dynamically adjusted based on the local area statistical characteristics and material characteristics, which can significantly improve the adaptability and accuracy of edge detection. This method can not only adapt to the brightness and contrast changes in different areas, but also optimize the characteristics of different materials, thereby achieving high-precision edge detection in complex HVAC system 3D models.
[0191] Regarding S103 above:
[0192] As an optional implementation, a non-fitting mesh is generated based on the first three-dimensional model and the half-edge structure data, and simultaneously or thereafter, a fitting mesh is generated based on the first three-dimensional model and the half-edge structure data, including: based on the first three-dimensional model and the half-edge structure data, an initial non-fitting mesh is generated using preset mesh units; wherein the geometry and topology relationship of the initial non-fitting mesh is determined based on the half-edge structure data; based on the initial non-fitting mesh, step-by-step refinement is performed, and the positions of the mesh units in the non-fitting mesh are adjusted using the half-edge structure data during each refinement to generate several non-fitting meshes with higher resolution; based on the first three-dimensional model and the half-edge structure data, an initial fitting mesh is generated; based on the initial fitting mesh, step-by-step refinement is performed, and the positions of the mesh units in the fitting mesh are adjusted using the first half-edge structure data during each refinement to generate several fitting meshes with higher resolution.
[0193] Among them, the generation process of non-fitting meshes and fitting meshes needs to be based on the three-dimensional model and half-edge structure data to ensure that the mesh can accurately represent the geometric and topological information. Generating a mesh based on the first three-dimensional model and half-edge structure data can ensure that each mesh unit accurately reflects the geometric shape and topological relationship of the model. The half-edge structure data provides detailed topological information, which helps to generate high-quality meshes that conform to the geometric boundaries. By refining the mesh step by step, the resolution of the mesh can be gradually improved to capture the details of the model more finely. In the process of generating non-fitting meshes and fitting meshes, the position of the mesh units is adjusted layer by layer using the half-edge structure data to ensure that each level of the mesh can accurately fit the geometric boundaries of the model and avoid the accumulation of computational errors.
[0194] In the specific implementation, a relatively rough non-fitting grid is initially generated using regular grid units such as cubes or tetrahedrons. According to the vertex, edge and face information in the three-dimensional model, these grid units are preliminarily arranged to cover the entire model area. The initial non-fitting grid can be refined into more and smaller grid units using the octree refinement method or the tetrahedron refinement method. For example, each cube unit is divided into eight smaller cube units. In each refinement process, the position of each grid unit is adjusted using the half-edge structure data to more accurately reflect the geometric boundaries and topological relationships of the three-dimensional model.
[0195] The half-edge structure data includes detailed information about vertices, half-edges, edges, and faces. This information can be used to guide the position adjustment of mesh units.
[0196] For example, during the refinement process, the position of each newly generated vertex is first obtained, and the adjacent vertex and edge information in the half-edge structure data is used to adjust the positions of these vertices through interpolation or optimization algorithms to fit the geometric boundaries of the model.
[0197] For each newly generated edge, obtain its two endpoints, and use the information of the relative half-edge and adjacent edge in the half-edge structure data to adjust the position and direction of the edge to align it with the model boundary.
[0198] For each newly generated face, get all the edges and vertices it contains.
[0199] By using the adjacent face and edge information in the half-edge structure data, the position and shape of the face are adjusted through interpolation or optimization algorithms to make it better fit the model surface.
[0200] In the specific implementation, for the fitted mesh, the same method as the non-fitted mesh is used to generate the initial fitted mesh, but it more strictly follows the geometric boundary of the model. The same refinement method as the non-fitted mesh is used to refine the initial fitted mesh into more and smaller mesh units. Using the half-edge structure data, the position of the refined mesh units is adjusted layer by layer to make it fit the geometric boundary of the model more accurately.
[0201] For example, the initial half-edge structure data of a three-dimensional model is as follows:
[0202] Vertices: (V1, V2, V3, V4); Edges: E1(V1, V2), E2(V2, V3), E3(V3, V4), E4(V4, V1); Face: a quadrilateral face enclosed by these edges.
[0203] Vertex position adjustment: Get the position of each newly generated vertex after refinement. For example, for the newly generated vertex V new , calculate the average position of its neighboring vertices (V1, V2), and adjust V new to bring it closer to the model boundary.
[0204] Edge position adjustment: For each newly generated edge E new , adjust the positions of its two endpoints to align with the model boundary. For example, adjust edge E new (V new , V3) so that it conforms to the direction and length of the adjacent edges E1 and E2.
[0205] Face position adjustment: Get all the edges and vertices of each newly generated face. For example, for a refined quadrilateral face, adjust its position through an interpolation algorithm to make it fit the model surface better.
[0206] In this way, the geometric and topological accuracy of the mesh can be ensured. The step-by-step refinement and position adjustment process can improve the resolution and fineness of the mesh, making the simulation calculation more accurate and efficient. This method is particularly important in complex HVAC systems because it can balance simulation accuracy and computational efficiency, providing a data basis for subsequent detailed analysis and optimization.
[0207] Regarding S104 above:
[0208] As a possible implementation method, establishing the nonlinear partial differential equation of the target HVAC system based on system information, non-fitting grids and fitting grids includes: determining the simulation target of the target HVAC system based on the system information; and determining the type of nonlinear partial differential equation that needs to be established and solved based on the simulation target of the target HVAC system.
[0209] In specific implementations, the system information of the target HVAC system includes equipment information, operating parameters, space information, material properties, etc. According to the system information and actual simulation needs, specific simulation targets can be determined. For example, the simulation target is the airflow path simulation, airflow velocity distribution, pressure distribution, temperature distribution, etc. of the target HVAC system.
[0210] According to the simulation objectives, select the appropriate type of nonlinear partial differential equation, for example, the Navier-Stokes equations for simulating air flow, the heat conduction equation for simulating temperature distribution, and the pressure distribution equation for simulating pressure changes in the air duct.
[0211] As a possible implementation method, a multi-grid method is used to solve and generate simulation results of a target HVAC system, including: decomposing a nonlinear differential equation into a number of linear equations; determining the initial conditions and boundary conditions of the target HVAC system based on system information; using a high-order interpolation method, interpolating the initial conditions and boundary conditions of the target HVAC system to each node of the initial non-fitting grid, and solving the linear equations to generate an initial solution; interpolating the initial solution to the initial fitting grid by a first interpolation method, and performing iterative calculations on the initial fitting grid; corresponding to the iterative calculation result reaching a preset termination condition, outputting the equation solution as the first simulation result.
[0212] In a specific implementation, the nonlinear partial differential equation of the target HVAC system is discretized and decomposed into a number of linear equations, each of which can be solved within one time step.
[0213] Based on system information (such as wind speed, temperature, pressure, etc.), determine the initial conditions and boundary conditions of the target HVAC system. For example, the initial temperature distribution of the entire system, the initial wind speed distribution, the velocity inlet, the pressure outlet, the temperature boundary, etc. Use high-order interpolation methods (such as Lagrange interpolation or spline interpolation) to interpolate the initial conditions and boundary conditions to each node of the initial non-fitting grid.
[0214] Based on the interpolated initial and boundary conditions, the decomposed linear equations are solved on the initial non-conforming grid to generate an initial solution.
[0215] The initial solution on the initial non-fitting grid is interpolated to the initial fitting grid using the first interpolation method. The calculation is iterated on the initial fitting grid, gradually adjusting the value of each node to make it satisfy the solution of the equation. In each iteration, the "refine-smooth" step in the multigrid method can be used to calculate on a higher resolution grid to capture more details. Smoothing is performed on the lower resolution grid to eliminate errors and oscillations.
[0216] Set the preset termination condition (such as the residual reaches a certain threshold, or the number of iterations reaches a predetermined value). Calculate the residual after each iteration. If the residual is less than the set threshold, the iteration terminates. Set the maximum number of iterations. If this number is reached, the iteration terminates. When the iterative calculation results reach the preset termination condition, the output equation solution is used as the first simulation result. This solution contains information such as the velocity, pressure, and temperature of each node in the system.
[0217] By using the multigrid method to solve nonlinear partial differential equations, determining initial and boundary conditions based on system information, and using interpolation to transfer and iterate between non-fitting grids and fitting grids, accurate HVAC system simulation results can be generated. This method effectively improves computational efficiency and accuracy.
[0218] As an optional implementation, the multi-grid method is used to solve and generate the simulation results of the target HVAC system, which also includes: the resolution of each level of grid in the non-fitted grid corresponds to the resolution of each level of grid in the fitted grid one by one; based on each level of grid in the non-fitted grid, the linear equation is solved separately; the solution of each level of grid in the non-fitted grid is interpolated to the fitted grid of corresponding resolution respectively; the linear equation is iteratively solved using each level of grid in the interpolated fitted grid; in response to the completion of the iterative solution of the highest level grid in the fitted grid, the solution of the highest level grid is output as the simulation result of the target HVAC system.
[0219] In a specific implementation, the initial non-fitting grid and the initial fitting grid are refined step by step to generate several grids with higher resolutions. Each time the grids are refined, the positions of the grid cells are adjusted using the half-edge structure data, and it is ensured that the resolutions of each level of the non-fitting grid and the fitting grid correspond one to one.
[0220] Based on the interpolated initial and boundary conditions, the linear equations are solved on the initial non-fitting grid to generate the initial solution. The linear equations are solved on each level of non-fitting grid to generate solutions at different resolution levels.
[0221] The initial solution on the initial non-fitting grid is interpolated to the initial fitting grid. The solutions obtained on each level of non-fitting grid are interpolated to the fitting grid of the corresponding resolution. The linear equations are iteratively solved using the interpolated solutions on each level of fitting grid. Refinement calculations are performed on high-resolution grids and smoothing calculations are performed on low-resolution grids to eliminate errors and oscillations.
[0222] As a possible implementation manner, the iteratively solving the linear equation using each level of the interpolated fitted grid includes:
[0223] For the initial solution of each level of grids other than the non-initial fitting grids in the fitting grids, the error is calculated and corrected based on the solution of the previous level of grids in the fitting grids.
[0224] For example, the k-th level grid is currently being processed. The solution of the k-1-th level grid is used as the initial solution, the error on the k-th level grid is projected onto the k-1-th level grid, smoothing is performed on the k-1-th level grid to reduce the error, and the smoothed error is interpolated back to the k-th level grid to correct the solution of the current grid.
[0225] In this way, the method of calculating and correcting the error based on the solution of the previous level grid can effectively reduce the error and improve the accuracy of the high-resolution grid solution by using restriction operations, smoothing operations and interpolation operations.
[0226] For example, there are non-fitting grid 1, non-fitting grid 2, non-fitting grid 3, fitting grid 1,
[0227] Fit Grid 2, Fit Grid 3, where the larger the number after the grid, the higher the resolution, and the same number represents the same resolution.
[0228] In the simulation of the target HVAC system, an initial non-fitting mesh 1 is generated based on the first three-dimensional model and the half-edge structure data. The geometric and topological relationships of the initial non-fitting mesh are determined based on the half-edge structure data. An initial fitting mesh 1 is generated based on the first three-dimensional model and the half-edge structure data. The initial fitting mesh more strictly follows the geometric boundaries of the model.
[0229] Non-fitting mesh 1 is refined to generate non-fitting mesh 2, and then further refined to generate non-fitting mesh 3. At each refinement, the half-edge structure data is used to adjust the position of the mesh cells to ensure mesh accuracy. Fitting mesh 1 is refined to generate fitting mesh 2, and then further refined to generate fitting mesh 3. At each refinement, the half-edge structure data is used to adjust the position of the mesh cells to ensure mesh accuracy.
[0230] Determine the initial conditions and boundary conditions (such as temperature, pressure, velocity, etc.) of the target HVAC system based on the system information. Use a high-order interpolation method (such as Lagrange interpolation or spline interpolation) to interpolate the initial conditions and boundary conditions to each node of the initial non-fitting grid 1. Based on the interpolated initial conditions and boundary conditions, solve the linear equation on the non-fitting grid 1 to generate the initial solution 1. Use the interpolation method to interpolate the initial solution 1 to each node of the non-fitting grid 2 as the initial condition of the non-fitting grid 2. Solve the linear equation on the non-fitting grid 2 to generate solution 2. Use the interpolation method to interpolate solution 2 to each node of the non-fitting grid 3 as the initial condition of the non-fitting grid 3. Solve the linear equation on the non-fitting grid 3 to generate solution 3.
[0231] Use bilinear interpolation to interpolate the initial solution 1 on non-fitting grid 1 to the fitting grid 1. Perform a preliminary iterative solution on the fitting grid 1 to generate the initial solution for the fitting grid 1. Interpolate the solution 2 on the non-fitting grid 2 to the fitting grid 2 and perform an iterative solution. Use the solution of the fitting grid 1 as the initial solution, calculate the error and correct it, and generate the solution for the fitting grid 2. Interpolate the solution 3 on the non-fitting grid 3 to the fitting grid 3 and perform an iterative solution. Use the solution of the fitting grid 2 as the initial solution, calculate the error and correct it, and generate the solution for the fitting grid 3.
[0232] Limit the error on the high-resolution grid to the low-resolution grid. For example, limit the error of Fit 2 to Fit 1. Perform a smoothing operation on the low-resolution grid to reduce the error. For example, perform a smoothing operation on Fit 1. Interpolate the smoothed error back to the high-resolution grid to correct the solution of the current grid. For example, interpolate the corrected error of Fit 1 back to Fit 2. Perform an iterative calculation on Fit 2 and use the corrected initial solution to further reduce the error. Interpolate the corrected solution to Fit 3 and perform an iterative calculation on Fit 3 and use the corrected initial solution to further reduce the error.
[0233] Set the residual threshold and the maximum number of iterations. When the iterative calculation results reach the preset termination condition, stop the calculation. The solution on the highest level of fitted grid (i.e. the solution of fitted grid 3) is used as the simulation result of the target HVAC system. The output results include information such as velocity, pressure, temperature, etc. of each node in the system.
[0234] In this way, the correspondence between non-fitting grids and fitting grids at all levels of resolution can be ensured, and the calculation accuracy and efficiency can be improved by using interpolation and iterative solution methods, ultimately generating accurate HVAC system simulation results.
[0235] Those skilled in the art will appreciate that all or part of the steps in the above method can be completed by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk. Alternatively, all or part of the steps in the above embodiment can also be implemented using one or more integrated circuits. The present disclosure is not limited to any particular form of combination of hardware and software.
[0236] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. An accelerated iterative simulation method for HVAC airflow organization based on a multi-grid method, characterized in that: include: Obtaining system information and the first three-dimensional model of the target HVAC system; Based on the first three-dimensional model, hierarchical half-edge conversion is performed to generate half-edge structure data; generating a non-fitting mesh based on the first three-dimensional model and the half-edge structure data, and simultaneously or subsequently generating a fitting mesh based on the first three-dimensional model and the half-edge structure data; Based on the system information, the non-fitting grid and the fitting grid, a nonlinear partial differential equation of the target HVAC system is established, and a multi-grid method is used to solve the equation to generate a simulation result of the target HVAC system; The step of performing hierarchical half-edge conversion based on the first three-dimensional model to generate half-edge structure data includes: Preprocessing the first three-dimensional model; A data structure defining the half-edge structure data includes: vertices, half-edges, edges, faces, and airflow paths; Extracting a target airflow path from the first three-dimensional model, and recording each key node and connection relationship in the target airflow path; Based on the target airflow path, the target three-dimensional model is divided into a plurality of sub-grids, wherein each sub-grid represents an independent airflow segment; Extracting polygonal faces from each of the sub-meshes and recording vertex information on each polygonal face; For each of the polygonal faces, based on the vertex information, traverse each vertex of the polygonal face, generate corresponding half-edges, and set link relationships between the half-edges; After all half-edges of the first three-dimensional model are generated, matching the opposite half-edge of each half-edge to generate half-edge structure data; Wherein, dividing the target three-dimensional model into a plurality of sub-grids comprises: Using a first edge detection method on the first three-dimensional model to determine boundary information of each HVAC component in the target HVAC system; Determine the geometric features and connection points of each HVAC component in the target HVAC system based on the boundary information of each HVAC component; Based on the geometric features and connection points of each of the HVAC components, dividing the target three-dimensional model into a plurality of sub-grids; The system information includes: material properties; the first edge detection method includes: Before the edge detection, calculating the local area statistical characteristics of the three-dimensional model; Based on the local area statistical characteristics and the material characteristics, dynamically adjusting a high threshold for detecting a strong edge and a low threshold for detecting a weak edge; The calculating of the local area statistical characteristics of the three-dimensional model comprises: Calculate the mean μ on the 3D model using the sliding window method local and standard deviation σ local , the calculation formula is: Among them, μ local (x, y, z) is the local mean, which represents the average value of the pixel intensity in the sliding window centered at point (x, y, z), σ local (x, y, z) represents the discrete intensity of the pixel intensity in the window centered at point (x, y, z), N is the number of pixels in the sliding window, I is the image intensity value, and i, j, and k represent the offset of the sliding window in the x, y, and z directions, respectively; Based on the local statistical characteristics, the high threshold T is dynamically adjusted. high and low threshold T low The calculation formula is: T high (x,y,z)=µ local (x,y,z)+k high ·σ local (x,y,z) T low (x,y,z)=µ local (x,y,z)-k low ·σ local (x,y,z) Among them, k high and k low It is an adjustment parameter set according to the material characteristics of the system.
2. The method for accelerating iterative simulation of HVAC airflow organization based on multi-grid method according to claim 1 is characterized in that: The performing hierarchical half-edge conversion based on the first three-dimensional model to generate half-edge structure data further includes: Creating an airflow path object for each airflow path, and recording the starting point and the end point of each airflow path; Based on the system information, defining a system layer of the target HVAC system; For the target HVAC system layer, create a device layer based on the system information; For each of the device layers, create a path layer; Based on the airflow path object of each of the airflow paths, each of the airflow paths is added to a path layer corresponding to the airflow path object.
3. The accelerated iterative simulation method for HVAC airflow organization based on the multi-grid method according to claim 2 is characterized in that: The generating of a non-fitting mesh based on the first three-dimensional model and the half-edge structure data, and simultaneously or subsequently, generating a fitting mesh based on the first three-dimensional model and the half-edge structure data comprises: Based on the first three-dimensional model and the half-edge structure data, an initial non-fitting mesh is generated using a preset mesh unit; wherein the geometric and topological relationship of the initial non-fitting mesh is determined based on the half-edge structure data; Based on the initial non-fitting grid, the grid is gradually refined, and the positions of grid cells in the non-fitting grid are adjusted by using the half-edge structure data during each refinement to generate a plurality of non-fitting grids with higher resolutions; Based on the first three-dimensional model and the half-edge structure data, generating an initial fitting grid; Based on the initial fitted grid, the mesh is refined step by step, and the positions of the mesh units in the fitted grid are adjusted using the half-edge structure data during each refinement to generate a plurality of fitted grids with higher resolutions.
4. The method for accelerating iterative simulation of HVAC airflow organization based on multi-grid method according to claim 3 is characterized in that: The nonlinear partial differential equation of the target HVAC system is established based on the system information, the non-fitting grid and the fitting grid, including: Based on the system information, determining a simulation target of the target HVAC system; Based on the simulation target of the target HVAC system, the type of nonlinear partial differential equation that needs to be established and solved is determined.
5. The method for accelerating iterative simulation of HVAC airflow organization based on multi-grid method according to claim 4 is characterized in that: The multi-grid method is used to solve and generate the simulation results of the target HVAC system, including: Decomposing the nonlinear partial differential equation into a plurality of linear equations; Based on the system information, determining initial conditions and boundary conditions of the target HVAC system; Using a high-order interpolation method, the initial conditions and boundary conditions of the target HVAC system are interpolated to each node of the initial non-fitting grid, and the linear equation is solved to generate an initial solution; Interpolating the initial solution into the initial fitted grid by a first interpolation method, and performing iterative calculation on the initial fitted grid; Corresponding to the iterative calculation result reaching a preset termination condition, the equation solution is output as the first simulation result.
6. The method for accelerating iterative simulation of HVAC airflow organization based on multi-grid method according to claim 5, characterized in that: The using of the multi-grid method to solve and generate the simulation results of the target HVAC system also includes: The resolution of each level of grid in the non-fitting grid corresponds one-to-one to the resolution of each level of grid in the fitting grid; Solving the linear equations based on each level of grid in the non-fitting grid; Interpolate the solutions of each level of the non-fitting grid into the fitting grid of the corresponding resolution; Iteratively solving the linear equation using each level of grid in the fitted grid after interpolation; In response to completion of iterative solution of the highest level grid in the fitted grid, a solution of the highest level grid is output as a simulation result of the target HVAC system.
7. The accelerated iterative simulation method for HVAC airflow organization based on the multi-grid method according to claim 6 is characterized in that: The iteratively solving the linear equation by using each level of the interpolated fitted grid comprises: For the initial solution of each level of grids other than the non-initial fitting grids in the fitting grids, the error is calculated and corrected based on the solution of the previous level of grids in the fitting grids.
Citation Information
Patent Citations
Air conditioning airflow guidance simulation methods, systems and computer media
CN109933814B
Analog simulation method for low-pressure chemical vapor deposition of polycrystalline silicon
CN116386746A