Revit-based air duct optimization method, system, equipment and medium

Through Revit, the three-dimensional air duct model was constructed and segmented and air supply efficiency optimization was performed, which solved the problems of low efficiency, high cost and poor stability in traditional air duct construction, and achieved efficient and stable air duct system optimization.

CN120337810APending Publication Date: 2025-07-18CHINA HUASHI ENTERPRISES CO LTD (SICHUAN)
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510409044.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

Traditional air duct construction technology is not flexible enough in the segmentation process, resulting in low construction efficiency, requiring a lot of on-site cutting and welding, increasing construction difficulty and cost, too many flange connection points affect the stability and performance of the system, and the failure of three-dimensional wind speed simulation leads to low air supply efficiency, which cannot meet the needs of modern construction.

Method used

Use Revit to build a three-dimensional air duct model, perform optimization analysis of air duct segmentation and short-section merging, combine fluid simulation technology to optimize air supply efficiency, reduce on-site cutting and welding, intelligently identify and merge short-section ducts, optimize air duct size and connection, and improve air supply efficiency.

Benefits of technology

Achieve automatic segmentation and intelligent connection, reduce construction difficulty and cost, improve system stability, reduce air leakage risks, improve air supply efficiency, and meet the efficient operation needs of modern buildings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120337810A_ABST
    Figure CN120337810A_ABST
Patent Text Reader

Abstract

The invention discloses a Revit-based air duct optimization method, system, equipment and medium, and aims to realize automatic segmentation and intelligent connection, improve segmentation efficiency, reduce field cutting and welding operation and reduce construction difficulty and cost by performing air duct size optimization and air supply efficiency optimization on an air duct three-dimensional model; flange connecting points in the construction technology are reduced, the machining cost is reduced, the construction efficiency is improved, the system stability is improved, and the risk of air leakage easily caused by multiple connecting points is reduced; and the air supply efficiency of the air pipe three-dimensional model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of air duct optimization, and particularly relates to a method, system, device and medium for air duct optimization based on Revit. Background Technique

[0002] With the rapid development of the construction industry and the continuous progress of intelligent technologies, the air duct system, as a key component of the building ventilation and air conditioning system, the efficiency, precision and cost issues in its processing and installation processes have attracted increasing attention. However, there are many deficiencies in traditional air duct construction technologies, making it difficult to meet the requirements of modern buildings for high efficiency, energy conservation and environmental protection.

[0003] Firstly, traditional air duct construction technologies have obvious limitations in segmentation and processing. The segmentation is not flexible enough, resulting in low construction efficiency and requiring a large amount of cutting and welding operations at the construction site. This on-site processing method not only increases the construction difficulty but also significantly raises the construction cost, and may affect the installation precision and quality of the air duct due to the instability of manual operations.

[0004] Secondly, there are too many flange connection points in traditional air duct construction technologies, further exacerbating the construction complexity and cost issues. The extensive use of flange connection points not only increases the processing cost but also reduces the construction efficiency. In addition, too many connection points are prone to air leakage risks, affecting the stability and performance of the system and increasing the difficulty and cost of subsequent maintenance.

[0005] Finally, traditional air duct construction technologies do not fully consider the functional optimization of the air duct system. For example, no three-dimensional wind speed simulation is carried out, resulting in low air supply efficiency and being unable to meet the requirements of modern buildings for the efficient operation of the ventilation and air conditioning systems. Such deficiencies in design directly affect the overall performance of the air duct system and limit its application in complex building environments.

[0006] In summary, the deficiencies of traditional air duct construction technologies in terms of efficiency, cost and performance can no longer meet the rapid development needs of the modern construction industry. Therefore, developing an intelligent air duct optimization method to improve the construction efficiency of the air duct system, reduce the construction cost, and enhance the stability and functionality of the system has become an urgent need in the current industry. Summary of the Invention

[0007] Based on the problems raised in the above background technique, the purpose of the present invention is to provide a method for air duct optimization based on Revit, which solves the problems that traditional air duct construction technologies are not flexible enough and inefficient in the segmentation process, and require a large amount of cutting and welding work on site, increasing the construction difficulty and cost, and can no longer meet the rapid development needs of the modern construction industry.

[0008] The present invention is realized through the following technical solutions:

[0009] In the first aspect of the present invention, a duct optimization method based on Revit is provided, including the following steps:

[0010] Use Revit to construct a three-dimensional model of the duct;

[0011] Segment the three-dimensional duct model to obtain a segmented duct model;

[0012] Conduct a short-section merging optimization analysis on the segmented duct model, and optimize the duct size of the segmented duct model according to the results of the short-section merging optimization analysis to obtain a first optimized duct model;

[0013] Conduct a supply air efficiency analysis on the first optimized duct model, and optimize the air velocity of the first optimized duct model according to the results of the supply air efficiency analysis to obtain a second optimized duct model.

[0014] In the above technical solution, Revit software is used to construct an accurate three-dimensional model of the duct. The three-dimensional duct model integrates the position, size, and attribute information of all ducts. The target duct is selected through the Revit API interface, and its geometric parameters (total length, type, diameter) and spatial positioning information (three-dimensional coordinates, orientation) are extracted. The geometric parameters and spatial positioning information are segmented and analyzed according to the segmentation rules, and automatic segmentation is performed according to the results of the segmentation analysis to output a segmented duct model that meets the engineering specifications.

[0015] In the prior art, construction is generally carried out without optimization directly, resulting in high construction costs and low efficiency; or manual optimization is adopted, searching on CAD plane drawings one by one for optimization, resulting in waste of labor, low implementation efficiency, large errors, and easy omission. Based on the above defects, this method conducts a short-section merging optimization analysis on the segmented duct model, conducts structural analyses such as surface analysis and merging feasibility analysis on the segmented ducts and the connection relationships between the segmented ducts, considers factors such as geometric compatibility, fluid performance, and installation space, ensures the feasibility and effectiveness of the merging, intelligently identifies and merges short-section ducts, optimizes the duct size, reduces material waste and processing costs, and improves construction efficiency.

[0016] Conduct a supply air efficiency analysis on the first optimized duct model obtained by short-section merging optimization. Among them, the supply air efficiency analysis uses fluid simulation technology to evaluate the air flow conditions of the modified duct system, ensures the improvement of the supply air efficiency, optimizes the curvature radius of the elbow and the branch angle of the tee, and improves the air flow efficiency.

[0017] This method optimizes the duct size and air supply efficiency of the 3D duct model, thereby achieving automatic segmentation and intelligent connection, improving the segmentation efficiency, reducing on-site cutting and welding operations, and lowering the construction difficulty and cost; reducing the construction technical flange connection points, lowering the processing cost, improving the construction efficiency, enhancing the system stability, and reducing the risk of air leakage caused by multiple connection points; improving the air supply efficiency of the 3D duct model.

[0018] In an alternative embodiment, the short-section merging optimization analysis of the segmented duct model includes the following steps:

[0019] Extract the duct fitting parameters from the segmented duct model, and use the duct fitting parameters to construct a duct fitting adjacency relationship graph;

[0020] Based on geometric compatibility verification, fluid performance evaluation, and installation space analysis, determine the feasibility of merging for the duct fitting adjacency relationship graph;

[0021] According to the merging feasibility determination result, perform intelligent parametric reconstruction and geometric topology reconstruction on the segmented duct model to generate a first optimized duct model.

[0022] In an alternative embodiment, extracting the duct fitting parameters from the segmented duct model and using the duct fitting parameters to construct a duct fitting adjacency relationship graph includes the following steps:

[0023] Traverse the segmented duct model, extract the duct parameters of all duct objects in the segmented duct model, and store the extracted duct parameters in a duct dictionary;

[0024] Construct and initialize a duct adjacency dictionary, perform a double-loop traversal on the duct dictionary, and perform adjacency judgment on the duct objects in the duct dictionary to obtain the duct adjacency relationship;

[0025] Store the duct objects and the corresponding duct adjacency relationships in the duct adjacency dictionary, use the duct adjacency dictionary to construct a duct fitting adjacency relationship graph, and determine the straight pipe length and short-section dynamic threshold of the duct objects in the duct fitting adjacency relationship graph.

[0026] In an alternative embodiment, performing intelligent parametric reconstruction on the segmented duct model according to the merging feasibility determination result includes:

[0027] Perform an attachment relationship analysis on the segmented duct model, and delete the duct objects without an attachment relationship;

[0028] Extract the elbow object and the angle value from the segmented duct model, determine the rotation angle of the elbow object, add the rotation angle to the angle value to obtain an optimized rotation angle, and assign the optimized rotation angle to the elbow object;

[0029] Extract the duct object and the flange object from the segmented duct model, determine the pipe diameter parameter of the duct object and the pipe diameter parameter of the flange object, and associate the pipe diameter parameter of the duct object with the pipe diameter parameter of the flange object.

[0030] In an alternative embodiment, geometric topology reconstruction is performed on the segmented duct model according to the merger feasibility determination result, including:

[0031] Discretize the surface of the segmented duct model, calculate the surface energy of the discretized segmented duct model to obtain the surface energy;

[0032] Optimize and reconstruct the surface of the discretized segmented duct model according to the surface energy to obtain an optimized segmented duct model.

[0033] In an alternative embodiment, perform air supply efficiency analysis on the first optimized duct model and optimize the air velocity of the first optimized duct model according to the air supply efficiency analysis result, including the following steps:

[0034] Arbitrarily select a pipe fitting object from the first optimized duct model as the analysis pipe fitting;

[0035] Determine the pipe fitting type of the analysis pipe fitting, and perform shape optimization on the analysis pipe fitting according to the pipe fitting type to obtain a second optimized duct model; wherein, the shape optimization includes elbow optimization and tee optimization;

[0036] Perform fluid simulation on the second optimized duct model to obtain the optimized air supply efficiency, and adjust the second optimized duct model by using the optimized air supply efficiency.

[0037] In an alternative embodiment, the elbow optimization includes: obtaining the curvature radius parameter of the analysis pipe fitting; performing update calculation on the curvature radius parameter to obtain an updated curvature radius parameter; and assigning the updated curvature radius parameter to the analysis pipe fitting to optimize the elbow structure of the analysis pipe fitting;

[0038] The tee optimization includes: obtaining the branch angle of the analysis pipe fitting; performing update calculation on the branch angle to obtain an updated branch angle; and assigning the updated branch angle to the analysis pipe fitting to optimize the tee structure of the analysis pipe fitting.

[0039] The second aspect of the present invention provides a duct optimization system based on Revit, which includes:

[0040] A model construction module for constructing a three-dimensional model of an air duct using Revit;

[0041] A segmentation module for segmenting the three-dimensional model of the air duct to obtain a segmented air duct model;

[0042] A dimension optimization module for performing short-section merging optimization analysis on the segmented air duct model, and optimizing the air duct dimensions of the segmented air duct model according to the short-section merging optimization analysis results to obtain a first optimized air duct model;

[0043] An air velocity optimization module for performing air supply efficiency analysis on the first optimized air duct model, and optimizing the air velocity of the first optimized air duct model according to the air supply efficiency analysis results to obtain a second optimized air duct model.

[0044] A third aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, an air duct optimization method based on Revit is implemented.

[0045] A fourth aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, an air duct optimization method based on Revit is implemented.

[0046] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0047] By optimizing the air duct dimensions and air supply efficiency of the three-dimensional model of the air duct, the present invention realizes automatic segmentation and intelligent connection, improves the segmentation efficiency, reduces on-site cutting and welding operations, reduces the construction difficulty and cost; reduces the construction technical flange connection points, reduces the processing cost, improves the construction efficiency, improves the system stability, and reduces the risk of air leakage caused by multiple connection points; improves the air supply efficiency of the three-dimensional model of the air duct. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following will briefly introduce the drawings required to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts. In the drawings:

[0049] Figure 1 It is a schematic diagram of the air duct structure provided in Embodiment 1 of the present invention;

[0050] Figure 2Schematic diagram of a structure of an electronic device provided in Embodiment 3 of the present invention. Detailed implementation manners

[0051] To make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below in conjunction with embodiments and drawings. The illustrative embodiments of the present invention and their descriptions are only used to explain the present invention and are not intended to limit the present invention.

[0052] Embodiment 1

[0053] Embodiment 1 of the present invention provides a method for optimizing air ducts based on Revit, which is used to optimize the air duct structure as Figure 1 shown, and it includes the following steps:

[0054] Construct a 3D model of the air duct using Revit;

[0055] Segment the 3D model of the air duct to obtain a segmented air duct model;

[0056] Conduct short-section merging optimization analysis on the segmented air duct model, and optimize the air duct size of the segmented air duct model according to the results of the short-section merging optimization analysis to obtain a first optimized air duct model;

[0057] Conduct air supply efficiency analysis on the first optimized air duct model, and optimize the air velocity of the first optimized air duct model according to the results of the air supply efficiency analysis to obtain a second optimized air duct model.

[0058] It should be noted that an accurate 3D model of the air duct is constructed using Revit software, and the 3D model of the air duct integrates the position, size and attribute information of all air ducts. The target air duct is selected through the Revit API interface, and its geometric parameters (total length, type, diameter) and spatial positioning information (3D coordinates, orientation) are extracted. The geometric parameters and spatial positioning information are segmented and analyzed according to the segmentation rules, and automatic segmentation is performed according to the results of the segmentation analysis to output a segmented air duct model that meets engineering specifications.

[0059] In the prior art, construction is generally carried out without optimization directly, resulting in high construction costs and low efficiency; or manual optimization is adopted, searching on CAD plane drawings one by one for optimization, resulting in waste of labor, low implementation efficiency, large errors and easy omission. Based on the above defects, this method conducts short-section merging optimization analysis on the segmented air duct model, conducts structural analysis such as surface analysis and merging feasibility analysis on the segmented air ducts and the connection relationships between the segmented air ducts, considers factors such as geometric compatibility, fluid performance and installation space, ensures the feasibility and effectiveness of the merging, intelligently identifies and merges short-section air ducts, optimizes the air duct size, reduces material waste and processing costs, and improves construction efficiency.

[0060] Perform an air supply efficiency analysis on the first optimized air duct model obtained by merging and optimizing the short sections. Among them, the air supply efficiency analysis uses fluid simulation technology to evaluate the air flow conditions of the modified air duct system, ensuring the improvement of air supply efficiency, optimizing the curvature radius of the elbow and the branch angle of the tee, and improving the air flow efficiency.

[0061] This method optimizes the air duct size and air supply efficiency of the 3D air duct model, thereby realizing automatic segmentation and intelligent connection, improving the segmentation efficiency, reducing on-site cutting and welding operations, reducing construction difficulty and cost; reducing construction technical flange connection points, reducing processing costs, improving construction efficiency, improving system stability, and reducing the risk of air leakage caused by multiple connection points; improving the air supply efficiency of the 3D air duct model.

[0062] Among them, the segmentation rules include: calculating the theoretical number of segments according to the maximum single-segment length (total length ÷ single-segment length), and processing the remainder (if the remainder is less than the minimum allowable value, it is merged into the previous segment); automatically detecting components such as elbows and tees on the air duct, avoiding such components and prohibiting segmentation; performing collision detection with building structures (beams, columns), and the segmentation points should avoid obstacles by at least 200 mm.

[0063] The automatic segmentation process includes: marking segmentation points along the axis of the air duct according to the calculated length, and real-time verifying whether the avoidance rules are met; if the segmentation point is close to a component or an obstacle, it is automatically offset to the nearest safe position; increasing the flange connection length at the end of each segment to ensure the actual installation accuracy; inserting a standard flange family at the segmentation point, automatically aligning the axis of the air duct and establishing a connection relationship; ensuring that the flow rate and pressure parameters of the newly segmented air duct are consistent with those of the original system.

[0064] In an alternative embodiment, performing a short-section merging and optimization analysis on the segmented air duct model includes the following steps:

[0065] Extract the air duct pipe fitting parameters from the segmented air duct model, and use the air duct pipe fitting parameters to construct an adjacency relationship graph of the air duct pipe fittings;

[0066] Based on geometric compatibility verification, fluid performance evaluation, and installation space analysis, determine the feasibility of merging for the adjacency relationship graph of the air duct pipe fittings;

[0067] According to the result of the merging feasibility determination, perform intelligent parametric reconstruction and geometric topology reconstruction on the segmented air duct model to generate the first optimized air duct model.

[0068] It should be noted that the geometric information (starting / ending coordinates, pipe diameter, type) of all duct fittings (elbows, tees, straight pipes, etc.) is obtained and stored as graph nodes with attributes, that is, the adjacency relationship graph of duct fittings. The feasibility of merging the adjacency relationship graph of duct fittings is determined through three aspects: geometric compatibility verification, fluid performance evaluation, and installation space analysis, to ensure that the merged fittings are within the maximum processing length limit of the processing equipment, meet the local resistance coefficient, and there is a sufficient safety distance between the merged duct and obstacles. Under the condition of meeting the merging feasibility, intelligent parametric reconstruction and geometric topology reconstruction are performed on the segmented duct model, so as to realize parameter optimization of fittings such as elbows and flanges, and parameter optimization of fitting surface parameters.

[0069] In an alternative embodiment, duct fitting parameters are extracted from the segmented duct model, and an adjacency relationship graph of duct fittings is constructed using the duct fitting parameters, including the following steps:

[0070] Traverse the segmented duct model, extract duct parameters for all duct objects in the segmented duct model, and store the extracted duct parameters in a duct dictionary;

[0071] Construct and initialize a duct adjacency dictionary, perform a double-loop traversal on the duct dictionary, and perform adjacency judgment on the duct objects in the duct dictionary to obtain the duct adjacency relationship;

[0072] Store the duct object and the corresponding duct adjacency relationship in the duct adjacency dictionary, construct an adjacency relationship graph of duct fittings using the duct adjacency dictionary, and determine the straight pipe length and short section dynamic threshold of the duct objects in the adjacency relationship graph of duct fittings.

[0073] In this embodiment, the duct parameter extraction is processed using the get_duct_geometry function. First, obtain the positioning curve of the duct object. Specifically, after receiving a duct object as a parameter, obtain its positioning curve locationCurve from the duct object; the positioning curve represents the orientation of the duct in space and is the key basis for determining the starting and ending positions of the duct. Then, use the positioning curve to obtain the starting and ending points of the duct object, and the starting and ending points clarify the specific position range of the duct object in space. Calculate the length of the duct object through the starting and ending points. In this embodiment, the actual length of the duct object is obtained by calculating the distance between two points, and then duct fitting parameters such as duct ID, type ID, starting point, ending point, pipe diameter, and length are stored in the duct dictionary. The keys of the duct dictionary correspond to different information, which facilitates subsequent access and processing of this information.

[0074] Further, obtain the pipe diameter parameter from the air duct object and convert it to a double-precision floating-point number. This is done to ensure the consistency and accuracy of the data type during subsequent calculations related to the pipe diameter.

[0075] In this embodiment, the build_adjacency_graph function is used to construct the adjacency relationship graph of the air duct pipe fittings. Among them, a defaultdict object adjacency is created, and its default value is an empty list. This dictionary will be used to store the relationship between each air duct and its adjacent air ducts. The pairs of air ducts in the air duct dictionary are traversed through two nested loops. The outer loop traverses each air duct duct1, and the inner loop traverses the other air ducts duct2 except duct1 itself. For each pair of air ducts, call the above get_duct_geometry function to obtain their geometric information, including the starting point and the ending point. Compare the starting point and the ending point of the two air ducts. If there is an overlap (such as the starting point of duct1 coincides with the starting point and the ending point of duct2, or the ending point of duct1 coincides with the starting point and the ending point of duct2), then these two air ducts are considered adjacent. If two air ducts are adjacent, add duct2 to the list corresponding to duct1 in the adjacency dictionary, indicating that duct1 is adjacent to duct2. After traversing all pairs of air ducts, return the adjacency dictionary storing the adjacency relationship.

[0076] Among them, when traversing all pairs of air ducts through two nested loops, for each pair of different air ducts (i!= j), call the is_connected function to determine whether the two air ducts are connected. First, obtain the endpoint information of the two air duct objects respectively, and define a tolerance. Since there may be some coordinate errors caused by precision problems during the actual modeling and data processing, a tolerance is given in this embodiment. If the two points are within the tolerance range, they are considered equal.

[0077] Check whether the endpoints are equal. Specifically, check whether the starting point of the first air duct is equal to the starting point of the second air duct; check whether the starting point of the first air duct is equal to the ending point of the second air duct; check whether the ending point of the first air duct is equal to the starting point of the second air duct; check whether the ending point of the first air duct is equal to the ending point of the second air duct. If any of the above conditions is met, it means that the endpoints of the two air ducts overlap, and then it is considered that the two air ducts are connected, and the function will return True; otherwise, the function will return False. If they are connected, add the ID of the second air duct to the adjacency list corresponding to the ID of the first air duct. Finally, return the adjacency graph. In a ventilation system, the connection relationship of air ducts directly affects the air flow path and system performance. Through the adjacency graph, the complex pipe network structure can be transformed into a graph structure, which is convenient for subsequent system connectivity analysis (such as judging whether there are isolated air ducts), shortest path calculation (such as finding the optimal air flow path), and collision detection (identifying air ducts that cross but are not correctly connected).

[0078] Furthermore, use the Line class in the Autodesk.DesignScript.Geometry module to determine the straight pipe length of the air duct object in the adjacency graph of air duct fittings. Specifically, check whether the length of the input list is 2, because at least two different points are required to fit a straight line; then check whether the x coordinates of these two points are the same: if they are the same, it means that the two points form a straight line perpendicular to the x-axis. In the slope-intercept form y = mx + b, the slope of a vertical line is infinite and cannot be represented in a conventional way, so a ValueError exception will also be thrown at this time; if the input verification passes, extract the coordinates (x1, y1) and (x2, y2) of the two points from the list, and calculate the slope m according to the formula for the slope of a straight line m = (y2 - y1) / (x2 - x1); calculate the intercept b. After obtaining the slope m, use the straight line equation y = mx + b, substitute the coordinates of one of the points (here (x1, y1) is selected) into the equation, and by transposing, the intercept b = y1 - m×x1 can be obtained; finally, return the calculated slope m and intercept b as a tuple. Through input verification in this step, it can be ensured that the input received by the function meets the requirements, avoiding program errors or unreasonable results caused by invalid input. In practical applications, data may have various abnormal situations, and input verification can improve the robustness of the function.

[0079] Create a straight line from the first point to the second point, and then return the length of the straight line: Receive the starting point and ending point of the straight line. When the starting point and ending point are valid point objects and contain valid coordinate information, determine various attributes of the straight line, such as "direction", "length", "position", and create a straight line object.

[0080] Further, determine the short - section dynamic threshold of the duct fittings in the adjacent relationship diagram of duct fittings: Obtain the duct object corresponding to the type, then obtain the pipe diameter parameter from this duct object and convert it to a double - precision floating - point number. Then, judge according to the name of the duct type. If it contains "Elbow", the threshold is 1.5 times the pipe diameter; if it contains "Tee", the threshold is 2.0 times the pipe diameter; for other types (such as straight pipes), return 0.0, indicating that it does not participate in the short - section determination.

[0081] Specifically, create a global dictionary to simulate a database storing different duct type IDs and their corresponding thresholds. This dictionary is predefined and contains known duct type IDs and their corresponding threshold information; check whether the incoming duct type ID exists in the global dictionary; if the incoming duct type ID exists in the dictionary, the function will retrieve the threshold corresponding to this type ID from the dictionary and use it as the return value of the function; if the incoming duct type ID is not in the dictionary, it means that no threshold is defined for this type of duct. At this time, the function will return None to indicate that the corresponding threshold information is not found. Storing all threshold information through a global dictionary ensures the consistency of threshold data. No matter where in the code the function is called, the obtained threshold comes from the same data source, avoiding the problem of data inconsistency. Receive an element ID as a parameter through the doc.GetElement method. In the get_duct_threshold function, this element ID is the incoming duct type ID; perform a search operation in the database corresponding to the current Revit document; it will traverse all elements in the document and compare the incoming element ID with the ID of each element; return the element object. If an element matching the incoming element ID is found in the document, the method will return the object corresponding to this element. In the get_duct_threshold function, what is returned is the element object type corresponding to the duct type. Advantage: Since the element ID is unique, using the doc.GetElement method can ensure that the obtained element object is accurate.

[0082] In an alternative embodiment, perform intelligent parametric reconstruction on the segmented duct model according to the merger feasibility determination result, including:

[0083] Analyze the attachment relationship of the segmented duct model and delete the duct objects without an attachment relationship;

[0084] Extract the elbow object and the angle value from the segmented duct model, determine the rotation angle of the elbow object, add the rotation angle to the angle value to obtain an optimized rotation angle, and assign the optimized rotation angle to the elbow object;

[0085] Extract the duct object and flange object from the segmented duct model, determine the pipe diameter parameters of the duct object and the pipe diameter parameters of the flange object, and associate the pipe diameter parameters of the duct object with the pipe diameter parameters of the flange object.

[0086] Among them, deleting the duct object without an attachment relationship takes the Revit element as a transaction object to ensure the atomicity of the operation. By using the transaction mechanism, the atomicity of the element deletion operation is ensured. If an error occurs during the deletion process, the transaction will roll back, avoiding the problem of inconsistent model data caused by partial deletion. Specifically, verify the duct ID. The duct ID has a unique identifier in this embodiment. Before actually deleting the duct object, check the association relationship between this duct object and other duct objects. In the Revit model, there may be complex associations between elements. For example, a pipe may be connected to valves, pipe fittings, etc., and a wall may have an attachment relationship with doors and windows. Identify these association relationships and determine whether deleting this duct object will affect other duct objects.

[0087] Receive an elbow object and a new angle value as parameters. First, obtain the current rotation angle of the elbow, then add the new angle value to it, and then assign the result to the rotation angle attribute of the elbow to achieve the adjustment of the elbow angle.

[0088] Receive a duct object and a flange object as parameters. First, obtain the pipe diameter parameters from the duct and flange objects respectively. Then associate the pipe diameter parameter of the flange with the pipe diameter parameter of the duct (in this embodiment, set the specified duct pipe diameter into the flange pipe diameter parameter), so that when the pipe diameter of the duct changes, the pipe diameter of the flange will also change accordingly.

[0089] In an alternative embodiment, perform geometric topology reconstruction on the segmented duct model according to the merge feasibility determination result, including:

[0090] Discretize the surface of the segmented duct model, calculate the surface energy of the segmented duct model after surface discretization to obtain the surface energy;

[0091] Optimize and reconstruct the surface of the segmented duct model after surface discretization according to the surface energy to obtain an optimized segmented duct model.

[0092] It should be noted that the surface is discretized into a triangular mesh; then the total energy value total_energy is initialized to 0.0. Next, each triangle in the mesh is traversed. Specifically: Calculate the energy value of the surface, which is used to evaluate the smoothness of the surface. The calculation process includes: setting the number of sampling points and the sampling step size in the two parameter directions of the surface; initializing the energy value; using two nested loops to traverse all sampling points on the surface. For each sampling point, the first-order partial derivative and the second-order partial derivative of this point are approximately calculated by the finite difference method, and its curvature is calculated accordingly. The sum of the squares of the Gaussian curvature and the sum of the squares of the mean curvature of each sampling point are added and accumulated to the energy value; in this embodiment, the principal curvatures k1 and k2 of the triangle are calculated, and the energy value of the triangle is calculated according to the energy function formula alpha*(k1**2 + k2**2), and it is accumulated to the total energy value. Finally, the total energy value is returned.. Quantify the smoothness of the surface as an energy value, which does not depend on the specific representation form of the surface (such as Bezier surface, NURBS surface, etc.), so it has good generality.

[0093] Calculate the gradient of the energy function with respect to the surface parameters by numerical methods (such as the finite difference method). The gradient represents the rate of change of the energy function at the current parameter point, and its direction points to the direction where the energy increases fastest; according to the calculated gradient and the learning rate, update the surface parameters; adjust the surface parameters along the opposite direction of the gradient, that is, the parameter update formula is new_parameters = current_parameters - learning_rate * gradient. The purpose of doing this is to move in the direction of decreasing energy, so that the surface gradually becomes smoother. Use the updated surface parameters to calculate the new energy value. Compare the difference between the new energy value and the current energy value. If the difference is less than a preset threshold, it means that the change in the energy value is already very small, and the optimization process may have converged. At this time, the iteration can be terminated in advance.

[0094] Furthermore, receive the Revit document object doc, the position position, and the pipe diameter diameter as parameters to generate a flange at the specified position. First, call the get_flange_family function to obtain the appropriate flange family type family_symbol according to the pipe diameter. If this family type is not activated, then call the family_symbol.Activate method to activate it. Then create a LocationPoint object location to represent the position of the flange. Finally, create a new, modified surface based on the optimization result.

[0095] It should be noted that the intelligent parametric reconstruction and geometric topology reconstruction carried out in this embodiment are based on the result of the merger feasibility determination, and the merger feasibility of this embodiment includes geometric compatibility verification, fluid performance evaluation, and installation space analysis.

[0096] Among them, the geometric compatibility verification is carried out by using the get_max_fabrication_length function. The geometric compatibility verification looks up the parameter named "MaxFabricationLength" from the project information, and returns it after converting its value to a floating point number. This parameter is stored in the project parameters or an external configuration file, and is used to represent the maximum processing length limit of the processing equipment.

[0097] Specifically, the key parameter value of the maximum processing length is extracted from the Revit project (segmented duct model) information to provide data support for subsequent geometric compatibility verification and other operations. Specifically, the current Revit document is received as a parameter; the doc.ProjectInformation.LookupParameter method is used to look up the parameter named MaxFabricationLength in the project information. This method searches for the parameter with this name in the project information parameter set. If it finds the parameter, it returns the corresponding parameter object; if it doesn't find it, it returns None. If the MaxFabricationLength parameter is found (i.e., param is not None), then it will be checked whether the parameter has an actual value, using the param.HasValue method to judge. If the parameter has a value, the param.AsDouble() method is used to obtain the double-precision floating point value of the parameter and return it; if the MaxFabricationLength parameter is not found, or the parameter is found but has no value, the function will return None, indicating that no valid maximum processing length information has been obtained. The advantage of this processing is that the function handles the situation where the parameter does not exist or has no value, and returns None instead of crashing the program. This can enhance the robustness of the code and make it run more stably in the face of abnormal data.

[0098] The doc.ProjectInformation.LookupParameter method includes: locating the project information object, receiving a string as a parameter, traversing all available parameters in the project information object, and comparing the name of each parameter with the passed-in string; if a parameter with a matching name is found in the parameter list of the project information, this method will return the corresponding parameter object.

[0099] Find the parameter named "MaxFabricationLength" from the project information, convert its value to a floating-point number and return it. This parameter is stored in the project parameters or an external configuration file and is used to represent the maximum processing length limit of the processing equipment.

[0100] Furthermore, the fluid performance evaluation is used to evaluate the fluid performance after the duct merging. In this embodiment, the calculate_resistance function is used to calculate the local resistance coefficients of the duct type and diameter. Obtain the duct type and diameter. If the duct type and diameter exist in the dictionary, obtain the corresponding sub-dictionary of local resistance coefficients. If not, return None.

[0101] Compare the local resistance coefficients before and after merging. If the local resistance coefficient after merging is greater than 1.1 times the local resistance coefficient before merging, it is considered that the fluid performance after merging exceeds the acceptable range.

[0102] Furthermore, the check_collision function is used for installation space analysis to check for collisions between the merged duct and obstacles. In this embodiment, extract the geometric information of the merged duct and the geometric information of the obstacles. The geometric information includes its shape, size, position, etc. Use a specific collision detection algorithm to determine whether a collision occurs between the merged duct and each obstacle. Traverse the collision check result list one by one. For each collision result, extract the minimum distance indicating the distance between the merged duct and the corresponding obstacle, and determine whether the minimum distance is greater than or equal to 50 millimeters. If the minimum distances of all collision results meet the requirements, it means that there is enough safety distance between the merged duct and the obstacles.

[0103] In an alternative embodiment, perform air supply efficiency analysis on the first optimized duct model and optimize the air velocity of the first optimized duct model according to the air supply efficiency analysis result, including the following steps:

[0104] Arbitrarily select a pipe fitting object from the first optimized duct model as the analysis pipe fitting;

[0105] Determine the pipe fitting type of the analysis pipe fitting, and perform shape optimization on the analysis pipe fitting according to the pipe fitting type to obtain a second optimized duct model; wherein, the shape optimization includes elbow optimization and tee optimization;

[0106] Perform fluid simulation on the second optimized duct model to obtain the optimized air supply efficiency, and adjust the second optimized duct model using the optimized air supply efficiency.

[0107] It should be noted that based on the REVIT model, the air flow situation of the modified duct system is simulated, and indicators such as the resistance coefficient are calculated to evaluate whether the air supply efficiency is improved. In this embodiment, a simplified fluid mechanics model based on empirical formulas is used to calculate the total resistance of the duct system. The total resistance consists of two parts, one is the local resistance of the pipe fittings, and the other is the frictional resistance. The specific calculation includes: the total resistance is equal to the sum of the local resistances of each pipe fitting plus the sum of the frictional resistances of each section of the duct.

[0108] The calculation formula for the local resistance is 2K·ρ·v², where K is the local resistance coefficient of the pipe fitting, which can be obtained by looking up tables or calculations; ρ is the air density, which is set to 1.2 kg per cubic meter here; v is the air flow velocity, with the unit of meters per second. The calculation formula for the frictional resistance is λ·D / L·2ρ·v², where λ is the frictional resistance coefficient, which can be calculated by the Hagen - Poiseuille formula; L is the length of the duct; D is the diameter of the duct.

[0109] Among them, the length of the duct is the length of the duct positioning curve, which describes the orientation of the duct in space, and its length is the actual length of the duct. The specific calculation process of the air flow velocity is: the flow rate divided by the cross - sectional area of the circle, and the calculation formula for the cross - sectional area of the circle is π×(2diameter)².

[0110] The local resistance coefficient of the elbow is calculated based on the given elbow curvature radius and duct diameter. The processing logic is as follows:

[0111] Obtain the curvature radius of the elbow and the diameter of the duct, calculate their ratio, and the ratio reflects the relationship between the bending degree of the elbow and the duct size. Perform a - 0.5 - power operation on the ratio. The power operation can further highlight the influence of the ratio on the local resistance coefficient and reflect the non - linear effect of the elbow shape on the fluid resistance. Multiply the result of the power operation by 0.2. Here, 0.2 is the coefficient in the ASHRAE standard formula, which is determined through a large number of experiments and studies and is used to convert the ratio and the result of the power operation into the specific local resistance coefficient to obtain the local resistance coefficient of the elbow.

[0112] The calculation process of the local resistance coefficient of the tee is as follows:

[0113] Obtain the branch angle of the tee, and add 0.5 to 0.01 multiplied by the branch angle. Here, 0.5 and 0.01 are the coefficients of the formula, which are determined based on experience and may need to be adjusted according to specific situations in actual applications.

[0114] The calculation of the total duct resistance includes:

[0115] Reynolds number calculation: Call the reynolds_number function, which calculates the Reynolds number using the data in duct_data (such as flow velocity, pipe diameter, kinematic viscosity of the fluid, etc.). The Reynolds number is a dimensionless number used to determine the flow state of the fluid (laminar flow, turbulent flow, etc.) and is an important parameter in calculating the friction factor along the length.

[0116] Friction factor calculation along the length: According to the calculated Reynolds number, use the formula friction_factor = 64 / Reynolds number to calculate the friction factor along the length. This formula is applicable to the fluid flow in the laminar state. In laminar flow, the friction factor along the length is inversely proportional to the Reynolds number.

[0117] Friction calculation along the length: Use the calculated friction factor along the length, the duct length, pipe diameter, and flow velocity in duct_data, and calculate the friction along the length through the corresponding friction calculation formula along the length (generally friction_loss = friction factor along the length * (duct length / pipe diameter) * (flow velocity^2 / 2)).

[0118] Local resistance calculation: According to the fitting_type pipe fitting type passed in, call the corresponding local resistance coefficient calculation function. Different pipe fitting types (such as elbows, tees, etc.) have different local resistance coefficient calculation methods. By calling a dedicated function, the local resistance coefficient of each pipe fitting can be accurately calculated. Then, combined with information such as the flow velocity in duct_data, the local resistance is calculated.

[0119] Total resistance calculation and return: Add the calculated friction along the length and the local resistance to obtain the total resistance of the air duct. Finally, return the total resistance as the return value of the function.

[0120] By calculating the friction along the length and the local resistance separately, and combining the specific pipe fitting type for local resistance calculation, the actual resistance situation of the air duct can be more accurately reflected.

[0121] In an alternative embodiment, the elbow optimization includes: obtaining the curvature radius parameter of the analyzed pipe fitting; performing an update calculation on the curvature radius parameter to obtain an updated curvature radius parameter; assigning the updated curvature radius parameter to the analyzed pipe fitting to optimize the elbow structure of the analyzed pipe fitting;

[0122] The tee optimization includes: obtaining the branch angle of the analyzed pipe fitting; performing an update calculation on the branch angle to obtain an updated branch angle; assigning the updated branch angle to the analyzed pipe fitting to optimize the tee structure of the analyzed pipe fitting.

[0123] It should be noted that for the elbow optimization, if the curvature radius parameter cannot exist in the analyzed pipe fitting, no processing is required. When the curvature radius parameter exists, the currently obtained curvature radius value is increased by 10%, a new curvature radius value is obtained, and it is assigned to the elbow structure as its new curvature radius parameter. This operation directly modifies the curvature radius of the pipe fitting object, thereby changing the shape of the elbow.

[0124] For the tee optimization, if the branch angle cannot exist in the analyzed pipe fitting, no processing is required. When the branch angle exists, the branch angle of 45 degrees is converted to radians, and the new branch angle value is calculated using the formula new_angle = 45 * (math.pi / 180) and updated accordingly, thereby changing the branch angle of the tee pipe fitting and ultimately modifying the shape of the tee.

[0125] Embodiment 2

[0126] Embodiment 2 of the present invention provides a duct optimization system based on Revit, which includes:

[0127] A model construction module for constructing a three-dimensional duct model using Revit;

[0128] A segmentation module for segmenting the three-dimensional duct model to obtain a segmented duct model;

[0129] A dimension optimization module for performing short section merging optimization analysis on the segmented duct model, and optimizing the duct dimensions of the segmented duct model according to the short section merging optimization analysis results to obtain a first optimized duct model;

[0130] A wind speed optimization module for performing air supply efficiency analysis on the first optimized duct model and optimizing the wind speed of the first optimized duct model according to the air supply efficiency analysis results to obtain a second optimized duct model.

[0131] Embodiment 3

[0132] Figure 2 The structural schematic diagram of an electronic device provided in Embodiment 3 of the present invention is as Figure 2 shown. The electronic device includes a processor 21, a memory 22, an input device 23, and an output device 24; the number of processors 21 in the computer device can be one or more, Figure 2 taking one processor 21 as an example; the processor 21, memory 22, input device 23, and output device 24 in the electronic device can be connected through a bus or other means, Figure 2 taking connection through a bus as an example.

[0133] The memory 22 serves as a computer-readable storage medium and can be used to store software programs, computer-executable programs, and modules. The processor 21 executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the memory 22, that is, to implement a Revit-based air duct optimization method according to Embodiment 1.

[0134] The memory 22 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the terminal, etc. In addition, the memory 22 may include high-speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some instances, the memory 22 may further include a memory remotely provided with respect to the processor 21, and these remote memories can be connected to the electronic device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0135] The input device 23 can be used to receive user input such as an id and a password. The output device 24 is used to output a network configuration page.

[0136] Embodiment 4

[0137] Embodiment 4 of the present invention further provides a computer-readable storage medium, and the computer-executable instructions are used to implement a Revit-based air duct optimization method as provided in Embodiment 1 when executed by a computer processor.

[0138] A storage medium containing computer-executable instructions provided by an embodiment of the present invention, the computer-executable instructions are not limited to the method operations provided in Embodiment 1, and can also execute related operations in a Revit-based air duct optimization method provided by any embodiment of the present invention.

[0139] The specific embodiments described above further elaborate on the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only the specific embodiments of the present invention and is not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A duct optimization method based on Revit, characterized in that, It includes the following steps: Use Revit to build a 3D model of the air duct; Segment the 3D air duct model to obtain a segmented air duct model; Conduct short-section merging optimization analysis on the segmented air duct model, and optimize the air duct size of the segmented air duct model according to the results of the short-section merging optimization analysis to obtain a first optimized air duct model; Conduct air supply efficiency analysis on the first optimized air duct model, and optimize the air velocity of the first optimized air duct model according to the results of the air supply efficiency analysis to obtain a second optimized air duct model.

2. The air duct optimization method based on Revit according to claim 1, characterized in that Conduct short-section merging optimization analysis on the segmented air duct model, including the following steps: Extract the air duct fitting parameters from the segmented air duct model, and use the air duct fitting parameters to construct an air duct fitting adjacency relationship graph; Based on geometric compatibility verification, fluid performance evaluation, and installation space analysis, determine the feasibility of merging for the air duct fitting adjacency relationship graph; According to the results of the merging feasibility determination, perform intelligent parametric reconstruction and geometric topology reconstruction on the segmented air duct model to generate a first optimized air duct model.

3. The duct optimization method based on Revit according to claim 2, wherein, Extract the air duct fitting parameters from the segmented air duct model, and use the air duct fitting parameters to construct an air duct fitting adjacency relationship graph, including the following steps: Traverse the segmented air duct model, extract the air duct parameters of all air duct objects in the segmented air duct model, and store the extracted air duct parameters in an air duct dictionary; Construct and initialize an air duct adjacency dictionary, perform a double-loop traversal on the air duct dictionary, and perform adjacency judgment on the air duct objects in the air duct dictionary to obtain the air duct adjacency relationship; Store the air duct objects and the corresponding air duct adjacency relationships in the air duct adjacency dictionary, use the air duct adjacency dictionary to construct an air duct fitting adjacency relationship graph, and determine the straight pipe length and short-section dynamic threshold of the air duct objects in the air duct fitting adjacency relationship graph.

4. The air duct optimization method based on Revit according to claim 3, wherein According to the results of the merging feasibility determination, perform intelligent parametric reconstruction on the segmented air duct model, including: Conduct an attachment relationship analysis on the segmented air duct model, and delete the air duct objects without an attachment relationship; Extract the elbow objects and angle values from the segmented air duct model, determine the rotation angle of the elbow objects, add the rotation angle to the angle value to obtain an optimized rotation angle, and assign the optimized rotation angle to the elbow objects; Extract the air duct objects and flange objects from the segmented air duct model, determine the pipe diameter parameters of the air duct objects and the pipe diameter parameters of the flange objects, and associate the pipe diameter parameters of the air duct objects and the pipe diameter parameters of the flange objects.

5. A Revit-based air duct optimization method according to claim 3, characterized in that, According to the results of the merging feasibility determination, perform geometric topology reconstruction on the segmented air duct model, including: Discretize the surface of the segmented air duct model, calculate the surface energy of the segmented air duct model after surface discretization to obtain the surface energy; Optimize and reconstruct the surface of the segmented air duct model after surface discretization according to the surface energy to obtain an optimized segmented air duct model.

6. The air duct optimization method based on Revit according to claim 1, characterized in that Conduct air supply efficiency analysis on the first optimized air duct model, and optimize the air velocity of the first optimized air duct model according to the results of the air supply efficiency analysis, including the following steps: Arbitrarily select a pipe fitting object from the first optimized air duct model as the analyzed pipe fitting; Determine the pipe fitting type of the analyzed pipe fitting, and perform shape optimization on the analyzed pipe fitting according to the pipe fitting type to obtain a second optimized air duct model; wherein, the shape optimization includes elbow optimization and tee optimization; Perform fluid simulation on the second optimized air duct model to obtain the optimized air supply efficiency, and adjust the second optimized air duct model by using the optimized air supply efficiency.

7. The air duct optimization method based on Revit according to claim 6, wherein The elbow optimization includes: obtaining the curvature radius parameter of the analyzed pipe fitting; performing update calculation on the curvature radius parameter to obtain an updated curvature radius parameter; assigning the updated curvature radius parameter to the analyzed pipe fitting to optimize the elbow structure of the analyzed pipe fitting; The tee optimization includes: obtaining the branch angle of the analyzed pipe fitting; performing update calculation on the branch angle to obtain an updated branch angle; assigning the updated branch angle to the analyzed pipe fitting to optimize the tee structure of the analyzed pipe fitting.

8. An air duct optimization system based on Revit, characterized in that, Including: A model construction module for constructing a three-dimensional air duct model by using Revit; A segmentation module for segmenting the three-dimensional air duct model to obtain a segmented air duct model; A dimension optimization module for performing short section merging optimization analysis on the segmented air duct model, and optimizing the air duct dimension of the segmented air duct model according to the short section merging optimization analysis result to obtain a first optimized air duct model; A wind speed optimization module for analyzing the air supply efficiency of the first optimized air duct model and optimizing the wind speed of the first optimized air duct model according to the air supply efficiency analysis result to obtain a second optimized air duct model.

9. An electronic device, characterized in that, Including a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, it implements a Revit-based air duct optimization method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a Revit-based air duct optimization method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Intelligent air pipe connecting method based on Revit platform

    CN122154006A