Element development method and system based on fluid simulation platform
By assigning identifiers to the components to be developed on the fluid simulation platform, creating an analysis model, encoding the flow and heat exchange characteristics, and converting equation systems, generating and modifying C++ language codes, and finally integrating the components into the fluid simulation network for testing, the problem of lack of general components and management software in existing fluid systems is solved, and efficient and accurate fluid system component development is achieved.
Patent Information
- Application Number
- CN202411935967.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-03-25
AI Technical Summary
The lack of common fluid system components and unified management software in the existing fluid systems leads to the lack of universality of the developed calculation methods, and when the flow path of the fluid system changes, the calculation program will change accordingly.
By assigning identifiers to the components to be developed on the fluid simulation platform, creating an analysis model, encoding the flow and heat exchange characteristics, converting nonlinear equations into a linear iterative solution process, and generating a C++ language code template for modification and compilation, and finally integrating the components into the fluid simulation network for testing.
The general fluid system component development is realized, solving the problems of the lack of universality of computing methods and changes in flow paths, and improving the computing efficiency and accuracy.
Smart Images

Figure CN119690390A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of simulation component development, and more specifically, to a component development method and system based on a fluid simulation platform. Background Art
[0002] The fluid system is a collection of flow elements corresponding to the specific actual pipe network model. Each flow element has an actual physical model corresponding to it. The simulation network is an abstract modeling of some flow elements in the fluid system (such as three-way connectors and four-way connectors). The fluid system is for the user layer, while the simulation network is for the computing layer.
[0003] Through the simulation analysis of the fluid system, the pressure and temperature of each node in the system and the flow rate in each component can be determined, as well as the changes in each parameter in the system after each input parameter (boundary condition) changes, to ensure that each fluid system can meet the use requirements under various complex conditions. In the field of energy utilization, the investment in the natural gas transmission and distribution pipeline system is huge, and the design and operation scheduling of the natural gas transmission and distribution system is based on the hydraulic analysis of the fluid system. The research on the existing fluid system is often carried out on a certain component in a certain field. These components have great limitations in the use scenarios and conditions. If the numerical calculation is performed completely based on the specific components in the fluid system, the developed calculation method will lose its universality, that is, every time one or a special component is added, the calculation program must be changed again; further, the change of the flow path of the fluid system will cause the calculation program to change accordingly. To avoid this situation, it is necessary to develop a general calculation method for the fluid system that is independent of the specific component, but the current fluid system lacks universal fluid system components and unified management software. Summary of the invention
[0004] The purpose of the present invention is to provide a component development method and system based on a fluid simulation platform, which is used to solve the technical problems that the existing fluid system lacks universal fluid system components and unified management software, resulting in the lack of universality of the developed calculation method, and when the flow path of the fluid system changes, the calculation program will change accordingly. In view of this, the present invention is implemented through the following scheme.
[0005] In a first aspect, the present invention provides a component development method based on a fluid simulation platform, comprising:
[0006] Step 1, assigning an identifier to the component to be developed in the fluid simulation platform, and creating an analysis model based on the component, wherein the analysis model is used to describe and characterize the physical properties of the component;
[0007] Step 2, encoding the flow and heat transfer characteristics of the element, and converting the nonlinear equation solution process of the element into a linear iterative solution process;
[0008] Step 3, complete the definition of component attributes on the fluid simulation platform and generate a code template in C++ language;
[0009] Step 4, modifying the code template according to the linear formula of the component;
[0010] Step 5, upload the modified code template to the simulation platform, and the platform compiles and saves it;
[0011] Step 6: Integrate the defined components into the fluid simulation network, set boundary conditions, and test the flow and heat transfer characteristics. If the test is qualified, the component development is completed.
[0012] Compared with the prior art, in step 1 of the component development method based on the fluid simulation platform of the present invention, by assigning an identifier to the component to be developed on the fluid simulation platform, it is helpful to effectively identify and manage it in the simulation platform, and by creating an analysis model, an accurate basis is provided for the coding and calculation in the subsequent steps; in step 2, the flow and heat transfer characteristics of the component are encoded, which can realize the digital description of the component characteristics so that the computer can process and calculate; after the nonlinear equation group is converted into a linear iterative solution process, the complexity and difficulty of the calculation can be effectively reduced, and the calculation efficiency and accuracy can be improved. At the same time, this conversion also improves the versatility of the calculation method, making the solution method applicable to different components; in step 3, the definition of component properties is completed on the simulation platform, which can ensure that the properties of the component are consistent with other parts of the simulation platform. Maintaining consistency and compatibility, generating a code template in C++ language provides a standardized framework for subsequent code writing, which helps to reduce coding errors and improve the readability of the code; in step 4, modifying the code template according to the linear formula of the component can ensure that the calculation code can accurately reflect the physical properties and flow and heat transfer characteristics of the component; in step 5, uploading the modified code template to the simulation platform can ensure that the code is correctly executed in the simulation environment, and the platform compiles and saves the code to ensure the stability and reliability of the code, and also facilitates subsequent calls and modifications; in step 6, integrating the defined components into the fluid simulation network can verify the performance of the components in complex fluid systems, and by setting boundary conditions and testing, if the test is qualified, the component development is completed and can be applied to actual fluid systems. In summary, through the above technical solution of the present invention, a universal fluid system component can be obtained, which solves the technical problem that the calculation method for the development of the existing fluid system lacks universality, and when the flow path of the fluid system changes, the calculation program will change accordingly.
[0013] Furthermore, in the component development method based on the fluid simulation platform of the present invention, the test of flow and heat transfer characteristics includes:
[0014] The test results are compared and verified with known data. If all performance indicators of the component meet the preset standards, the verification is considered to have passed and the component development is completed.
[0015] Furthermore, in the component development method based on the fluid simulation platform of the present invention, the testing of flow and heat transfer characteristics further includes:
[0016] Compare and verify the test results with known data. If any of the performance indicators of the component does not meet the preset standard, return to step 1 and repeat steps 1 to 6 until all performance indicators of the component meet the preset standard, and the component development is completed.
[0017] Furthermore, in the component development method based on the fluid simulation platform of the present invention, the physical properties include geometric features of the component.
[0018] Furthermore, in the component development method based on the fluid simulation platform of the present invention, the geometric features include the number of ports of the component, the port positions, the component icon, the component input parameters and output parameters, and the component type.
[0019] Furthermore, in the component development method based on the fluid simulation platform of the present invention, the component types include hole components, loss components, sealing components and rotational components.
[0020] Furthermore, in the component development method based on the fluid simulation platform of the present invention, the linear formula includes a flow characteristic equation; and / or,
[0021] The flow characteristic equation of the local loss element is:
[0022] ;
[0023] ;
[0024] For the flow characteristic equation ,in, is the mass flow rate at the first port, is the pressure coefficient of the first port, is the pressure at the first port, is the coefficient of the second port pressure, is the pressure at the second port, is the mass flow coefficient of the first port;
[0025] For the flow characteristic equation ,in, is the mass flow rate at the second port, is the pressure coefficient of the first port, is the pressure at the first port, is the pressure coefficient of the second port, is the pressure at the second port, is the mass flow coefficient of the second port.
[0026] Furthermore, in the component development method based on the fluid simulation platform of the present invention, the mass flow rate of the component having two ports is determined by the following formula:
[0027] ;
[0028] ;
[0029] in, is the mass flow rate at the first port, is the density of the fluid, is the area of the port, represents the absolute value of the mass flow rate at the first port, is the loss coefficient of the component, is the pressure at the first port, is the pressure at the second port, is the mass flow rate at the second port, Indicates the absolute value of the mass flow rate at the second port.
[0030] In a second aspect, the present invention provides a component development system for executing the above-mentioned component development method based on a fluid simulation platform, wherein the component development system is built based on a B / S architecture, and the component development system includes a client and a server, and the server includes an analysis model building module, a coding module, a code generation module, a code modification module, a compilation module and a test module; wherein:
[0031] An analysis model building module is used to assign an identifier to the component to be developed in the fluid simulation platform and create an analysis model based on the component;
[0032] An encoding module, used for encoding the flow and heat transfer characteristics of the element, and converting the solution process of the nonlinear equation group of the element into a linear iterative solution process;
[0033] The code generation module is used to complete the definition of component attributes on the fluid simulation platform and generate code templates in C++ language;
[0034] A code modification module, used for modifying the code template according to the linear formula of the component;
[0035] The compilation module is used to upload the modified code template to the simulation platform, which will compile and save it;
[0036] The test module is used to integrate the defined components into the fluid simulation network, set boundary conditions, and test the flow and heat transfer characteristics. If the test is qualified, the component development is completed.
[0037] Compared with the prior art, the beneficial effects of the component development system of the present invention are the same as the beneficial effects of the component development method based on the fluid simulation platform described in the above technical solution, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0039] Figure 1 A schematic flow chart of a component development method based on a fluid simulation platform of the present invention;
[0040] Figure 2 A schematic diagram of the components of the development system for the present invention. DETAILED DESCRIPTION
[0041] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0042] It should be noted that when an element is referred to as being "fixed to" or "disposed on" another element, it can be directly on the other element or indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element.
[0043] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined. The meaning of "several" is one or more, unless otherwise clearly and specifically defined.
[0044] Through the simulation analysis of the fluid system, the pressure and temperature of each node in the system and the flow rate in each component can be determined, as well as the changes in each parameter in the system after each input parameter (boundary condition) changes, to ensure that each fluid system can meet the use requirements under various complex conditions. In the field of energy utilization, the investment in the natural gas transmission and distribution pipeline system is huge, and the design and operation scheduling of the natural gas transmission and distribution system is based on the hydraulic analysis of the fluid system. The research on the existing fluid system is often carried out on a certain component in a certain field. These components have great limitations in the use scenarios and conditions. If the numerical calculation is performed completely based on the specific components in the fluid system, the developed calculation method will lose its universality, that is, every time one or a special component is added, the calculation program must be changed again; further, the change of the flow path of the fluid system will cause the calculation program to change accordingly. To avoid this situation, it is necessary to develop a general calculation method for the fluid system that is independent of the specific component, but the current fluid system lacks universal fluid system components and unified management software.
[0045] In order to solve the above technical problems, firstly, please refer to Figure 1 The present invention provides a component development method based on a fluid simulation platform, comprising:
[0046] Step 1, assigning an identifier to the component to be developed in the fluid simulation platform, and creating an analysis model based on the component, wherein the analysis model is used to describe and characterize the physical properties of the component;
[0047] Step 2, encoding the flow and heat transfer characteristics of the element, and converting the nonlinear equation solution process of the element into a linear iterative solution process;
[0048] Step 3, complete the definition of component attributes on the fluid simulation platform and generate a code template in C++ language;
[0049] Step 4, modifying the code template according to the linear formula of the component;
[0050] Step 5, upload the modified code template to the simulation platform, and the platform compiles and saves it;
[0051] Step 6: Integrate the defined components into the fluid simulation network, set boundary conditions, and test the flow and heat transfer characteristics. If the test is qualified, the component development is completed.
[0052] In the case of adopting the above technical solution, in the component development method based on the fluid simulation platform of the present invention, please refer to Figure 1In step 1, by assigning an identifier to the component to be developed on the fluid simulation platform, it is helpful to effectively identify and manage it in the simulation platform, and by creating an analysis model, an accurate basis is provided for the coding and calculation in the subsequent steps; in step 2, the flow and heat transfer characteristics of the component are encoded, which can realize the digital description of the component characteristics so that the computer can process and calculate; after converting the nonlinear equations into a linear iterative solution process, the complexity and difficulty of the calculation can be effectively reduced, and the calculation efficiency and accuracy can be improved. At the same time, this conversion also improves the versatility of the calculation method, making the solution method applicable to different components; in step 3, the definition of the component attributes is completed on the simulation platform, which can ensure that the attributes of the component are consistent and compatible with other parts of the simulation platform, and generate C ++ language code templates provide a standardized framework for subsequent code writing, which helps to reduce coding errors and improve the readability of the code; in step 4, the code template is modified according to the linear formula of the component to ensure that the calculation code can accurately reflect the physical properties and flow and heat transfer characteristics of the component; in step 5, the modified code template is uploaded to the simulation platform to ensure that the code is correctly executed in the simulation environment, and the platform compiles and saves the code to ensure the stability and reliability of the code, and also facilitates subsequent calls and modifications; in step 6, the defined components are integrated into the fluid simulation network to verify the performance of the components in complex fluid systems. By setting boundary conditions and testing, if the test is qualified, the component development is completed and can be applied to actual fluid systems. In summary, through the above technical solution of the present invention, a universal fluid system component can be obtained, which solves the technical problem that the calculation method for the development of existing fluid systems lacks universality and the calculation program will change when the flow path of the fluid system changes.
[0053] Second, see Figure 2 The present invention provides a component development system for executing the component development method based on the fluid simulation platform. The component development system is built based on a B / S architecture. The component development system includes a client and a server. The server includes an analysis model building module, a coding module, a code generation module, a code modification module, a compilation module and a test module; wherein:
[0054] An analysis model building module is used to assign an identifier to the component to be developed in the fluid simulation platform and create an analysis model based on the component;
[0055] An encoding module, used for encoding the flow and heat transfer characteristics of the element, and converting the solution process of the nonlinear equation group of the element into a linear iterative solution process;
[0056] The code generation module is used to complete the definition of component attributes on the fluid simulation platform and generate code templates in C++ language;
[0057] A code modification module, used for modifying the code template according to the linear formula of the component;
[0058] The compilation module is used to upload the modified code template to the simulation platform, which will compile and save it;
[0059] The test module is used to integrate the defined components into the fluid simulation network, set boundary conditions, and test the flow and heat transfer characteristics. If the test is qualified, the component development is completed.
[0060] When the above technical solution is adopted, the component development system of the present invention is used to execute the above component development method based on the fluid simulation platform and provides a unified management platform.
[0061] In order to better understand the present invention, the content of the present invention is further explained below in conjunction with specific embodiments, but the content of the present invention is not limited to the following embodiments.
[0062] Example 1
[0063] In a first aspect, this embodiment provides a component development method based on a fluid simulation platform, comprising the following steps:
[0064] Step 1, assigning an identifier to the component to be developed in the fluid simulation platform, and creating an analysis model based on the component, wherein the analysis model is used to describe and characterize the physical properties of the component;
[0065] Step 2, encoding the flow and heat transfer characteristics of the element, and converting the nonlinear equation solution process of the element into a linear iterative solution process;
[0066] Step 3, complete the definition of component attributes on the fluid simulation platform and generate a code template in C++ language;
[0067] Step 4, modifying the code template according to the linear formula of the component;
[0068] Step 5, upload the modified code template to the simulation platform, and the platform compiles and saves it;
[0069] Step 6, integrate the defined components into the fluid simulation network, set boundary conditions, and test the flow and heat transfer characteristics. Compare and verify the test results with the known data. If all performance indicators of the component meet the preset standards, it is considered to have been verified and the component development is completed. If any of the performance indicators of the component does not meet the preset standards, return to step 1 and repeat steps 1 to 6 until all performance indicators of the component meet the preset standards and the component development is completed.
[0070] Example 2
[0071] In a first aspect, this embodiment provides a component development method based on a fluid simulation platform, comprising the following steps:
[0072] Step 1, assigning an identifier to the component to be developed in the fluid simulation platform, and creating an analysis model based on the component, wherein the analysis model is used to describe and characterize the physical properties of the component;
[0073] Wherein, the physical characteristic is a geometric feature;
[0074] Further, the geometric features may include the number of ports, port positions, component icons, component input parameters and output parameters, and component types of the component; wherein the component types include hole components, loss components, sealing components, and rotational components;
[0075] Step 2, encoding the flow and heat transfer characteristics of the element, and converting the nonlinear equation solution process of the element into a linear iterative solution process;
[0076] Step 3, complete the definition of component attributes on the fluid simulation platform and generate a code template in C++ language;
[0077] Step 4, modifying the code template according to the linear formula of the component;
[0078] Further, the linear formula includes flow characteristic equations;
[0079] Furthermore, the flow characteristic equation of the local loss element is:
[0080] ;
[0081] ;
[0082] For the flow characteristic equation ,in, is the mass flow rate at the first port, is the pressure coefficient of the first port, is the pressure at the first port, is the coefficient of the second port pressure, is the pressure at the second port, is the mass flow coefficient of the first port;
[0083] For the flow characteristic equation ,in, is the mass flow rate at the second port, is the pressure coefficient of the first port, is the pressure at the first port, is the pressure coefficient of the second port, is the pressure at the second port, is the mass flow coefficient of the second port;
[0084] Further, the mass flow rate of the element having two ports is determined by the following formula:
[0085] ;
[0086] ;
[0087] in, is the mass flow rate at the first port, is the density of the fluid, is the area of the port, represents the absolute value of the mass flow rate at the first port, is the loss coefficient of the component, is the pressure at the first port, is the pressure at the second port, is the mass flow rate at the second port, represents the absolute value of the mass flow rate at the second port;
[0088] Step 5, upload the modified code template to the simulation platform, and the platform compiles and saves it;
[0089] Step 6, integrate the defined components into the fluid simulation network, set boundary conditions, and test the flow and heat transfer characteristics. Compare and verify the test results with the known data. If all performance indicators of the component meet the preset standards, it is considered to have been verified and the component development is completed. If any of the performance indicators of the component does not meet the preset standards, return to step 1 and repeat steps 1 to 6 until all performance indicators of the component meet the preset standards and the component development is completed.
[0090] Example 3
[0091] In a first aspect, this embodiment provides a component development method based on a fluid simulation platform, comprising the following steps:
[0092] S100, assigning an identifier to the component to be developed on the fluid simulation platform, and creating an analysis model according to the component, wherein the analysis model is used to describe and characterize physical properties of the component;
[0093] Wherein, the physical characteristic is a geometric feature;
[0094] Further, the geometric features may include the number of ports, port positions, component icons, component input parameters and output parameters, and component types of the component; wherein the component types include hole components, loss components, sealing components, and rotational components;
[0095] S200, encoding the flow and heat transfer characteristics of the element, and converting the solution process of the nonlinear equation group of the element into a linear iterative solution process;
[0096] S300, completes the definition of component attributes on the fluid simulation platform and generates a code template in C++ language;
[0097] S400, modifying the code template according to the linear formula of the component;
[0098] Further, the linear formula includes flow characteristic equations;
[0099] Furthermore, the flow characteristic equation of the local loss element is:
[0100] ;
[0101] ;
[0102] For the flow characteristic equation ,in, is the mass flow rate at the first port, is the pressure coefficient of the first port, is the pressure at the first port, is the coefficient of the second port pressure, is the pressure at the second port, is the mass flow coefficient of the first port;
[0103] For the flow characteristic equation ,in, is the mass flow rate at the second port, is the pressure coefficient of the first port, is the pressure at the first port, is the pressure coefficient of the second port, is the pressure at the second port, is the mass flow coefficient of the second port;
[0104] Further, the mass flow rate of the element having two ports is determined by the following formula:
[0105] ;
[0106] ;
[0107] in, is the mass flow rate at the first port, is the density of the fluid, is the area of the port, represents the absolute value of the mass flow rate at the first port, is the loss coefficient of the component, is the pressure at the first port, is the pressure at the second port, is the mass flow rate at the second port, represents the absolute value of the mass flow rate at the second port;
[0108] S500, uploading the modified code template to the simulation platform, and the platform compiles and saves it;
[0109] S600, integrate the defined components into the fluid simulation network, set boundary conditions, and test the flow and heat transfer characteristics. Compare and verify the test results with known data. If all performance indicators of the component meet the preset standards, it is considered that the verification has passed and the component development is completed. If any of the performance indicators of the component does not meet the preset standards, return to step S100 and repeat steps S100 to S600 until all performance indicators of the component meet the preset standards and the component development is completed.
[0110] It should be noted that the above fluid simulation platform is a general fluid system simulation platform. Different fluid components have different flow and heat transfer characteristics, but their matrix structure in the entire fluid network is the same. Therefore, in step S300, the definition of component attributes is completed in the fluid simulation platform, that is, in the process of defining components, an identifiable analysis model is created based on the characteristics of the components. When performing calculations, these analysis models are called to complete the calculations. In the process of creating the analysis model, the analysis model is used to describe and characterize the physical characteristics of the component, and then the component model is obtained. The component model generally describes the physical characteristics of the component including various aspects such as geometric characteristics, specifically: (1) the number and position of the ports contained in the component, and the icon of the component; (2) the type of component, including compressible and incompressible; (3) the input and output parameters of the component; (4) For each component, there is a unique GUID (Global Unique Identifier) in the general fluid system simulation platform to identify different components. The analysis model of the component is defined in the general fluid system simulation platform, and the physical characteristics of the component are written into the component.
[0111] Furthermore, the principle of the general fluid system simulation platform for solving fluid networks is to list a set of nonlinear equations based on the relationship between the mass flow rate and the inlet and outlet pressures of each port of a given component, combined with boundary conditions, and then solve them through an iterative process. Therefore, the core of defining the work of a component is to give the flow and heat transfer characteristics of the component and write them into the code in a form that the software can recognize. The core of the software solution is to perform Gaussian iteration based on the relationship between mass flow and pressure. When users customize components, they need to specify the corresponding relationship between the inlet and outlet pressure and the mass flow rate of the component in the form of code. The general fluid system simulation platform uses the "linearization" technology to convert the solution of complex nonlinear equations into a linear iterative process, so that the problem of fluid system calculation is simplified to solving a set of linear equations. For the steady-state simulation of components in the fluid network, the general fluid system simulation platform requires that the pressure of the component port and the component flow be expressed as a set of linear equations; among which:
[0112] For a component with two ports, the system of equations looks like this:
[0113] ; (1)
[0114] is the mass flow rate at the first port, is the pressure coefficient of the first port, is the pressure at the first port, is the coefficient of the second port pressure, is the pressure at the second port, is the mass flow coefficient of the first port;
[0115] The coefficients in equation (1) above must be derived and returned to the general fluid system simulation platform, which then solves the fluid network problem through iteration;
[0116] For a local loss element, its flow characteristic equation is as follows:
[0117] ; (2)
[0118] ; (3)
[0119] For the flow characteristic equation ,in, is the mass flow rate at the first port, is the pressure coefficient of the first port, is the pressure at the first port, is the coefficient of the second port pressure, is the pressure at the second port, is the mass flow coefficient of the first port;
[0120] For the flow characteristic equation ,in, is the mass flow rate at the second port, is the pressure coefficient of the first port, is the pressure at the first port, is the pressure coefficient of the second port, is the pressure at the second port, is the mass flow coefficient of the second port;
[0121] The coefficients in equations (2) and (3) above must be derived and returned to the general fluid system simulation platform, which then solves the fluid network problem through iteration;
[0122] For a local loss element, its flow characteristic equation is as follows:
[0123] ; (4)
[0124] in, is the pressure loss of the fluid flowing through the element, is the loss coefficient of the component, is the fluid density, is the port area, is the port mass flow rate, is the absolute value of the port mass flow rate;
[0125] Furthermore, it is also necessary to consider the positive and negative pressure changes and flow direction. For example, the flow from the element to the node is considered positive, and the flow from the element to the node is considered negative. The following equation gives the calculation process of the mass flow of an element with two ports:
[0126] ; (5)
[0127] ; (6)
[0128] in, is the mass flow rate at the first port, is the density of the fluid, is the area of the port, represents the absolute value of the mass flow rate at the first port, is the loss coefficient of the component, is the pressure at the first port, is the pressure at the second port, is the mass flow rate at the second port, represents the absolute value of the mass flow rate at the second port;
[0129] Arranging the above two equations, we get:
[0130] (7)
[0131] (8)
[0132] in, is the mass flow rate at the first port, is the density of the fluid, is the area of the port, represents the absolute value of the mass flow rate at the first port, is the loss coefficient of the component, is the pressure at the first port, is the pressure at the second port, is the mass flow rate at the second port, represents the absolute value of the mass flow rate at the second port;
[0133] For the linear equations of the two-port element, the coefficients of the linear equations can be obtained as follows:
[0134] ;
[0135] in, is the pressure coefficient of the first port in the above formula (2); is the pressure coefficient of the second port in the above formula (2), is the pressure coefficient of the first port in the above formula (3), is the pressure coefficient of the second port in the above formula (4), represents the absolute value of the mass flow rate at the first port, represents the absolute value of the mass flow rate at the second port, is the density of the fluid, is the area of the port, is the loss coefficient of the component;
[0136] Furthermore, for the steady-state case, there is no flow accumulation inside the loss element, and the mass flow rate entering the element is equal to the mass flow rate flowing out of the element, so the above equation is symmetrical and can be redefined as follows:
[0137] ;
[0138] in, is the pressure coefficient of the first port in the above formula (2), is the pressure coefficient of the second port in the above formula (2), is the pressure coefficient of the first port in the above formula (3), is the pressure coefficient of the second port in the above formula (4), represents the absolute value of the mass flow rate at the first port, is the density of the fluid, is the area of the port, is the loss coefficient of the component;
[0139] Furthermore, for local loss elements, the coefficient and is zero, in a linear equation, the coefficient It represents the mass flow rate that is independent of pressure. The flow rate of the local loss element is related to pressure. Unless there is a pressure difference, there is no mass flow rate. For elements that can output energy to the system, such as pumps, their linear formula contains a mass flow rate that is independent of pressure, that is, Not zero.
[0140] Furthermore, after defining various properties of components in the general fluid system simulation platform, the platform will automatically generate a C++ language code template, which needs to be modified according to the component linearization formula. The main modifications include obtaining component input and output parameters and setting component equation coefficients. For components with heat exchange, heat exchange must also be added. After the code is modified, upload it to the platform, and the platform will compile and save the uploaded code.
[0141] Furthermore, the key step in developing a component is to verify its correctness, connect the defined component to the fluid simulation network, give boundary conditions, test its flow and heat transfer characteristics, and compare them with the known formula. If the various quantities of the component meet the formula, it means that the custom component has been successfully created, otherwise it is necessary to start again from step S100 until the various quantities of the component meet the formula, end the verification, and complete the component development.
[0142] In a second aspect, this embodiment further provides a component development system for executing the above-mentioned component development method based on the fluid simulation platform, wherein the component development system is built based on a B / S architecture, and the component development system includes a client and a server, and the server includes an analysis model building module, a coding module, a code generation module, a code modification module, a compilation module, and a testing module; wherein:
[0143] An analysis model building module is used to assign an identifier to the component to be developed in the fluid simulation platform and create an analysis model based on the component;
[0144] An encoding module, used for encoding the flow and heat transfer characteristics of the element, and converting the solution process of the nonlinear equation group of the element into a linear iterative solution process;
[0145] The code generation module is used to complete the definition of component attributes on the fluid simulation platform and generate code templates in C++ language;
[0146] A code modification module, used for modifying the code template according to the linear formula of the component;
[0147] The compilation module is used to upload the modified code template to the simulation platform, which will compile and save it;
[0148] The test module is used to integrate the defined components into the fluid simulation network, set boundary conditions, and test the flow and heat transfer characteristics. If the test is qualified, the component development is completed.
[0149] In the description of the above embodiments, specific features, structures, materials or characteristics may be combined in a suitable manner in any one or more embodiments or examples.
[0150] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A component development method based on a fluid simulation platform, characterized in that: include: Step 1, assigning an identifier to the component to be developed in the fluid simulation platform, and creating an analysis model based on the component, wherein the analysis model is used to describe and characterize the physical properties of the component; Step 2, encoding the flow and heat transfer characteristics of the element, and converting the nonlinear equation solution process of the element into a linear iterative solution process; Step 3, complete the definition of component attributes on the fluid simulation platform and generate a code template in C++ language; Step 4, modifying the code template according to the linear formula of the component; Step 5, upload the modified code template to the simulation platform, and the platform compiles and saves it; Step 6: Integrate the defined components into the fluid simulation network, set boundary conditions, and test the flow and heat transfer characteristics. If the test is qualified, the component development is completed.
2. The component development method based on the fluid simulation platform according to claim 1, characterized in that: The test of flow and heat transfer characteristics includes: The test results are compared and verified with known data. If all performance indicators of the component meet the preset standards, the verification is considered to have passed and the component development is completed.
3. The component development method based on the fluid simulation platform according to claim 2 is characterized in that: The test of flow and heat transfer characteristics also includes: Compare and verify the test results with known data. If any of the performance indicators of the component does not meet the preset standard, return to step 1 and repeat steps 1 to 6 until all performance indicators of the component meet the preset standard, and the component development is completed.
4. The component development method based on the fluid simulation platform according to claim 3 is characterized in that: The physical properties include geometric features of the element.
5. The component development method based on the fluid simulation platform according to claim 4, characterized in that: The geometric features include the number of ports of the component, the port positions, the component icon, the component input parameters and output parameters, and the component type.
6. The component development method based on the fluid simulation platform according to claim 5, characterized in that: The element types include orifice elements, loss elements, sealing elements, and rotational elements.
7. The component development method based on the fluid simulation platform according to claim 6 is characterized in that: The linear formula includes a flow characteristic equation; and / or, The flow characteristic equation of the local loss element is: ; ; For the flow characteristic equation ,in, is the mass flow rate at the first port, is the pressure coefficient of the first port, is the pressure at the first port, is the coefficient of the second port pressure, is the pressure at the second port, is the mass flow coefficient of the first port; For the flow characteristic equation ,in, is the mass flow rate at the second port, is the pressure coefficient of the first port, is the pressure at the first port, is the pressure coefficient of the second port, is the pressure at the second port, is the mass flow coefficient of the second port.
8. The component development method based on the fluid simulation platform according to claim 7, characterized in that: The mass flow rate of the element with two ports is determined by the following equation: ; ; in, is the mass flow rate at the first port, is the density of the fluid, is the area of the port, represents the absolute value of the mass flow rate at the first port, is the loss coefficient of the component, is the pressure at the first port, is the pressure at the second port, is the mass flow rate at the second port, Indicates the absolute value of the mass flow rate at the second port.
9. A component development system, characterized in that: The component development method based on the fluid simulation platform is used to execute any one of claims 1 to 8, wherein the component development system is built based on a B / S architecture, and the component development system includes a client and a server, and the server includes an analysis model building module, a coding module, a code generation module, a code modification module, a compilation module and a test module; wherein: An analysis model building module is used to assign an identifier to the component to be developed in the fluid simulation platform and create an analysis model based on the component; An encoding module, used for encoding the flow and heat transfer characteristics of the element, and converting the solution process of the nonlinear equation group of the element into a linear iterative solution process; The code generation module is used to complete the definition of component attributes on the fluid simulation platform and generate code templates in C++ language; A code modification module, used for modifying the code template according to the linear formula of the component; The compilation module is used to upload the modified code template to the simulation platform, which will compile and save it; The test module is used to integrate the defined components into the fluid simulation network, set boundary conditions, and test the flow and heat transfer characteristics. If the test is qualified, the component development is completed.