Physical property hybrid solving method and device applied to digital twinning, equipment and medium

By employing a hybrid solution method combining discriminant and flexible switching iterative and analytical methods in the digital twin system of chemical processes, the problem of time-consuming property calculations was solved, thereby improving the calculation speed and robustness of the digital twin system for chemical processes.

CN119724389BActive Publication Date: 2025-11-21CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411771124.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-11-21
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

In existing digital twin systems for chemical processes, the calculation of physical properties is time-consuming, and traditional methods cannot guarantee calculation speed and robustness in all cases, thus affecting system performance.

Method used

By acquiring the physical property data of the digital twin system, a state equation is established, and the solution of the state equation is determined using the discriminant. In the case of three real roots, the discriminant is used directly for solution, while in the case of one real root, iterative and analytical methods are flexibly switched to solve the problem, avoiding unnecessary root solving and sorting.

Benefits of technology

It improves the solution speed and robustness of cubic equations of state, significantly enhances the overall performance of the digital twin system for chemical processes, reduces computation time, and improves accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119724389B_ABST
    Figure CN119724389B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of chemical process digital twinning, and discloses a physical property mixing solving method, device, equipment and medium applied to digital twinning, comprising: obtaining physical property data of a digital twinning system; establishing a state equation and a state equation coefficient corresponding to the digital twinning system according to a mixing rule and the physical property data; calculating a discriminant by using the state equation coefficient, and determining that the state equation has three real number solutions or a single real number solution by using the discriminant; when the state equation has three real number solutions, calculating a compression factor of a target phase state by using an analytical method; when the state equation has a single real number solution, calculating the compression factor of the target phase state by using an iterative method; and simulating and optimizing the digital twinning system by using the compression factor to obtain an optimized target digital twinning system. The present application improves the solving speed of the state equation on the basis of meeting the robustness requirement of state equation solving, and significantly improves the overall performance of the calculation speed of the chemical process digital twinning system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of chemical process digital twinning, in particular to a physical property mixed solving method, device, equipment and medium applied to digital twinning. BACKGROUND

[0002] The cubic equation of state (CEoS) solving is an important part of the chemical process digital twinning system and is the basis for the calculation of phase equilibrium related modules such as flash tanks and towers. In the chemical process digital twinning system, accurate calculation of the physical parameters of the material is crucial for predicting the behavior and performance of the material. CEoS is a classic physical property calculation tool and is widely used in process simulation. It is mainly used to solve the compression factor to calculate the molar volume, enthalpy, entropy and fugacity of thermodynamic properties. At the same time, the solving of CEoS is the most basic and most frequently called calculation in the chemical process digital twinning system, and the speed and robustness of the calculation are very important.

[0003] In related technologies, there are mainly two methods for solving CEoS: one is the analytical method represented by the Cardano formula, which is characterized by flexibility, simple form and easy implementation of code program. However, it involves the calculation of trigonometric functions and cubic roots, and the speed is relatively slow. The second is the numerical method (iterative method), which first uses Newton's iterative method to find a root, and then substitutes the root into the original equation to find other roots. The numerical method is fast and can largely avoid rounding errors, but it has certain requirements for the selection of initial values. If a good initial value cannot be given, it will lead to slow convergence or even non-convergence. The number of real roots of CEoS may be three or one. For the case of three roots, the smallest corresponds to the liquid phase, the largest corresponds to the gas phase, and the middle one has no physical meaning. In the traditional method, all three roots need to be solved and sorted to ensure that the roots are assigned to the correct phase state. The iterative method is faster but cannot guarantee that it is better than the analytical method in all cases, and it may even need additional programs to handle failed calculations, which to some extent affects the performance of the entire system. SUMMARY

[0004] Therefore, the present application provides a physical property mixed solving method, device, equipment and medium applied to digital twinning to solve the problem of time-consuming physical property calculation in the existing chemical process digital twinning system.

[0005] In a first aspect, the present application provides a physical property mixed solving method applied to digital twinning, the method comprising:

[0006] Obtaining physical property data of the digital twinning system, the physical property data including critical temperature, critical pressure, eccentricity factor and binary interaction parameter;

[0007] According to the mixing rule and the physical property data, a state equation and state equation coefficients corresponding to the digital twinning system are established.

[0008] A discriminant is calculated using the state equation coefficient, and the discriminant is used to determine whether the state equation has three real solutions or a single real solution;

[0009] When the state equation has three real solutions, an analytical method is used to calculate the compression factor of the target phase state;

[0010] When the state equation has a single real solution, an iterative method is used to calculate the compression factor of the target phase state;

[0011] The compression factor is used to simulate and optimize the digital twin system to obtain an optimized target digital twin system.

[0012] In the present application, by obtaining the physical property data of the digital twin system, establishing a state equation, and using a discriminant to determine the solution of the state equation, in the case of three real roots, the discriminant is directly used for solving, avoiding unnecessary root solving and sorting; in the case of a single real root, the initial value can be given by a simple method and the iterative method and the analytical method are flexibly switched for solving, so that the method has both calculation speed and robustness, on the basis of meeting the robustness requirement of cubic state equation solving, the solving speed of the cubic state equation can be greatly improved. The improvement of the solving method of the cubic state equation, which is the most frequent calculation in the digital twin of chemical process, can significantly improve the performance of the entire digital twin system of chemical process, and further significantly improve the overall performance of the calculation speed of the digital twin system of chemical process.

[0013] In an alternative embodiment, a state equation corresponding to the digital twin system is established according to the mixing rule and the physical property data, comprising:

[0014] A physical property database, a unit calculation module and a simulation flowchart of the digital twin system are established, and the unit calculation module includes chemical unit equipment and mathematical models corresponding to each chemical unit equipment;

[0015] Based on the chemical unit equipment corresponding to the digital twin system, the physical property data and the mathematical model of the chemical unit equipment are obtained;

[0016] According to the mixing rule, the state equation coefficient corresponding to the digital twin system is calculated;

[0017] Based on the state equation coefficient, the state equation is converted to obtain a standard form of the state equation.

[0018] In this way, by establishing a chemical process digital twin system composed of a physical property database, a unit calculation module and a simulation flowchart, obtaining physical property data, calculating state equation coefficients according to the mixing rule, and converting them into a standard form represented by a compression factor, the state equation can be easily solved.

[0019] In an alternative embodiment, a discriminant is calculated using the state equation coefficients, and the discriminant is used to determine whether the state equation has three real solutions or a single real solution, including:

[0020] A first intermediate variable and a second intermediate variable are calculated using the state equation coefficients;

[0021] A discriminant is calculated using the first intermediate variable and the second intermediate variable;

[0022] It is determined whether the discriminant is greater than 0;

[0023] When the discriminant is greater than 0, it is determined that the state equation has a single real solution;

[0024] When the discriminant is less than or equal to 0, it is determined that the state equation has three real solutions.

[0025] In this approach, by determining whether the discriminant is greater than 0, when the discriminant is greater than 0, it is determined that the state equation has a single real solution, and when the discriminant is less than or equal to 0, it is determined that the state equation has three real solutions, without the need to sort all three solutions after they are calculated to ensure that the solutions are assigned to the correct phase state, greatly reducing the time cost of solving and improving the solving speed.

[0026] In an alternative embodiment, the first intermediate variable and the second intermediate variable are calculated using the following formula:

[0027]

[0028] Wherein, α, β and γ are different state equation coefficients of the state equation, R is the first intermediate variable, and Q is the second intermediate variable;

[0029] The discriminant is calculated using the following formula:

[0030] D = Q 3 + R 2

[0031] Wherein, D is the discriminant.

[0032] In this approach, according to the theory of Cardano's formula, the number of real solutions of the state equation can be determined by whether the discriminant D is greater than 0, improving the solving speed of the state equation and also ensuring the accuracy of the state equation solution.

[0033] In an alternative embodiment, the compression factor of the target phase state is calculated using an analytical method, including:

[0034] A third intermediate variable is calculated using the first intermediate variable and the second intermediate variable using the following formula:

[0035]

[0036] wherein R is a first intermediate variable, Q is a second intermediate variable, and θ is a third intermediate variable;

[0037] The compression factor of the target phase is calculated using the first intermediate variable and the third intermediate variable.

[0038] In this mode, according to the physical meaning of the state equation, in the case of three real roots, the maximum root corresponds to the gas phase, the minimum root corresponds to the liquid phase, and the three roots of the Cardano formula are ordered, so using the Cardano formula, without sorting the three roots after obtaining them, the root of the specified phase can be directly solved, reducing the cost of the test piece and improving the solving speed of the state equation.

[0039] In an optional embodiment, the compression factor of the target phase is calculated using an iterative method, comprising:

[0040] setting an upper limit of the number of iterations;

[0041] using the state equation coefficients and the compression factor of the current iteration number to calculate the compression factor of the next iteration number;

[0042] determining whether the current iteration number is greater than the upper limit of the number of iterations;

[0043] when the current iteration number is less than or equal to the upper limit of the number of iterations, using the Newton iteration formula, the first intermediate variable and the state equation coefficients to calculate the compression factor of the target phase;

[0044] when the current iteration number is greater than the upper limit of the number of iterations, using the Cardano formula to solve the compression factor of the target phase.

[0045] In this mode, in the case of a single real root, since the physical meaning of the compression factor is the correction of the real fluid to the ideal gas, the molar volume of the liquid phase is much smaller than that of the gas phase, the compression factor is close to 0, and the compression factor corresponding to the ideal gas is 1, therefore, the Newton iteration method is used for state equation solving, which greatly improves the solving speed of the cubic equation of state CEoS, thereby effectively improving the overall performance of the digital twin system of the chemical process.

[0046] In a second aspect, the present application provides a physical property mixing solving device applied to digital twinning, the device comprising:

[0047] a data acquisition module for acquiring physical property data of the digital twinning system, the physical property data including critical temperature, critical pressure, eccentricity factor and binary interaction parameter;

[0048] an equation establishing module for establishing a state equation and state equation coefficients corresponding to the digital twinning system according to the mixing rule and the physical property data.

[0049] The equation solution determination module is used to calculate the discriminant using the coefficients of the state equation, and then use the discriminant to determine whether the state equation has three real solutions or a single real solution.

[0050] The three real solution module is used to calculate the compressibility factor of the target phase state using analytical methods when the state equation has three real solutions.

[0051] The single real solution solving module is used to calculate the compressibility factor of the target phase state using an iterative method when the state equation has a single real solution.

[0052] The simulation calculation module is used to simulate and optimize the digital twin system using a compression factor to obtain the optimized target digital twin system.

[0053] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the above-described method for solving hybrid physical properties of digital twins, or any of its corresponding embodiments.

[0054] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the hybrid property solving method for digital twins described in the first aspect or any corresponding embodiment thereof.

[0055] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the hybrid property solving method for digital twins described in the first aspect or any corresponding embodiment thereof. Attached Figure Description

[0056] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0057] Figure 1 This is a flowchart illustrating a hybrid property solution method for digital twins according to an embodiment of the present invention.

[0058] Figure 2 This is a flowchart illustrating a hybrid CEoS solution method for digital twins according to an embodiment of the present invention.

[0059] Figure 3is an iterative structure schematic diagram of a sequential modular method according to an embodiment of the present application.

[0060] Figure 4 is a flow schematic diagram of another physical property mixed solving method applied to digital twinning according to an embodiment of the present application.

[0061] Figure 5 is a flow schematic diagram of still another physical property mixed solving method applied to digital twinning according to an embodiment of the present application.

[0062] Figure 6 is a structural block diagram of a physical property mixed solving device applied to digital twinning according to an embodiment of the present application.

[0063] Figure 7 is a hardware structure schematic diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0064] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in a clear and complete manner with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0065] In the related art, there are mainly two methods for solving the CEoS: one is the analytical method represented by the Cardano formula, which has the characteristics of flexible use, simple form, and easy code program implementation, but involves the calculation of trigonometric functions and cubic roots, and the speed is relatively slow. The second is the numerical method (iterative method). The numerical method is to first use the Newton iteration method to obtain a root, and then substitute the root into the original equation to obtain other roots. The numerical method is fast and can avoid rounding errors to a great extent, but has certain requirements for the selection of initial values. If a good initial value cannot be given, it will lead to slow convergence or even non-convergence. The number of real roots of the CEoS may be three or one. For the case of three roots, the smallest corresponds to the liquid phase, the largest corresponds to the gas phase, and the middle one has no physical meaning. In the traditional method, all three roots need to be solved and then sorted to ensure that the roots are assigned to the correct phase state. The iterative method is faster but cannot guarantee that it is better than the analytical method in all cases. Even additional programs are needed to handle the calculation failure, which affects the performance of the entire system to some extent.

[0066] To solve the above problems, the embodiment of the present application provides a physical property mixed solving method applied to digital twinning, which is used in a computer device, and it should be noted that the execution subject can be a physical property mixed solving device applied to digital twinning, which can be realized by software, hardware or a combination of software and hardware to become part or all of the computer device, wherein the computer device can be a terminal or a client or a server, the server can be a server or a server cluster composed of multiple servers, and the terminal in the embodiment of the present application can be a smart phone, a personal computer, a tablet computer or other smart hardware devices. In the following method embodiment, the execution subject is taken as an example of the computer device.

[0067] The computer device in the embodiment is suitable for the use scenario of solving the cubic equation of state in the calculation process of the phase equilibrium related modules such as flash tanks and towers in the digital twinning system of a chemical process. The physical property mixed solving method applied to digital twinning is provided, the physical property data of the digital twinning system is acquired, the equation of state is established, the discriminant is used to determine the solution of the equation of state, the discriminant is directly used for solving in the case of three real roots, unnecessary root solving and sorting are avoided, in the case of a single real root, the initial value can be given by a simple method and the iterative method and the analytical method are flexibly switched for solving, so that the method has both calculation speed and robustness, on the basis of meeting the robustness requirement of the cubic equation of state solving, the solving speed of the cubic equation of state can be greatly improved, the cubic equation of state solving is the most frequent calculation in the digital twinning of a chemical process, and the improvement of the solving method can obviously improve the performance of the entire digital twinning system of a chemical process, and further improve the overall performance of the calculation speed of the digital twinning system of a chemical process.

[0068] According to the embodiment of the present application, a physical property mixed solving method applied to digital twinning is provided, and it should be noted that the steps shown in the flowchart can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from here.

[0069] In the embodiment, a physical property mixed solving method applied to digital twinning is provided, which can be used in the above computer device, Figure 1 The flowchart of the physical property mixed solving method applied to digital twinning according to the embodiment of the present application is as shown in Figure 1 The flowchart includes the following steps:

[0070] In step S101, the physical property data of the digital twinning system is acquired.

[0071] In the embodiment of the present application, the property data includes critical temperature, critical pressure, eccentricity factor and binary interaction parameter.

[0072] In an example, by establishing a system hardware and software environment, a chemical process digital twin system composed of a property database, a unit calculation module, a simulation flowchart, etc. is established, and a property calculation interface is provided. Based on SRK, PR and other property methods, property data is obtained.

[0073] Specifically, the property database mainly includes basic property data such as critical parameters, eccentricity factors, binary interaction parameters, and 25-degree ideal gas generation enthalpy, as well as temperature correlation parameters such as saturated steam pressure and ideal gas enthalpy. The property data at least includes the critical temperature, critical pressure, eccentricity factor and binary interaction parameter of each component required for establishing a cubic equation of state (CEoS).

[0074] The unit calculation module is a common chemical unit device such as a flash tank, a rectifying tower, and a heat exchanger, and its corresponding mathematical model, which includes a unit model and a solving program. Taking a flash tank as an example, the mathematical model of the flash tank can be generally expressed as: component material balance equation z i F = x i L + y i V; phase equilibrium equation y i = K i (T, P, Z L (T, P, x i ), Z V (T, P, y i )) x i ; material balance equation F = L + V; energy balance equation H F F + Q = H L (T, P, Z L (T, P, x i )) L + H V (T, P, Z V (T, P, y i )) V; component constraint equation

[0075] Wherein, z i is the feed composition, F is the feed flow rate, y i and x i are the gas phase and liquid compositions respectively, V and L are the gas phase and liquid phase flow rates respectively, H F is the feed enthalpy, Q is the heat load, H V and H L are the gas phase and liquid phase enthalpies respectively, which are functions of temperature T, pressure P and compression factor. Z V and Z L are the gas phase and liquid phase compression factors respectively, which are functions of temperature, pressure and composition. Ki The phase equilibrium constant is also a function of temperature, pressure and composition.

[0076] The simulation flowchart includes the connection relationship between each unit module and the operation sequence, and is usually represented by a directed graph structure.

[0077] The property calculation interface requires the unit module to obtain the property calculation result, such as the flash module needing to obtain K i (T, P, Z L (T, P, x i ), Z V (T, P, y i )) and H L (T, P, Z L (T, P, x i )) and H V (T, P, Z V (T, P, y i )) and other thermodynamic data.

[0078] In step S102, the state equation and the state equation coefficient corresponding to the digital twin system are established according to the mixing rule and the property data.

[0079] In an example, the CEoS state equation coefficient is calculated according to the mixing rule, and is converted into a standard form represented by the compressibility factor. The data is obtained from the property database established in the above step, and the CEoS state equation coefficient is calculated.

[0080] In step S103, the discriminant is calculated by using the state equation coefficient, and the discriminant is used to determine whether the state equation has three real solutions or a single real solution.

[0081] In an example, according to the theory of Cardano formula, whether the number of real solutions of the state equation is determined by whether the discriminant D is greater than 0, if D is less than or equal to 0, there are three real roots, if D is greater than 0, there is only one real root, wherein D is the discriminant of the Cardano formula.

[0082] In step S104, when the state equation has three real solutions, the compressibility factor of the target phase state is calculated by using the analytical method.

[0083] In an example, according to the physical meaning of the state equation, the maximum root corresponds to the gas phase and the minimum root corresponds to the liquid phase in the three real root case, and the three roots of the Cardano formula are ordered. Using the Cardano formula, the specified phase state root is directly obtained without sorting the three roots.

[0084] In step S105, when the state equation has a single real solution, the compressibility factor of the target phase state is calculated by using the iterative method.

[0085] In an example, the Newton iteration method is used to solve the single real root case, and the physical meaning of the compressibility factor is the correction of the real fluid to the ideal gas. The molar volume of the liquid phase is much smaller than that of the gas phase, and the compressibility factor is close to 0, while the compressibility factor corresponding to the ideal gas is 1. Therefore, the initial value of the liquid phase root is set to 0.01, and the initial value of the gas phase root is set to 1. In addition, the upper limit of the iteration number is set (which can be 6-8 times), and if the upper limit is exceeded, the Cardano formula is used to solve.

[0086] In step S106, the compressibility factor is used to simulate and optimize the digital twin system, and an optimized target digital twin system is obtained.

[0087] In an implementation scenario, Figure 2 is a flowchart of a CEoS mixed solving method for digital twinning according to an embodiment of the application, as Figure 2 shown, the CEoS mixed solving method for digital twinning includes the following steps: obtaining property data. According to the mixed rule and the property data, the state equation is established, the CEoS state equation coefficient is calculated, and the standard form expressed by the compressibility factor is converted. Determine the number of real solutions of the state equation by judging whether the discriminant is greater than 0. If D is less than or equal to 0, there are three real roots, and if D is greater than 0, there is only one real root. When D>0, try to solve the state equation by iteration method; judge whether the iteration converges within a specified number of times, output the compressibility factor when the iteration converges within a specified number of times; when the iteration does not converge within a specified number of times, calculate the compressibility factor using the Cardano formula; when D is not greater than 0, calculate the compressibility factor of the specified phase state using the improved Cardano formula, Figure 3 is an iteration structure diagram of a sequential modular method according to an embodiment of the application, as Figure 3 shown, the CEoS solving is used for property calculation in chemical process digital twinning. The property calculation provides support for unit module calculation, the unit module calculation provides support for process calculation, the process calculation provides support for design specification calculation, the design specification calculation provides support for optimization calculation, and the iteration structure of the sequential modular method is realized together. According to the obtained compressibility factor, the density, enthalpy, entropy, and phase equilibrium are calculated. According to the demand, the compressibility factor of the CEoS solving is used to complete the unit module calculation, the process calculation, the design specification calculation, and the optimization calculation.

[0088] To evaluate the calculation speed and stability of the CEoS hybrid solving method for digital twinning, the method was implemented in a chemical process digital twinning system, and the performance of the algorithm was tested using actual industrial process simulation cases as follows: In a process instance, the process mainly separates liquefied gas from a catalytic device into high-purity propylene, propane, and alkylate. The SRK method is selected for the property method. In another process instance, the process separates benzene, toluene, and p-xylene in the separation and purification of aromatic hydrocarbons, including four units and a total of ten towers. The PR method is selected for the property method.

[0089] The calculation time of CEoS was measured using two process instances, using the CEoS hybrid solving method, the Halley method (the fastest known numerical solution method), and the Cardano method as the CEoS solving method, respectively. The relative average time was counted, and the results are shown in Table 1, which is the relative average time of CEoS solving of the CEoS hybrid solving method, the Halley method, and the Cardano method.

[0090] Table 1

[0091]

[0092]

[0093] The calculation time of the process simulation was measured using four process simulation instances including case1 and case2, using the CEoS hybrid solving method and the Cardano method as the CEOS solving method, respectively. The average time of the process simulation was counted, and the results are shown in Table 2, which is the simulation calculation speed of the CEoS hybrid solving method and the Cardano method.

[0094] Table 2

[0095]

[0096] The results show that the CEoS hybrid solving method for digital twinning can significantly improve the calculation speed of CEoS and significantly improve the overall performance of the chemical process digital twinning system.

[0097] The application provided by the embodiment provides a physical property mixed solving method applied to digital twinning, state equations are established by acquiring physical property data of a digital twinning system, solutions of the state equations are determined by using a discriminant, in a three-real-root case, the solutions are directly solved by using the discriminant, unnecessary root solving and sorting are avoided, in a single-real-root case, initial values can be given by using a simple method and the solutions are solved by flexibly switching an iterative method and an analytical method, so that the method has both calculation speed and robustness, on the basis of meeting the robustness requirement of cubic state equation solving, the solving speed of the cubic state equation can be greatly improved, as the most frequent calculation in a digital twinning of a chemical process, the improvement of the solving method of the cubic state equation can obviously improve the performance of the entire digital twinning system of the chemical process, and further improve the overall performance of the calculation speed of the digital twinning system of the chemical process.

[0098] In the embodiment, a physical property mixed solving method applied to digital twinning is provided, which can be applied to the computer device, Figure 4 is a flowchart of another physical property mixed solving method applied to digital twinning according to an embodiment of the application, as Figure 4 shown, the flowchart includes the following steps:

[0099] In step S401, physical property data of a digital twinning system is acquired. For details, refer to step S101 of the embodiment shown in Figure 1 , which will not be described here again.

[0100] In step S402, a state equation and state equation coefficients corresponding to the digital twinning system are established according to a mixing rule and the physical property data.

[0101] Specifically, the above step S402 includes:

[0102] In step S4021, a physical property database, a unit calculation module and a simulation flowchart of the digital twinning system are established, the unit calculation module includes chemical unit equipment and mathematical models corresponding to each chemical unit equipment.

[0103] In step S4022, based on the chemical unit equipment corresponding to the digital twinning system, physical property data and mathematical models of the chemical unit equipment are acquired.

[0104] In step S4023, state equation coefficients corresponding to the digital twinning system are calculated according to the mixing rule.

[0105] In step S4024, the state equation is converted based on the state equation coefficients to obtain a standard form of the state equation.

[0106] In an example, a chemical process digital twin system is established by establishing a system hardware and software environment, establishing a physical property database, a unit calculation module, a simulation flowchart, and the like, and providing a physical property calculation interface. Based on SRK, PR, and the like, physical property data is obtained.

[0107] Based on SRK, PR, and the like, physical property data is obtained, CEoS parameters a and b are calculated according to a mixing rule, and are converted into a standard form represented by a compressibility factor.

[0108] Data is obtained from the physical property database established in the above steps, and CEoS parameters a and b are calculated.

[0109] For gas phase:

[0110] a = f(y i ,Tc,Pc,ω,K ij )

[0111] b = f(y i ,Tc,Pc,ω,K ij )

[0112] For liquid phase:

[0113] a = f(x i ,Tc,Pc,ω,K ij )

[0114] b = f(x i ,Tc,Pc,ω,K ij )

[0115] Wherein, Tc,Pc,ω,K ij are critical temperature, critical pressure, eccentric factor, and binary interaction parameter, respectively.

[0116] The CEoS coefficients a, b, and g are calculated according to the form in Table 3, and the standard form of the CEoS is obtained.

[0117] Table 3

[0118]

[0119] In Table 3, A and B are intermediate variables without actual meaning, and R is a constant, usually 8.314.

[0120] f(Z) = Z 3 + aZ 2 + bZ + g = 0

[0121] Wherein, Z is the compressibility factor of the gas phase or the liquid phase.

[0122] In the mode, the chemical process digital twinning system composed of the physical property database, the unit calculation module and the simulation flowchart is established, the physical property data is acquired, the state equation coefficient is calculated according to the mixing rule, and the standard form expressed by the compression factor is converted, so that the state equation solving is facilitated.

[0123] In step S403, the discriminant is calculated by using the state equation coefficient, and the discriminant is used to determine whether the state equation has three real solutions or a single real solution. For details, please refer to Figure 1 In step S103 of the embodiment shown in the figure, no further description is given here.

[0124] In step S404, when the state equation has three real solutions, the compression factor of the target phase state is calculated by using the analytical method. For details, please refer to Figure 1 In step S104 of the embodiment shown in the figure, no further description is given here.

[0125] In step S405, when the state equation has a single real solution, the compression factor of the target phase state is calculated by using the iterative method. For details, please refer to Figure 1 In step S105 of the embodiment shown in the figure, no further description is given here.

[0126] In step S406, the digital twinning system is simulated and optimized by using the compression factor, and the optimized target digital twinning system is obtained. For details, please refer to Figure 1 In step S106 of the embodiment shown in the figure, no further description is given here.

[0127] The physical property mixing solving method applied to digital twinning provided in the embodiment is used to establish a chemical process digital twinning system composed of a physical property database, a unit calculation module and a simulation flowchart, acquire physical property data, calculate state equation coefficients according to mixing rules, and convert them into a standard form expressed by a compression factor, so as to facilitate state equation solving.

[0128] In the embodiment, a physical property mixing solving method applied to digital twinning is provided, which can be used for the computer device described above, Figure 5 is a flowchart of another physical property mixing solving method applied to digital twinning according to an embodiment of the application, as shown in the figure, and the flowchart includes the following steps: Figure 5

[0129] In step S501, the physical property data of the digital twinning system is acquired. For details, please refer to Figure 4 In step S401 of the embodiment shown in the figure, no further description is given here.

[0130] In step S502, the state equation and the state equation coefficient corresponding to the digital twinning system are established according to the mixing rule and the physical property data. For details, please refer to Figure 4 In step S402 of the embodiment shown in the figure, no further description is given here. ​

[0131] Step S503, a discriminant is calculated by using the state equation coefficients, and the discriminant is used to determine whether the state equation has three real solutions or a single real solution.

[0132] Specifically, the step S503 includes:

[0133] Step S5031, a first intermediate variable and a second intermediate variable are calculated by using the state equation coefficients.

[0134] In some optional embodiments, the step S5031 includes:

[0135] Step a1, the first intermediate variable and the second intermediate variable are calculated by the following formula:

[0136]

[0137] Wherein, α, β and γ are different state equation coefficients of the state equation respectively, R is the first intermediate variable, and Q is the second intermediate variable.

[0138] Step S5032, a discriminant is calculated by using the first intermediate variable and the second intermediate variable.

[0139] In some optional embodiments, the step S5032 includes:

[0140] Step b1, the discriminant is calculated by the following formula:

[0141] D=Q 3 +R 2

[0142] Wherein, D is the discriminant.

[0143] Step S5033, it is determined whether the discriminant is greater than 0.

[0144] Step S5034, when the discriminant is greater than 0, it is determined that the state equation has a single real solution.

[0145] Step S5035, when the discriminant is less than or equal to 0, it is determined that the state equation has three real solutions.

[0146] In an example, according to the theory of Cardano formula, whether the number of real solutions of the state equation can be determined by whether the discriminant D is greater than 0, if D is less than or equal to 0, there are three real roots, if D is greater than 0, there is only one real root.

[0147]

[0148] D=Q 3 +R 2

[0149] Wherein, D is a discriminant of Cardano formula, R is a first intermediate variable, and Q is a second intermediate variable.

[0150] In this way, by judging whether the discriminant is greater than 0, when the discriminant is greater than 0, it is determined that the state equation has a single real solution, and when the discriminant is less than or equal to 0, it is determined that the state equation has three real solutions, without the need to sort all three solutions after being solved to ensure that the solutions are assigned to the correct phase state, the time consumption of solving is greatly reduced, and the solving speed is improved. According to the theory of Cardano formula, the number of real solutions of the state equation can be judged by whether the discriminant D is greater than 0, which improves the solving speed of the state equation and also ensures the accuracy of the state equation solving.

[0151] Step S504, when the state equation has three real solutions, the analytic method is used to calculate the compression factor of the target phase state.

[0152] In an optional embodiment, the compression factor of the target phase state is calculated by using the discriminant, comprising:

[0153] The third intermediate variable is calculated by using the first intermediate variable and the second intermediate variable through the following formula:

[0154]

[0155] Wherein, R is the first intermediate variable, Q is the second intermediate variable, and θ is the third intermediate variable.

[0156] The compression factor of the target phase state is calculated by using the first intermediate variable and the third intermediate variable.

[0157] In an example, according to the physical meaning of the state equation, the maximum root corresponds to the gas phase and the minimum root corresponds to the liquid phase in the three real root case, and the three roots of the Cardano formula are ordered, so that the root of the specified phase state is directly solved without sorting the three roots after being solved by using the Cardano formula.

[0158]

[0159] Wherein, θ is the third intermediate variable.

[0160] In this way, according to the physical meaning of the state equation, the maximum root corresponds to the gas phase and the minimum root corresponds to the liquid phase in the three real root case, and the three roots of the Cardano formula are ordered, so that the root of the specified phase state is directly solved without sorting the three roots after being solved by using the Cardano formula, which reduces the test cost and improves the solving speed of the state equation.

[0161] Step S505, when the state equation has a single real solution, the iterative method is used to calculate the compression factor of the target phase state.

[0162] Specifically, the step S505 includes:

[0163] Step S5051, setting an upper limit of the iteration number.

[0164] In an example, the step is explained in detail.

[0165] Step S5052, using the state equation coefficient and the compression factor of the current iteration number, a compression factor of the next iteration number is calculated.

[0166] Step S5053, judging whether the current iteration number is greater than the upper limit of the iteration number.

[0167] Step S5054, when the current iteration number is less than or equal to the upper limit of the iteration number, using the Newton iteration formula, the first intermediate variable and the state equation coefficient, a compression factor of the target phase state is calculated.

[0168] Step S5055, when the current iteration number is greater than the upper limit of the iteration number, using the Cardano formula to solve a compression factor of the target phase state.

[0169] In an example, the Newton iteration method is used to solve the single real root case, and the physical meaning of the compression factor is the correction of the real fluid to the ideal gas. The molar volume of the liquid phase is much smaller than that of the gas phase, and the compression factor is close to 0, while the compression factor corresponding to the ideal gas is 1. Therefore, the initial value is set to 0.01 when solving the liquid phase root, and the initial value is set to 1 when solving the gas phase root. In addition, an upper limit of the iteration number is set (which can be 6-8 times, and is not limited in the present application). If the upper limit is exceeded, the Cardano formula is switched to solve.

[0170]

[0171] wherein x n and x n+1 are the current compression factor and the compression factor of the next iteration, respectively, and Z * is the compression factor in the single real root case.

[0172] Result correction: under low temperature conditions, the liquid phase compression factor value is small. Due to the limitation of the effective digits of the computer, rounding errors will occur during the calculation process. Therefore, one more step of Newton iteration (the same as the formula in the above step) is performed on the results from the Cardano formula to obtain a result with higher accuracy.

[0173] Step S506, using the compression factor to simulate and optimize the digital twin system to obtain an optimized target digital twin system. For details, please refer to the step S406 of the embodiment shown in Figure 4 , which will not be described here again.

[0174] The application provided by the embodiment provides a physical property mixed solving method applied to digital twinning. Whether the discriminant is greater than 0 is judged. When the discriminant is greater than 0, it is determined that the state equation has a single real solution. When the discriminant is less than or equal to 0, it is determined that the state equation has three real solutions. Without sorting after all three solutions are obtained to ensure that the solutions are allocated to the correct phase state, the time consumption of solving is greatly reduced, and the solving speed is improved. According to the theory of the Cardano formula, whether the discriminant D is greater than 0 can be used to judge the number of real solutions of the state equation, the solving speed of the state equation is improved, and the accuracy of the state equation solving is also ensured. According to the physical meaning of the state equation, the maximum root corresponds to the gas phase and the minimum root corresponds to the liquid phase in the three real root case, and the three roots of the Cardano formula are ordered. Therefore, using the Cardano formula, the root of the specified phase state can be directly solved without sorting after the three roots are obtained, the test piece consumption is reduced, and the solving speed of the state equation is improved.

[0175] In the embodiment, a physical property mixed solving device applied to digital twinning is also provided. The device is used to implement the above embodiments and preferred embodiments, and will not be described here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware or a combination of software and hardware is also possible and is contemplated.

[0176] The embodiment provides a physical property mixed solving device applied to digital twinning, as shown in the figure, comprising: Figure 6

[0177] The data acquisition module 601 is configured to acquire physical property data of the digital twinning system, wherein the physical property data comprises a critical temperature, a critical pressure, an eccentricity factor and a binary interaction parameter. For details, refer to step S101 of the embodiment shown in the figure, which will not be described here. Figure 1

[0178] The equation establishing module 602 is configured to establish a state equation and a state equation coefficient corresponding to the digital twinning system according to a mixing rule and the physical property data. For details, refer to step S102 of the embodiment shown in the figure, which will not be described here. Figure 1

[0179] The equation solution determining module 603 is configured to calculate a discriminant by using the state equation coefficient, and determine that the state equation has three real solutions or a single real solution by using the discriminant. For details, refer to step S103 of the embodiment shown in the figure, which will not be described here. Figure 1

[0180] The three real solution solving module 604 is configured to calculate a compression factor of a target phase state by using an analytical method when the state equation has three real solutions. For details, refer to the figure.​​​​Figure 1 Step S104 of the illustrated embodiment will not be described here again.

[0181] The single-real solution solving module 605 is configured to calculate the compression factor of the target phase state by using an iterative method when the state equation has a single-real solution. For details, please refer to Figure 1 Step S105 of the illustrated embodiment will not be described here again.

[0182] The simulation calculation module 606 is configured to simulate and optimize the digital twin system by using the compression factor to obtain an optimized target digital twin system. For details, please refer to Figure 1 Step S106 of the illustrated embodiment will not be described here again.

[0183] In some optional embodiments, the equation establishing module 602 includes:

[0184] The digital twin system establishing unit is configured to establish a physical property database, a unit calculation module and a simulation flowchart of the digital twin system, and the unit calculation module includes chemical unit equipment and mathematical models corresponding to each chemical unit equipment.

[0185] The data acquisition is based on the chemical unit equipment corresponding to the digital twin system, and the physical property data and the mathematical model of the chemical unit equipment are acquired.

[0186] The state equation coefficient calculation unit is configured to calculate the state equation coefficient corresponding to the digital twin system according to the mixing rule.

[0187] The state equation conversion unit is configured to convert the state equation based on the state equation coefficient to obtain a standard form of the state equation.

[0188] In some optional embodiments, the equation solution determination module 603 includes:

[0189] The intermediate variable calculation unit is configured to calculate the first intermediate variable and the second intermediate variable by using the state equation coefficient.

[0190] The discriminant calculation unit is configured to calculate the discriminant by using the first intermediate variable and the second intermediate variable.

[0191] The discriminant judgment unit is configured to determine whether the discriminant is greater than 0.

[0192] The single-real solution determination unit is configured to determine that the state equation has a single-real solution when the discriminant is greater than 0.

[0193] The three-real solution determination unit is configured to determine that the state equation has a three-real solution when the discriminant is less than or equal to 0.

[0194] In some optional embodiments, the first intermediate variable and the second intermediate variable are calculated by the following formula:

[0195]

[0196] wherein a, b and g are different state equation coefficients of the state equation respectively, R is the first intermediate variable, and Q is the second intermediate variable;

[0197] The discriminant is calculated by the following formula:

[0198] D = Q 3 + R 2

[0199] wherein D is the discriminant.

[0200] In some optional embodiments, the three-real-solution solving module 604 comprises:

[0201] A third intermediate variable calculation unit is configured to calculate a third intermediate variable by the following formula using the first intermediate variable and the second intermediate variable:

[0202]

[0203] wherein R is the first intermediate variable, Q is the second intermediate variable, and g is the third intermediate variable.

[0204] A first compression factor calculation unit is configured to calculate a compression factor of the target phase state using the first intermediate variable and the third intermediate variable.

[0205] In some optional embodiments, the single-real-solution solving module 605 comprises:

[0206] An iteration number upper limit setting unit is configured to set an iteration number upper limit.

[0207] A next iteration number compression factor calculation unit is configured to calculate a compression factor of a next iteration number using the state equation coefficients and the compression factor of the current iteration number.

[0208] An iteration number upper limit judging unit is configured to judge whether the current iteration number is greater than the iteration number upper limit.

[0209] A second compression factor calculation unit is configured to calculate a compression factor of the target phase state using the Newton iteration formula, the first intermediate variable and the state equation coefficients when the current iteration number is less than or equal to the iteration number upper limit.

[0210] A third compression factor calculation unit is configured to calculate a compression factor of the target phase state using the Cardano formula when the current iteration number is greater than the iteration number upper limit.

[0211] Further function description of each module and unit is the same as the corresponding embodiment described above, which will not be repeated here.

[0212] The physical property hybrid solving device for digital twinning in the embodiment is presented in the form of a functional unit. The unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0213] The embodiment of the application also provides a computer device having the above Figure 6 physical property hybrid solving device for digital twinning.

[0214] Please refer to Figure 7 , Figure 7 is a structural schematic diagram of a computer device provided by an optional embodiment of the application, as Figure 7 shown, the computer device includes one or more processors 10, a memory 20, and an interface for connecting various components, including a high-speed interface and a low-speed interface. Various components are communicatively connected to each other by different buses, and can be installed on a common mainboard or in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in the memory or on the memory to display graphical information of a GUI on an external input / output device, such as a display device coupled to the interface. In some optional embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memories, if necessary. Similarly, multiple computer devices can be connected, each providing part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 In the above

[0215] The processor 10 can be a central processor, a network processor, or a combination thereof. The processor 10 can further include a hardware chip. The hardware chip can be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device can be a complex programmable logic device, a field programmable logic gate array, a general array logic, or any combination thereof.

[0216] The memory 20 stores instructions executable by the at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0217] The memory 20 can include a program storage area and a data storage area, where the program storage area can store an operating system, application programs required for at least one function, and the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some alternative embodiments, the memory 20 can optionally include a memory disposed remotely from the processor 10, which can be connected to the computer device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0218] The memory 20 can include a volatile memory, such as a random access memory, and can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid state disk, and can also include a combination of the above-mentioned types of memories.

[0219] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 can be connected by a bus or other means, Figure 7 For example, by a bus connection.

[0220] The input device 30 can receive inputted digital or character information, and generate key signal inputs related to the user settings and function controls of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 can include a display device, an auxiliary lighting device (e.g., an LED), a tactile feedback device (e.g., a vibration motor), etc. The display device includes, but is not limited to, a liquid crystal display, a light-emitting diode, a display, and a plasma display. In some alternative embodiments, the display device can be a touch screen.

[0221] The embodiments of the present application further provide a computer readable storage medium, and the method according to the embodiments of the present application can be implemented in hardware, firmware, or recorded in a storage medium, or stored in a remote storage medium or a non-transitory machine readable storage medium and downloaded to a local storage medium through network, so that the method described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor, or programmable or special hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid state disk, etc. Further, the storage medium can also include a combination of the above-mentioned memories. It can be understood that the computer, the processor, the microprocessor controller, or the programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiments is implemented.

[0222] Part of the present application can be applied as a computer program product, for example, computer program instructions, when executed by a computer, the operation of the computer can invoke or provide the method and / or technical solutions according to the present application. Those skilled in the art should understand that the form of computer program instructions in computer readable medium includes but is not limited to source file, executable file, installation package file, etc. Correspondingly, the way of computer program instructions executed by computer includes but is not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.

[0223] Although the embodiments of the present application are described in conjunction with the accompanying drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the appended claims.

Claims

1. A method for solving hybrid physical properties in digital twins, characterized in that, The method includes: Acquire physical property data of the digital twin system, including critical temperature, critical pressure, eccentricity factor, and binary interaction parameters; Based on the mixing rules and the physical property data, establish the state equation and state equation coefficients corresponding to the digital twin system; The discriminant is calculated using the coefficients of the state equation, and the discriminant is used to determine whether the state equation has three real solutions or a single real solution. When the state equation has three real solutions, the compressibility factor of the target phase state is calculated using analytical methods. When the state equation has a single real solution, the compressibility factor of the target phase state is calculated using an iterative method. The digital twin system is simulated and optimized using the compression factor to obtain the optimized target digital twin system.

2. The method according to claim 1, characterized in that, The step of establishing the state equation corresponding to the digital twin system based on the mixing rules and the physical property data includes: Establish the physical property database, unit calculation module and simulation flowchart of the digital twin system. The unit calculation module includes chemical unit equipment and the mathematical model corresponding to each chemical unit equipment. Based on the chemical unit equipment corresponding to the digital twin system, acquire the physical property data and mathematical model of the chemical unit equipment; Based on the hybrid rules, the state equation coefficients corresponding to the digital twin system are calculated; Based on the coefficients of the state equation, the state equation is transformed to obtain the standard form of the state equation.

3. The method according to claim 2, characterized in that, The process of calculating the discriminant using the coefficients of the state equation, and using the discriminant to determine whether the state equation has three real solutions or a single real solution, includes: Using the coefficients of the state equation, the first intermediate variable and the second intermediate variable are calculated; The discriminant is calculated using the first and second intermediate variables. Determine whether the discriminant is greater than 0; When the discriminant is greater than 0, the state equation is determined to have a single real solution; When the discriminant is less than or equal to 0, the state equation is determined to have three real solutions.

4. The method according to claim 3, characterized in that, The first intermediate variable and the second intermediate variable are calculated using the following formula: Wherein, α, β and γ are the coefficients of different state equations, R is the first intermediate variable, and Q is the second intermediate variable; The discriminant is obtained by calculating the following formula: D=Q 3 +R 2 Wherein, D is the discriminant.

5. The method according to claim 3, characterized in that, The method of calculating the compressibility factor of the target phase using analytical methods includes: Using the first and second intermediate variables, the third intermediate variable is calculated using the following formula: Wherein, R is the first intermediate variable, Q is the second intermediate variable, and θ is the third intermediate variable; The compression factor of the target phase state is calculated using the first intermediate variable and the third intermediate variable.

6. The method according to claim 3, characterized in that, The method of calculating the compressibility factor of the target phase state using an iterative method includes: Set an upper limit on the number of iterations; Using the coefficients of the state equation and the compression factor of the current iteration number, the compression factor of the next iteration number is calculated; Determine whether the current iteration count is greater than the upper limit of the iteration count; When the current iteration number is less than or equal to the upper limit of the iteration number, the compressibility factor of the target phase state is calculated using Newton's iteration formula, the first intermediate variable, and the coefficients of the state equation. When the current iteration number is greater than the upper limit of the iteration number, the compression factor of the target phase state is obtained by using the Cardano formula.

7. A hybrid property solving device for digital twins, characterized in that, The device includes: The data acquisition module is used to acquire the physical property data of the digital twin system, including critical temperature, critical pressure, eccentricity factor and binary interaction parameters. The equation establishment module is used to establish the state equation and state equation coefficients corresponding to the digital twin system based on the mixing rules and the physical property data. The equation solution determination module is used to calculate the discriminant using the coefficients of the state equation, and to determine whether the state equation has three real solutions or a single real solution using the discriminant. The three real-number solution module is used to calculate the compressibility factor of the target phase state using analytical methods when the state equation has three real-number solutions. The single real solution solving module is used to calculate the compressibility factor of the target phase state by using an iterative method when the state equation has a single real solution; The simulation calculation module is used to simulate and optimize the digital twin system using the compression factor to obtain the optimized target digital twin system.

8. A computer device, characterized in that, include: A memory and a processor are interconnected, the memory stores computer instructions, and the processor executes the computer instructions to perform the hybrid property solving method for digital twins as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the hybrid property solving method for digital twins as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, Includes computer instructions for causing a computer to execute the hybrid property solving method for digital twins as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for solving photovoltaic module output model based on single I-V equation

    CN110717304A

  • Optimal parameter solving method of photovoltaic cell model

    CN113343410A