Method for constructing flash steam model system based on Modelica

By using Modelica to build a flash model system, the problem that users cannot adjust the model according to actual working conditions is solved, and the efficient reusability and practical application significance of the model are achieved.

CN118395890BActive Publication Date: 2025-04-08HANGZHOU UWNTEK AUTOMATION SYSTEM CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410484633.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-22
Publication Date
2025-04-08
Estimated Expiration
2044-04-22

AI Technical Summary

Technical Problem

Since the model source code of the existing flash evaporation model system is not disclosed, users cannot modify the model from the code level according to the actual working conditions to meet actual production needs.

Method used

Modelica is used as the physical system modeling language to build unit models such as pressure sources, heat exchangers, regulating valves, flash tanks, coolers, etc., and connect these unit models into a complete flash model system through the connector model. Users can adjust model parameters according to actual working conditions.

Benefits of technology

The user's ability to adjust the model according to actual working conditions is realized, the model's reusability and promotion is improved, and the disadvantages of being unable to adjust the Aspen model from the code level is overcome. The flash evaporation system built has strong physical practical significance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118395890B_ABST
    Figure CN118395890B_ABST
Patent Text Reader

Abstract

The invention discloses a method for constructing a flash model system based on Modelica, comprising: constructing a pressure source unit model, a heat exchanger unit model, a regulating valve unit model, a flash tank unit model, a cooler unit model, a first pressure well unit model, a second pressure well unit model and a connector model; and connecting the models according to the working mechanism of the system; taking the pressure in the pressure source unit model as P1, the pressure in the second pressure well unit model as P2, and the pressure in the first pressure well unit model as P3, and combining two working fluid flow channels, P1>P2>P3, thereby constructing a pressure difference model P1-P2 between the first working fluid flow channels, making the pressure of the flash tank unit model equal to the pressure P2 in the second pressure well unit model, and constructing a pressure difference model P2-P3 in the second working fluid flow channel, and thus the pressure difference model of the entire system is constructed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of simulation modeling, and in particular to a method for constructing a flash evaporation model system based on Modelica. Background Art

[0002] With the development of my country's chemical industry, various traditional technologies in the field are constantly optimized, and new technologies emerge in an endless stream. Flash evaporation, as a representative of separation technology, has always occupied an extremely important position. The success or failure of the construction of a flash evaporation system with flash evaporation as the core technical method will directly determine the effect of separating the mixture, which is crucial for most chemical companies that need to use this method.

[0003] At present, modeling and simulation technology is becoming more and more mature, and a large number of successful cases in the chemical industry have attracted widespread attention in the field. Among the many modeling and simulation companies in the chemical industry, AspenTech is the most famous. Taking the flash tank in the flash system as an example, although Aspen provides a flash tank unit model, due to the restrictions of technology non-disclosure, code protection and other aspects, users cannot adjust part of the source code of the flash model according to actual working conditions to meet the needs of actual production, which brings inconvenience to many model users. Summary of the invention

[0004] The purpose of the embodiment of the present application is to provide a method for constructing a flash model system based on Modelica, so as to solve the technical problem existing in the related art that the model source code is not open, so that the user cannot modify the model from the code level according to the actual working conditions to meet the needs in actual production.

[0005] According to an embodiment of the present application, a method for constructing a flash evaporation model system based on Modelica is provided, comprising:

[0006] S1: Use the physical system modeling language Modelica to construct the pressure source unit model, heat exchanger unit model, regulating valve unit model, flash tank unit model, cooler unit model, first pressure well unit model, second pressure well unit model and connector model respectively;

[0007] S2: According to the working mechanism of the system, the pressure source unit model, the heat exchanger unit model, the regulating valve unit model, the flash tank unit model, the cooler unit model, the first pressure well unit model and the second pressure well unit model are connected into a complete flash model system by using the connector model, wherein the first pressure well unit model is connected to the cooler unit model, and the second pressure well unit model is connected to the flash tank unit model, and the flow rate of the working medium in the first working medium flow channel is controlled by the pressure difference between the pressure source unit model and the second pressure well unit model, and the pressure in the flash tank unit model is controlled by the pressure difference between the pressure source unit model and the second pressure well unit model. The flow rate of the working fluid in the second working fluid flow channel is controlled by the pressure difference in the first pressure well unit model; wherein, the pressure in the pressure source unit model is taken as P1, the pressure in the second pressure well unit model is taken as P2, and the pressure in the first pressure well unit model is taken as P3, and combined with the two working fluid flow channels, P1>P2>P3 is obtained, thereby completing the pressure difference model P1-P2 between the first working fluid flow channels, making the pressure of the flash tank unit model equal to the pressure P2 in the second pressure well unit model, and constructing the pressure difference model P2-P3 in the second working fluid flow channel, and thus the pressure difference model of the entire system is completed;

[0008] S3: After the pressure difference model is built, the variables and parameters of the pressure source unit model are set in sequence and the model is called, the variables and parameters of the heat exchanger unit model are set and the model is called, the variables and parameters of the regulating valve unit model are set and the model is called, the variables and parameters of the flash tank unit model and the second pressure well unit model are set and the model is called, the variables and parameters of the cooler unit model are set and the model is called, and the variables and parameters of the first pressure well unit model are set and the model is called, thereby completing the construction of the flash model system.

[0009] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0010] It can be seen from the above embodiments that the present application is based on the object-oriented modeling concept and uses the physical system modeling language Modelica to build a set of flash evaporation systems close to reality around the flash tank unit model. Since the Modelica modeling language is adopted and the model is open and transparent, users can adjust the model from the code level on this basis according to the actual working conditions to meet actual needs, thereby improving the reusability and promotion of the model and greatly facilitating the relevant users, overcoming the drawback of being unable to adjust the Aspen model from the code level. In addition, the designed unit models such as the flash tank unit model, the heat exchanger unit model, and the regulating valve unit model are all real and effective, and to a large extent restore the relationship between the input and output of the real equipment. At the same time, the pressure difference is used to control the flow of the working fluid flow, and the various unit models are connected to each other with the connector model as the medium. The flash evaporation system thus constructed has a strong physical practical significance and provides a good reference for modelers engaged in related fields.

[0011] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0013] Figure 1 It is a flow chart of a method for constructing a flash model system based on Modelica according to an exemplary embodiment.

[0014] Figure 2 is a structural diagram of a flash model system according to an exemplary embodiment.

[0015] Figure 3 is a structural diagram of a first working medium flow channel according to an exemplary embodiment.

[0016] Figure 4 is a structural diagram of a second working medium flow channel according to an exemplary embodiment.

[0017] Figure 5 is a structural diagram of a shell and tube heat exchanger according to an exemplary embodiment.

[0018] Figure 6 It is a schematic diagram of heat exchange principle according to an exemplary embodiment.

[0019] Figure 7 It is a structural diagram of a flash model system implemented based on Modelica according to an exemplary embodiment.

[0020] Figure 8is a diagram showing flash evaporation simulation results according to an exemplary embodiment. DETAILED DESCRIPTION

[0021] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0022] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0023] Figure 1 is a flow chart showing a method for constructing a flash model system based on Modelica according to an exemplary embodiment. Figure 1 As shown, the method includes:

[0024] S1: Use the physical system modeling language Modelica to construct the pressure source unit model, heat exchanger unit model, regulating valve unit model, flash tank unit model, cooler unit model, first pressure well unit model, second pressure well unit model and connector model respectively;

[0025] Specifically, the embodiment of the present application provides a flash evaporation model system based on pressure difference, which is currently widely used (taking flash evaporation of benzene-toluene binary mixture as an example), that is, the flow and transfer of working fluids between devices are simulated by pressure difference. The structure of the designed flash evaporation model system is as follows: Figure 2 shown.

[0026] The operating mechanism of the entire differential pressure model is to control the flow rate of the working fluid in the first working fluid flow channel through the pressure difference between the pressure source unit model and the second pressure sink unit model, such as Figure 3 The flow rate of the working fluid in the second working fluid flow channel is controlled by the pressure difference between the flash tank and the first pressure trap unit model, such as Figure 4 .

[0027] Therefore, the system-level model is disassembled into unit-level models, including a pressure source unit model, a heat exchanger unit model, a regulating valve unit model, a flash tank unit model, a cooler unit model, a first pressure well unit model, a second pressure well unit model and a connector model.

[0028] The construction of each model is described next.

[0029] Construct a pressure source unit model. The pressure source unit model mainly involves the specification of the source pressure and the construction of the working fluid flow (benzene-toluene binary mixture). The pressure can be easily assigned to any value through the equation; the construction of the working fluid flow mainly involves the calculation of the enthalpy value of the mixed liquid and the specification of the molar composition of the light component in the binary mixture system.

[0030] Further, a heat exchanger unit model is constructed. The heat exchanger unit model constructed in the embodiment of the present application is a shell-and-tube heat exchanger unit model (Shell-And-Tube Heat Exchanger Model), and its principle structure schematic diagram is as follows: Figure 5 .

[0031] Figure 5 The internal structure and mechanism of the heat exchanger are demonstrated by taking the example of splitting the entire heat exchanger into 8 heat exchange units. If the user's actual application scenario involves a large heat exchange volume and a slow heat exchange speed, and 8 heat exchange units are still unable to fully exchange heat, the number of heat exchange units can be arbitrarily set in the model source code according to actual needs. This improves the scalability of the code to a certain extent and makes the embodiments of the present application more practical.

[0032] The liquid between the shell and the metal, and the liquid (working fluid) in the tube, use metal as the medium for heat exchange. Figure 5 shown.

[0033] Taking cooling the working fluid as an example, since the temperature of the liquid in the tube (the temperature of the working fluid) is higher than the temperature of the liquid in the shell (the liquid used to cool the working fluid), the liquid in the tube begins to transfer heat Q to the shell. Tn The heat first passes through the metal between the separation tube and the shell and is absorbed by it, and then the metal transfers heat Q to the liquid in the shell again. Mn , the working fluid releases heat and the temperature decreases; the liquid in the shell absorbs heat and the temperature increases, thus achieving the purpose of heat exchange. Obviously, the heat exchanger can be used as a heater or a cooler. Tn , T Mn , T Sn They represent the temperature of the liquid (working fluid) in the tube, the temperature of the metal, and the temperature of the liquid in the shell in the nth heat exchange unit respectively; Q Tn , Q MnIt represents the heat transferred from the liquid in the tube to the metal side, and the heat transferred from the metal to the liquid in the shell in the nth heat exchange unit.

[0034] Construct a regulating valve unit model. The regulating valve unit model constructed in the embodiment of the present application is a regulating valve based on linear flow characteristics, and its working principle is as follows:

[0035]

[0036] qm=cifb*dp*G f (2)

[0037] Among them, qm_nom, dp_nom, and Gf are the rated mass flow rate of the working fluid, the rated pressure drop of the working fluid, and the linear flow characteristic coefficient respectively; qm, cifb, and dp are the actual mass flow rate of the working fluid, the opening of the regulating valve, and the actual pressure drop of the working fluid respectively.

[0038] Construct a flash tank unit model. The mechanism of the flash tank unit model mainly involves theories such as material conservation, heat conservation, and vapor-liquid phase equilibrium. The relevant core calculation equations are as follows:

[0039] M*dx=F*xf-L*yW*x (3)

[0040] dM=FLW (4)

[0041]

[0042]

[0043]

[0044]

[0045]

[0046] yf m =xPb0 (10)

[0047]

[0048] d(Hw*M)=F*Hf-L*Hl-W*Hw (12)

[0049] Hw=M w *H_BenAndTol(ben, tol, x, T) (13)

[0050] Hl=M w *H_BenAndTol_V(ben, tol, y, T) (14)

[0051] Where M is the total number of moles of working fluid in the flash tank; Mw and rho are the molar mass and density of the mixture; rho i is the molar mass and density of each pure component in the mixture; n is the number of components in the mixture; F, L, and W are the molar flow rate of the flash tank feed, the molar flow rate of the gas phase outlet, and the molar flow rate of the liquid phase outlet, respectively; xf, x, and y are the molar fraction of the light component (benzene) in the flash tank feed, and the liquid phase molar fraction and gas phase molar fraction of the light component (benzene) in the flash tank when the vapor-liquid phase equilibrium is reached, respectively; Pb0 is the saturated vapor pressure of the component calculated by the Antoine equation; P is the total pressure of the system; A, B, and C are physical constants, and the physical constants of different substances are also different; f i 、x i ,y i is the fugacity coefficient, fugacity, and liquid and gas phase molar composition of each component; f m is the fugacity of this mixture; H_BenAndTol() is a function used to calculate the heat per kmol of liquid mixture in the flash tank, and H_BenAndTol_V() is a function used to calculate the heat per kmol of gas mixture in the flash tank. Here, H_BenAndTol and H_BenAndTol_V functions are some existing empirical formulas in the field of chemistry.

[0052] The method for obtaining the fugacity coefficient may include the following steps:

[0053] S11: According to the vdW (van der Waals) mixing rule, the first mixing parameter and the second mixing parameter of the liquid phase mixture are obtained; in order to obtain the first mixing parameter Am and the second mixing parameter Bm of the liquid phase mixture in step S1, it is necessary to obtain the dimensionless quantities Ai and Bi corresponding to each pure component, and in order to obtain the Ai and Bi, it is necessary to obtain the pressure correction term ai and the volume correction term bi corresponding to each pure component. This step may include the following sub-steps:

[0054] S111: Calculate the pressure correction term ai and volume correction term bi corresponding to each pure component by the following formula;

[0055]

[0056]

[0057] In the above formula, R is a constant (8.314), p is the total pressure of the system, T is the system temperature, Tc, Pc, and w are the inherent properties of different components, namely, critical temperature, critical pressure, and eccentricity factor;

[0058] Specifically, this embodiment is to separate a binary mixture of benzene and toluene. In this step, the specific physical parameters Tc, Pc, and w of the two are substituted into the above expression to obtain the pressure correction term a1 and volume correction term b1 of benzene; and the pressure correction term a2 and volume correction term b2 of toluene.

[0059] S112: Based on ai and bi, the pressure correction term am, volume correction term bm and dimensionless quantities Ai and Bi corresponding to the mixture are calculated by the following formula;

[0060]

[0061]

[0062] A i =a i p / (R 2 T 2 ) (19)

[0063] B i =b i p / (RT) (20)

[0064] Where yi is the gas phase molar composition of each component;

[0065] Specifically, according to the above-obtained a1, b1; a2, b2 and the gas phase molar composition of benzene y1, the gas phase molar composition of toluene y2 are substituted into the above expression to obtain the pressure correction term am and volume correction term bm of the mixture, as well as the dimensionless quantities A1, B1 corresponding to benzene and A2, B2 corresponding to toluene.

[0066] S113: According to Ai and Bi, the first mixing parameter Am and the second mixing parameter Bm of the mixture are calculated by the following formula;

[0067]

[0068]

[0069] Substituting Tc, Pc, and w corresponding to different components into equations (15) and (16) yields the corresponding a i , b i ; further obtain a i , b i , and other required parameters are substituted into equations (19) and (20) to obtain the corresponding A i , B i ,; further A i , B i, and other required parameters are substituted into equations (21) and (22) to obtain the corresponding Am, Bm. Thus, the first mixing parameter Am and the second mixing parameter Bm are obtained according to the vdW mixing rule.

[0070] Specifically, the first mixture parameter Am and the second mixture parameter Bm of the benzene-toluene binary mixture can be obtained by substituting the above-obtained A1, B1, A2, and B2 into the above-mentioned expressions.

[0071] Since the relationship between the gas-liquid phase composition y and x of a component in the mixture is ultimately required, a mixture model different from the pure component must first be constructed. The above expressions can be used to obtain various important parameters related to the mixture, and these key mixture parameters can be used to represent the mixture model in this embodiment, namely the benzene-toluene binary mixture model. Constructing a more realistic mixture model plays a vital role in the advancement of subsequent algorithm processes.

[0072] S12: solving the SRK (Soave-Redlich-Kwong equation of state) in the form of a compression factor using the first mixing parameter and the second mixing parameter to obtain a plurality of solutions;

[0073] Specifically, the SRK equation expression in the form of the compression factor is as follows:

[0074]

[0075] Where z is the compression factor, Am and Bm are the first mixing parameter and the second mixing parameter respectively.

[0076] Since the original form of the SRK equation is difficult to solve, the SRK equation in the form of a compression factor is used instead, as shown in equation (23).

[0077] S13: Select a solution that meets the requirements from the multiple solutions, specifically: if Tr is greater than 1, the SRK equation has only one real number solution, and this solution is taken as the solution that meets the requirements; if Tr is less than 1, the SRK equation has three real number solutions, and the largest solution is selected as the solution that meets the requirements; wherein Tr is the component contrast temperature.

[0078] Specifically, according to the meaning of the solutions to the state equation, the largest solution corresponds to the gas phase, the smallest solution corresponds to the liquid phase, and the solution in the middle has no physical meaning. It is used here to correct the gas phase partial pressure of the components, so the largest solution is taken.

[0079] The pressure that needs to be corrected in this embodiment is the gas phase partial pressure of each component, and the comparative temperature Tr in this embodiment is less than 1, so the largest solution is found among the three solutions of formula (23) for subsequent calculations.

[0080] S14: Calculate the fugacity coefficient using the first mixing parameter, the second mixing parameter and a solution that meets the requirements.

[0081] Specifically, the mixture is mixed according to the vdW mixing rule, and the fugacity coefficient of component i in the mixture is derived from the SRK equation: The expression is as follows:

[0082]

[0083] Wherein bi is the volume correction term corresponding to each pure component; am is the pressure correction term corresponding to the mixture; bm is the volume correction term corresponding to the mixture; Am and Bm are the first mixing parameter and the second mixing parameter respectively; z is the compression factor; bi, am, bm, Am, Bm, and z are all obtained through the above steps.

[0084] Specifically, the above-obtained results of the benzene-toluene binary mixture are substituted into equation (24) to obtain the fugacity coefficient corresponding to benzene: And the fugacity coefficient corresponding to toluene

[0085] To obtain the mixture fugacity f m , then it is necessary to find the fugacity corresponding to each component, and thus it is necessary to find the fugacity coefficient corresponding to each component in the mixture according to expression (24).

[0086] Constructing a cooler unit model is essentially the same as the above-mentioned shell and tube heat exchanger model. The difference is that in the cooler model, the temperature of the working fluid in the shell is lower, while the temperature of the working fluid in the tube is higher. Heat is transferred from the working fluid in the tube with a higher temperature to the working fluid in the shell with a lower temperature, thereby realizing the function of cooling the working fluid in the tube.

[0087] The first pressure well unit model and the second pressure well unit model are constructed. The pressure well model mainly involves the specification of the well pressure, and the pressure magnitude can be conveniently assigned to any value through the equation.

[0088] Construct a connector model. The connector constructed in the embodiment of the present application is a non-causal connector based on Modelica. This type of connector is powerful and can transfer various variables and information between models, including Real variables, Bool variables, Flow variables, Stream variables, etc. In the embodiment of the present application, two Real variables are stored in the connector: p and x are used to transfer pressure and the molar fraction of the light component (benzene) of the working fluid; a Flow variable qm is used to transfer the mass flow rate of the working fluid; and a Stream variable h is used to transfer the enthalpy value of the working fluid.

[0089] According to the above-established unit-level models, they can be connected into a complete system according to the working mechanism of the system. The connection method and the corresponding position of each model in the system can be referred to Figure 2 Among them, the units are connected through non-causal connectors based on Modelica.

[0090] From the perspective of unit model design, the designed models are all unit-level models, that is, the models are independent of each other and have no dependencies. This design method greatly improves the reusability of the model. It only needs to modify the parameters in the model appropriately according to actual needs and can be used directly. Similarly, there are no restrictions when calling the model. It only needs to be called directly at the required location according to the system mechanism. From the perspective of connection, the connection between models is connected by Modelica's non-causal connector. This non-causal connector can effectively reduce various coupling relationships between systems, thereby avoiding problems such as difficulty in model construction and invalidation of calculated parameters due to excessive coupling. At the same time, this non-causal connector and the unit model complement each other and improve modeling efficiency.

[0091] S2: According to the working mechanism of the system, the pressure source unit model, the heat exchanger unit model, the regulating valve unit model, the flash tank unit model, the cooler unit model, the first pressure well unit model and the second pressure well unit model are connected into a complete flash model system by using the connector model, wherein the first pressure well unit model is connected to the cooler unit model, and the second pressure well unit model is connected to the flash tank unit model, and the flow rate of the working medium in the first working medium flow channel is controlled by the pressure difference between the pressure source unit model and the second pressure well unit model, and the pressure in the flash tank unit model and the pressure The pressure difference in the first pressure well unit model is used to control the flow rate of the working fluid in the second working fluid flow channel, wherein the pressure in the pressure source unit model is taken as P1, the pressure in the second pressure well unit model is taken as P2, and the pressure in the first pressure well unit model is taken as P3. Combining the two working fluid flow channels, P1>P2>P3 is obtained, thereby constructing the pressure difference model P1-P2 between the first working fluid flow channels, making the pressure of the flash tank unit model equal to the pressure P2 in the second pressure well unit model, and constructing the pressure difference model P2-P3 in the second working fluid flow channel. At this point, the pressure difference model of the entire system is completed.

[0092] Specifically, the steps of connecting each unit model into a flash system are as follows: the pressure source unit model is connected to the heat exchanger unit model, the heat exchanger unit model is connected to the regulating valve unit model, the regulating valve unit model is connected to the flash tank unit model, the flash tank unit model is simultaneously connected to the cooler unit model and the second pressure well unit model, and the cooler unit model is connected to the first pressure well unit model.

[0093] Since the system model is built based on pressure difference, it is necessary to first specify the pressure in the pressure source and the two pressure wells. Let's remember that the pressure in the pressure source is P1, the pressure in pressure well 2 is P2, and the pressure in pressure well 1 is P3. Combined with the two working fluid flow channels mentioned above, there is obviously the following relationship between the three:

[0094] P1>P2>P3 (25)

[0095] Thus, the first working medium flow channel is constructed (refer to Figure 2 ) between the pressure wells 2 and 3; let the pressure of the flash tank be equal to the pressure P2 in the pressure well 2, thereby constructing the pressure difference model P2-P3 in the second working fluid flow channel, and thus the pressure difference model of the entire system is completed.

[0096] Such a design of controlling the flow of working fluid by pressure difference can realize the simulation of actual working conditions to the greatest extent, thereby improving the authenticity of the system.

[0097] S3: After the pressure difference model is built, the variables and parameters of the pressure source unit model are set in sequence and the model is called, the variables and parameters of the heat exchanger unit model are set and the model is called, the variables and parameters of the regulating valve unit model are set and the model is called, the variables and parameters of the flash tank unit model and the second pressure well unit model are set and the model is called, the variables and parameters of the cooler unit model are set and the model is called, and the variables and parameters of the first pressure well unit model are set and the model is called, thereby completing the construction of the flash model system.

[0098] Specifically, from the construction method of the pressure source unit model, it can be known that in addition to the specification of the source pressure, the pressure source unit model also includes the initial mixed working fluid flow (benzene-toluene binary mixture), and the mixed working fluid flow is determined by the following parameters T, xf, H, qm, where T and xf are the specified parameters, namely the initial temperature of the mixed working fluid and the molar fraction of the light component (benzene); H is the enthalpy value of the mixed working fluid at the initial temperature T, and the calculation method refers to formula (13); qm is the working fluid mass flow rate, and the value of this variable will be obtained in the subsequent regulating valve.

[0099] Set the variables and parameters of the heat exchanger unit model and call the model: the mixed working fluid will flow from the pressure source into the heat exchanger for heating. What needs to be set is the temperature to which the working fluid needs to be heated. According to the set temperature value, the working fluid can be heated to any required temperature. The transmission of parameters between the two sub-models depends on the connector module defined above. All parameters of the working fluid in the pressure source can be transferred to the heat exchanger through the connector. At the same time, after being heated by the heat exchanger, the working fluid properties such as temperature T and enthalpy value H will change. The changed temperature is recorded as T1 and the enthalpy value is recorded as H1.

[0100] Set the variables and parameters of the control valve unit model and call the model: the working fluid will flow from the heat exchanger into the control valve, and the opening size of the control valve needs to be set. Figure 1 , the pressure at the left end of the regulating valve (the side connected to the heat exchanger) is P1, and the pressure at the right end of the regulating valve (the side connected to the flash tank) is P2. There is a pressure difference between P1 and P2. The working fluid flow rate qm can be calculated through the mechanism of the linear flow characteristic regulating valve. After the regulating valve, the mass flow rate qm of the working fluid in the first working fluid flow channel can be determined, which obviously does not change any other properties of the working fluid.

[0101] Set the variables and parameters of the flash tank unit model and the second pressure well unit model and call the model: the working fluid will flow into the flash tank from the regulating valve, and the temperature in the flash tank needs to be set. At this time, the working fluid parameters are T1, xf, H1, and qm. After the mixed working fluid fully acts in the flash tank according to the above flash evaporation mechanism, two working fluid flows will be obtained. One working fluid flow is the gas phase flowing out of the upper port of the flash tank, and the other working fluid flow is the liquid phase flowing out of the lower port of the flash tank and flowing into the second pressure well, and its pressure is set to P2.

[0102] Set the variables and parameters of the cooler unit model and call the model: the gas phase working fluid flowing out of the upper port of the flash tank passes through the cooler for liquefaction treatment. At this time, what needs to be set is the temperature to which the working fluid needs to be cooled. According to the set temperature value, the working fluid can be cooled to any required temperature.

[0103] Set the variables and parameters of the first pressure well unit model and call the model: After being cooled by the cooler, the working fluid will flow into the first pressure well and set its pressure to P3.

[0104] Figure 7 The flash model system in the embodiment of the present application is implemented based on Modelica, and its system structure is based on Figure 2 Make a design.

[0105] Figure 8 This is the simulation result of the system. The light component (benzene) composition xf of the feed is set to 0.5. After passing through the flash evaporation system, the gas phase composition of benzene is 0.658>0.5, and the liquid phase composition is 0.355<0.5. The gas phase content of the light component (benzene) is higher than the content of the component at the time of feed, and the content of the light component in the liquid phase is also less than the content of the component at the time of feed. The two simulation results are consistent with the facts, thereby achieving the purpose of component separation by flash evaporation.

[0106] It can be seen from the above embodiments that the present application successfully constructs a relatively complete flash system model by using the Modelica modeling language. Each unit-level equipment model in the system model is also constructed by the Modelica language, and the effectiveness of the constructed system is verified by simulation. Due to the characteristics of open source code, users can modify the model from the code level according to actual working conditions and requirements to obtain a more suitable model on this basis, providing a more efficient means for chemical engineering technicians to design flash system models.

[0107] Those skilled in the art will readily appreciate other embodiments of the present application after considering the description and practicing the contents disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The description and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.

[0108] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for constructing a flash model system based on Modelica, characterized in that: include: S1: Use the physical system modeling language Modelica to construct the pressure source unit model, heat exchanger unit model, regulating valve unit model, flash tank unit model, cooler unit model, first pressure well unit model, second pressure well unit model and connector model respectively; S2: According to the working mechanism of the system, the pressure source unit model, the heat exchanger unit model, the regulating valve unit model, the flash tank unit model, the cooler unit model, the first pressure well unit model and the second pressure well unit model are connected into a complete flash model system by using the connector model, wherein the first pressure well unit model is connected to the cooler unit model, and the second pressure well unit model is connected to the flash tank unit model, and the flow rate of the working medium in the first working medium flow channel is controlled by the pressure difference between the pressure source unit model and the second pressure well unit model, and the pressure in the flash tank unit model is controlled by the pressure difference between the pressure source unit model and the second pressure well unit model. The flow rate of the working fluid in the second working fluid flow channel is controlled by the pressure difference in the first pressure well unit model; wherein, the pressure in the pressure source unit model is taken as P1, the pressure in the second pressure well unit model is taken as P2, and the pressure in the first pressure well unit model is taken as P3, and combined with the two working fluid flow channels, P1>P2>P3 is obtained, thereby constructing the pressure difference model P1-P2 between the first working fluid flow channels, making the pressure of the flash tank unit model equal to the pressure P2 in the second pressure well unit model, and constructing the pressure difference model P2-P3 in the second working fluid flow channel, and thus the pressure difference model of the entire system is completed; S3: After the pressure difference model is built, the variables and parameters of the pressure source unit model are sequentially set and the model is called, the variables and parameters of the heat exchanger unit model are set and the model is called, the variables and parameters of the regulating valve unit model are set and the model is called, the variables and parameters of the flash tank unit model and the second pressure well unit model are set and the model is called, the variables and parameters of the cooler unit model are set and the model is called, and the variables and parameters of the first pressure well unit model are set and the model is called, thereby completing the construction of the flash model system; The pressure source unit model mainly involves the specification of the source pressure and the construction of the working fluid flow, wherein the pressure magnitude is assigned an arbitrary value through an equation; the construction of the working fluid flow mainly involves the calculation of the enthalpy value of the mixed liquid and the specification of the molar composition of the light component in the mixed liquid; The core calculation equation of the flash tank unit model is as follows: M*dx=F*xf-L*yW*x (3) dM=FLW (4) yf m =xPb0 (10) d(Hw*M)=F*Hf-L*Hk-W*Hw (12) Hw=M w *H_BenAndTol(ben,tol,x,T) (13) Hl=M w *H_BenAndTol_V(ben,tol,y,T) (14) Where M is the total number of moles of working fluid in the flash tank; Mw and rho are the molar mass and density of the mixture; rho i is the molar mass and density of each pure component in the mixture; n is the number of components in the mixture; F, L, and W are the molar flow rate of the feed to the flash tank, the molar flow rate of the gas phase outlet, and the molar flow rate of the liquid phase outlet, respectively; xf, x, and y are the molar fraction of the light component in the flash tank feed, and the liquid phase molar fraction and gas phase molar fraction of the light component in the flash tank when the vapor-liquid phase equilibrium is reached, respectively; Pb0 is the saturated vapor pressure of the component calculated by the Antoine equation; P is the total pressure of the system; A, B, and C are physical property constants, which are different for different substances; f i 、x i ,y i are the fugacity coefficient, fugacity, and liquid and gas phase molar compositions of each component of the mixture; f m is the fugacity of this mixture; H_BenAndTol() is a function used to calculate the heat of each kmol of liquid phase mixture in the flash tank, and H_BenAndTol_V() is a function used to calculate the heat of each kmol of gas phase mixture in the flash tank; The pressure well model is mainly concerned with the specification of well pressure, the magnitude of which is assigned an arbitrary value through an equation.

2. The method for constructing a flash vaporization model system based on Modelica according to claim 1, characterized in that: The heat exchanger unit model and the cooler unit model are both shell and tube heat exchanger unit models. The shell and tube heat exchanger unit model is divided into a plurality of heat exchange units. The number of heat exchange units can be arbitrarily set in the model source code according to actual needs.

3. The method for constructing a flash vaporization model system based on Modelica according to claim 1, characterized in that: The regulating valve unit model is a regulating valve based on linear flow characteristics, and its working principle is as follows: qm=cifb*dp*G f (2) Among them, qm_nom, dp_nom, G f are the rated mass flow rate of the working fluid, the rated pressure drop of the working fluid and the linear flow characteristic coefficient; qm, cifb and dp are the actual mass flow rate of the working fluid, the opening of the regulating valve and the actual pressure drop of the working fluid respectively.

4. The method for constructing a flash vaporization model system based on Modelica according to claim 1, characterized in that: The method for obtaining the fugacity coefficient is: S11: according to the vdW mixing rule, obtaining a first mixing parameter and a second mixing parameter of the liquid phase mixture; S12: solving the SRK equation in the form of a compression factor using the first mixing parameter and the second mixing parameter to obtain a plurality of solutions; S13: Selecting a solution that meets the requirements from the multiple solutions, specifically: if Tr is greater than 1, the SRK equation has only one real number solution, and the solution is taken as the solution that meets the requirements; if Tr is less than 1, the SRK equation has three real number solutions, and the largest solution is selected as the solution that meets the requirements; wherein Tr is the component contrast temperature; S14: Calculate the fugacity coefficient using the first mixing parameter, the second mixing parameter and a solution that meets the requirements.

5. The method for constructing a flash vaporization model system based on Modelica according to claim 4, characterized in that: S11 includes the following sub-steps: S111: Calculate the pressure correction term a corresponding to each pure component through the following formula: i and the volume correction term b i ; In the above formula, R is a constant, p is the total pressure of the system, T is the system temperature, and T c , P c , w are the inherent properties of different components, namely, critical temperature, critical pressure and eccentricity factor; S112: According to a i and b i , the pressure correction term a corresponding to the mixture can be obtained by the following formula: m , volume correction term b m And the dimensionless quantity A corresponding to each pure component i , B i ; A i =a i p / (R 2 T 2 ) B i =b i p / (R 2 T 2 ) Where y i is the gas phase molar composition of each component; S113: According to A i , B i , the first mixing parameter A of the mixture is obtained by the following formula: m and the second mixing parameter B m ; 6. The method for constructing a flash vaporization model system based on Modelica according to claim 4, characterized in that: The SRK equation expression in the form of the compression factor is as follows: Where z is the compression factor, A m , B m are the first mixing parameter and the second mixing parameter respectively.

7. The method for constructing a flash vaporization model system based on Modelica according to claim 4, characterized in that: The fugacity coefficient Solve the equation as follows: where b i is the volume correction term corresponding to each pure component; a m is the pressure correction term corresponding to the mixture; b m is the volume correction term corresponding to the mixture; A m , B m are the first mixing parameter and the second mixing parameter respectively; z is the compression factor.

8. The method for constructing a flash vaporization model system based on Modelica according to claim 1, characterized in that: The connector model adopts a non-causal connector based on Modelica, and the non-causal connector stores two Real type variables: p and x, which are used to transmit pressure and the molar fraction of the light component of the working fluid; a Flow type variable qm, which is used to transmit the mass flow rate of the working fluid; and a Stream type variable h, which is used to transmit the enthalpy value of the working fluid.

Citation Information

Patent Citations

  • System for improving power generation capability through organic Rankine cycle combined with flash evaporation and control method

    CN110593973A

  • Modularized modeling and simulation method for secondary circuit of nuclear power system

    CN113486608A