A method and apparatus for plug flow reactor modeling for digital twin systems
By correcting intermediate values of the reactor using an artificial neural network model and combining it with a reactor mechanism model for calculation, the accuracy and calculation speed of the model are improved, the complexity of reactor simulation in existing technologies is solved, and high-precision simulation of industrial reactors is achieved.
Patent Information
- Application Number
- CN202210568287.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-24
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-05-24
AI Technical Summary
In existing technologies, chemical reactor models cannot realistically simulate industrial reactors, resulting in insufficient process simulation accuracy and making it difficult to meet high-precision requirements.
By combining artificial neural network technology with a reactor mechanism model, and by calculating and correcting intermediate values, accurate modeling of the reactor can be achieved.
The accuracy and calculation speed of the model have been improved, enabling high-precision simulation of industrial reactors.
Smart Images

Figure CN115114845B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to reaction modeling technology, and more particularly to a method and apparatus for modeling plug flow reactors in digital twin systems. Background Technology
[0002] Chemical reactors are the core of the entire chemical process, serving as a necessary step for the transformation of chemical substances. Therefore, simulating chemical reaction processes has always been a challenging and crucial aspect of process simulation. Given the complexity of actual reactor models, general-purpose chemical reactor models often neglect many equipment details and the impact of operational differences on the simulation. Consequently, the general-purpose reactor unit modules in typical process simulation software are relatively simple models, making it difficult to meet the requirements of high-precision process simulation. Summary of the Invention
[0003] This invention addresses the problem that existing technologies cannot realistically simulate industrial reactors using only reaction kinetic models, and proposes a method and apparatus for modeling plug flow reactors using artificial neural network technology.
[0004] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0005] A method for modeling plug flow reactors in digital twin systems, applied to dynamic simulation systems, includes a reactor mechanism model and an artificial neural network model; the method includes:
[0006] The intermediate values of the reactor are calculated using a reactor mechanism model, and then the calculated intermediate values are transmitted to an artificial neural network model.
[0007] The intermediate values of the reactor are corrected by using an artificial neural network model. The corrected intermediate values are then fed back to the reactor mechanism model, which performs calculations based on the corrected intermediate values and outputs the results.
[0008] Preferably, the calculation of reactor intermediate values includes the calculation of the reactor reaction rate.
[0009] The reaction equation is: aA + bB → cC + dD;
[0010] The kinetic reaction rate equation is as follows:
[0011] R = k·f(BASIS) - k'·f'(BASIS)
[0012]
[0013] Where R is the reaction rate kmol / m3-h; BASIS is the reaction baseline; k is the forward reaction rate constant; k' is the reverse reaction rate constant; and a, b, c, and d represent the stoichiometric coefficients of the reaction components.
[0014] As a preferred method, the reactor mechanism model is used in conjunction with the corrected intermediate values for calculation, including:
[0015] The calculation of the total mass balance of the reactor is performed by combining the reaction rate and the corrected reaction rate.
[0016]
[0017] Where M is the number of moles in the holdup, F in F is the molar flow rate of the feed stream. out Ri represents the molar flow rate of the discharge stream, and Ri represents the reaction rate of component i.
[0018] Calculations to ensure reactor component equilibrium.
[0019]
[0020] Where H is the molar enthalpy of the holdup, H in H is the molar enthalpy of the feed stream. out Let Q be the molar enthalpy of the discharge stream, and Q be the heat load.
[0021] Calculation of reactor component balance;
[0022]
[0023] in, The mole fraction of component i in the discharge stream. R represents the mole fraction of the i-th component in the feed stream. i The reaction rate of component i is given by i, which is a positive integer less than NC, where NC is the number of components. The pH flash evaporation is calculated by using a flash evaporation algorithm engine to calculate the temperature and outlet flow state of each region based on the enthalpy and pressure of the holdup in each region of the reactor. The calculated thermometer outlet flow state is then fed back to the artificial neural network model.
[0024] As a preferred method, the calculation method for pH flash evaporation includes: S1: enthalpy H and pressure P are known;
[0025] S2: Assume the temperature is T;
[0026] S3: Perform PT flash evaporation calculation;
[0027] S4: Calculate the enthalpy H 计算值 ;
[0028]
[0029] Where, x i γ is the molar coefficient of the component, R is a constant, and γ is the molar coefficient of the component. i denoted as the fugacity coefficient of the component, and deltaVap as the heat of vaporization;
[0030] S5: Determine the enthalpy value H 计算值 The error in enthalpy H is also considered. When the error is within the range of tol, the output temperature T and liquid phase composition x are calculated. i Gas phase composition y i And the gas phase fraction e, otherwise re-estimate T and return to S3 for PT flash evaporation calculation.
[0031] Preferred methods for calculating PT flash evaporation include:
[0032] Step 1: Determine the flow rate F and composition z of the reactants. i Pressure is P, temperature is T;
[0033] Step 2: Estimate the liquid phase composition x1 i The gas phase composition y1 i ,
[0034] x1 i =z i / k1 i y1 i =z i *k1 i ;
[0035] Among them, k1 i The estimated phase equilibrium constant,
[0036] k1 i =Exp(5.37*(1+ω)*(1-1 / T) r )P r );
[0037] T r =T / T c ;
[0038] P r =P / P c ;
[0039] Step 3: Calculate the liquid phase composition x2 i The gas phase composition y2 i ;
[0040] x2 i =z i / k2 i y2 i =zi *k2 i ;
[0041] Among them, k2 i The phase equilibrium constant is calculated.
[0042] k2 i =Exp(lnγ) i );
[0043]
[0044] G ji =exp(-a ji τ ji ), a ji =a ij ;
[0045]
[0046] a ij =c ij +d ij T;
[0047] Among them, a ij b ij c ij d ij e ij f ij Here, T represents the binary interaction parameters of the substances, x represents the mole fraction of the components, i, j, l, and r represent the i-th, j-th, l-th, and r-th components, respectively, and γ is the fugacity coefficient.
[0048] Step 4: Calculate the gas phase fraction e;
[0049]
[0050] Where c is the number of components and e is the gas phase fraction;
[0051] Step 5: Convergence judgment, for the estimated liquid phase composition x1 i The gas phase composition y1 i and the calculated liquid phase composition x2 i The gas phase composition y2 i Determine if it converges; if it converges, output the liquid phase composition x. i Gas phase composition y i Phase equilibrium constant k i And the gas phase fraction F(e); otherwise, proceed to step 2.
[0052] To address the aforementioned technical problems, this invention also provides an apparatus for modeling plug flow reactors in a digital twin system, applied to a dynamic simulation system, comprising a reactor mechanism model and an artificial neural network model; it further includes a reactor intermediate value calculation module and a reactor intermediate value correction module; the reactor intermediate value calculation module calculates intermediate values through the reactor mechanism model and transmits the calculated intermediate values to the artificial neural network model;
[0053] The reactor intermediate value correction module corrects the reactor intermediate values using an artificial neural network model and feeds the corrected intermediate values back to the reactor mechanism model. The reactor mechanism model then performs calculations based on the corrected intermediate values and outputs the results.
[0054] Preferably, the reactor intermediate value calculation module includes a reactor reaction rate calculation module, and the reaction equation of the reactor reaction rate calculation module is aA+bB→cC+dD.
[0055] The kinetic reaction rate equation is as follows:
[0056] R = k·f(BASIS) - k'·f'(BASIS)
[0057]
[0058] Where R is the reaction rate kmol / m3-h; BASIS is the reaction baseline; k is the forward reaction rate constant; k' is the reverse reaction rate constant; and a, b, c, and d represent the stoichiometric coefficients of the reaction components.
[0059] This invention, by adopting the above technical solutions, has significant technical effects:
[0060] This invention addresses the readily available and abundant production data in industrial manufacturing by combining artificial neural network models widely used in artificial intelligence to correct and refine the calculation results of mechanistic models. This results in a significant improvement in the accuracy of the hybrid model compared to the original mechanistic model, and a substantial increase in calculation speed.
[0061] This invention calculates the error of the output layer and uses this error to change the weights of the output layer. The change in the weights of the output layer then serves as the basis for the change in the weights of the intermediate layers, thus propagating back to the input layer layer by layer. Through artificial neural networks (1), the intrinsic characteristics of the reaction system are simulated, and directional and quantitative control is achieved through the training process; (2) within the range of variable changes, the reaction results are obtained by training the network well; (3) the reaction conditions are optimized. Attached Figure Description
[0062] Figure 1 This is a flowchart of the present invention;
[0063] Figure 2 This is a flowchart of the present invention;
[0064] Figure 3 This is a flow chart of the PT flash evaporation process of the present invention;
[0065] Figure 4 This is a flow chart of the pH flash evaporation process of the present invention. Detailed Implementation
[0066] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.
[0067] Example 1
[0068] A method for modeling plug flow reactors in digital twin systems, applied to dynamic simulation systems, includes a reactor mechanism model and an artificial neural network model; the method includes:
[0069] The intermediate values of the reactor are calculated using a reactor mechanism model, and then the calculated intermediate values are transmitted to an artificial neural network model.
[0070] The intermediate values of the reactor are corrected by using an artificial neural network model. The corrected intermediate values are then fed back to the reactor mechanism model, which performs calculations based on the corrected intermediate values and outputs the results.
[0071] The calculation of reactor intermediate values includes the calculation of reactor reaction rate. The reaction equation is aA + bB → cC + dD.
[0072] The kinetic reaction rate equation is as follows:
[0073] R = k·f(BASIS) - k'·f'(BASIS)
[0074]
[0075] Where R is the reaction rate kmol / m3-h; BASIS is the reaction baseline; k is the forward reaction rate constant; k' is the reverse reaction rate constant; and a, b, c, and d represent the stoichiometric coefficients of the reaction components.
[0076] The reactor mechanism model, combined with corrected intermediate values, is used for calculations including:
[0077] The calculation of the total mass balance of the reactor is performed by combining the reaction rate and the corrected reaction rate.
[0078]
[0079] Where M is the number of moles in the holdup, F in F is the molar flow rate of the feed stream. out Ri represents the molar flow rate of the discharge stream, and Ri represents the reaction rate of component i.
[0080] Calculations to ensure reactor component equilibrium.
[0081]
[0082] Where H is the molar enthalpy of the holdup, H in H is the molar enthalpy of the feed stream. out Let Q be the molar enthalpy of the discharge stream, and Q be the heat load.
[0083] Calculation of reactor component balance;
[0084]
[0085] in, The mole fraction of component i in the discharge stream. R represents the mole fraction of the i-th component in the feed stream. i The reaction rate of component i is given by , where i is a positive integer less than NC, and NC is the number of components. The pH flash evaporation is calculated by using a flash evaporation algorithm engine to calculate the temperature and outlet flow state of each region based on the enthalpy and pressure of the holdup in each region of the reactor. The calculated thermometer outlet flow state is then fed back to the artificial neural network model.
[0086] The calculation method for pH flash evaporation includes: S1: enthalpy H and pressure P are known;
[0087] S2: Assume the temperature is T;
[0088] S3: Perform PT flash evaporation calculation;
[0089] S4: Calculate the enthalpy H 计算值 ;
[0090]
[0091] Where, x i γ is the molar coefficient of the component, R is a constant, and γ is the molar coefficient of the component. i denoted as the fugacity coefficient of the component, and deltaVap as the heat of vaporization;
[0092] S5: Determine the enthalpy value H 计算值 The error in enthalpy H is also considered. When the error is within the range of tol, the output temperature T and liquid phase composition x are calculated. i Gas phase composition y i And the gas phase fraction e, otherwise re-estimate T and return to S3 for PT flash evaporation calculation.
[0093] Methods for calculating PT flash evaporation include:
[0094] Step 1: Determine the flow rate F and composition z of the reactants. i Pressure is P, temperature is T;
[0095] Step 2: Estimate the liquid phase composition x1 i The gas phase composition y1 i ,
[0096] x1 i =z i / k1 i y1 i =z i *k1 i ;
[0097] Among them, k1 i The estimated phase equilibrium constant,
[0098] k1 i =Exp(5.37*(1+ω)*(1-1 / T) r )P r );
[0099] T r =T / T c ;
[0100] P r =P / P c ;
[0101] Step 3: Calculate the liquid phase composition x2 i The gas phase composition y2 i ;
[0102] x2 i =z i / k2 i y2 i =z i *k2 i ;
[0103] Among them, k2 i The phase equilibrium constant is calculated.
[0104] k2 i =Exp(lnγ) i );
[0105]
[0106] G ji =exp(-a ji τ ji ), a ji=a ij ;
[0107]
[0108] a ij =c ij +d ij T;
[0109] Among them, a ij b ij c ij d ij e ij f ij Here, T represents the binary interaction parameters of the substances, x represents the mole fraction of the components, i, j, l, and r represent the i-th, j-th, l-th, and r-th components, respectively, and γ is the fugacity coefficient.
[0110] Step 4: Calculate the gas phase fraction e;
[0111]
[0112] Where c is the number of components and e is the gas phase fraction;
[0113] Step 5: Convergence judgment, for the estimated liquid phase composition x1 i The gas phase composition y1 i and the calculated liquid phase composition x2 i The gas phase composition y2 i Determine if it converges; if it converges, output the liquid phase composition x. i Gas phase composition y i Phase equilibrium constant k i And the gas phase fraction F(e); otherwise, proceed to step 2.
[0114] The reactor temperature, pressure, and content of key reaction components calculated above are input into an artificial neural network to obtain a new reaction conversion rate. This new conversion rate will be used in the calculation of the reaction temperature and content of each component in the next round.
[0115] Example 2
[0116] Based on Example 1, this example provides an apparatus for modeling plug flow reactors in a digital twin system, applied to a dynamic simulation system, including a reactor mechanism model and an artificial neural network model; it also includes a reactor intermediate value calculation module and a reactor intermediate value correction module;
[0117] The reactor intermediate value calculation module calculates the intermediate value through the reactor mechanism model and transmits the calculated intermediate value to the artificial neural network model.
[0118] The reactor intermediate value correction module corrects the reactor intermediate values using an artificial neural network model and feeds the corrected intermediate values back to the reactor mechanism model. The reactor mechanism model then performs calculations based on the corrected intermediate values and outputs the results.
[0119] The reactor intermediate value calculation module includes a reactor reaction rate calculation module. The reaction equation for the reactor reaction rate calculation module is aA+bB→cC+dD.
[0120] The kinetic reaction rate equation is as follows:
[0121] R = k·f(BASIS) - k'·f'(BASIS)
[0122]
[0123] Where R is the reaction rate kmol / m3-h; BASIS is the reaction baseline; k is the forward reaction rate constant; k' is the reverse reaction rate constant; and a, b, c, and d represent the stoichiometric coefficients of the reaction components.
[0124] Example 3
[0125] Based on the above embodiments, k and k' are functions of temperature, satisfying the following Arrhenius equation:
[0126] k = A·exp(-E / RT)·T β
[0127] k'=A'·exp(-E' / RT)·T β '
[0128] f(BASIS) and f'(BASIS) are functions of the reaction baseline. Consider the following reaction:
[0129] CO + Cl₂ → COCl₂
[0130] The reaction orders of CO and Cl2 are 1 and 1.5 respectively (reaction orders can be fractions), then their reaction rates are given by the following formula:
[0131] r 正向 =k[CO][Cl2] 3 / 2 ;
[0132] And f(BASIS) = [CO][Cl2] 3 / 2 ;
[0133] The implicit Euler method is employed.
[0134] M t+Δt =Mt +Δt×(∑F in -F out +∑R i )
[0135]
[0136]
[0137] If Δt is in seconds (s), it needs to be converted to hours (h), that is, each Δt needs to be divided by 3600.
Claims
1. A method for modeling plug flow reactors in digital twin systems, applied to dynamic simulation systems, including reactor mechanism models and artificial neural network models; The method includes: calculating reactor intermediate values, which involves calculating intermediate values using a reactor mechanism model and transmitting the calculated intermediate values to an artificial neural network model; the calculation of reactor intermediate values includes the calculation of reactor reaction rates; The intermediate values of the reactor are corrected by using an artificial neural network model. The corrected intermediate values are then fed back to the reactor mechanism model. The reactor mechanism model performs calculations based on the corrected intermediate values and outputs the results. The reactor mechanism model, combined with the corrected intermediate values, is used for calculations including: the calculation of the total mass balance of the reactor, the calculation of the energy balance of the reactor components, and the calculation of the reactor component balance.
2. The method for modeling a plug flow reactor for a digital twin system according to claim 1, characterized in that: The calculation of reactor intermediate values includes the calculation of the reactor reaction rate. The reaction equation is: aA + bB → cC + dD; The kinetic reaction rate equation is as follows: R = k·f(BASIS) - k'·f'(BASIS) Where R is the reaction rate kmol / m3-h; BASIS is the reaction baseline; k is the forward reaction rate constant; k' is the reverse reaction rate constant; and a, b, c, and d represent the stoichiometric coefficients of the reaction components.
3. The method for modeling a plug flow reactor for a digital twin system according to claim 1, characterized in that, The reactor mechanism model, combined with corrected intermediate values, is used for calculations including: The calculation of the total mass balance of the reactor is performed by combining the reaction rate and the corrected reaction rate. Where M is the number of moles in the holdup, F in F is the molar flow rate of the feed stream. out Ri represents the molar flow rate of the discharge stream, and Ri represents the reaction rate of component i. Calculation of reactor component energy balance, Where H is the molar enthalpy of the holdup, H in H is the molar enthalpy of the feed stream. out Let Q be the molar enthalpy of the discharge stream, and Q be the heat load. Calculation of reactor component balance; in, The mole fraction of component i in the discharge stream. R represents the mole fraction of the i-th component in the feed stream. i Let i be the reaction rate of component i, where i takes the value of a positive integer less than NC, and NC is the number of components. The pH flash evaporation calculation is performed by using a flash evaporation algorithm engine to calculate the temperature and outlet flow status of each region based on the enthalpy and pressure of the holdup in each region of the reactor. The calculated thermometer outlet flow status is then fed back to the artificial neural network model.
4. The method for modeling a plug flow reactor for a digital twin system according to claim 3, characterized in that, The calculation method for pH flash evaporation includes: S1: enthalpy H and pressure P are known; S2: Assume the temperature is T; S3: Perform PT flash evaporation calculation; S4: Calculate the enthalpy H 计算值 ; Where, x i γ is the molar coefficient of the component, R is a constant, and γ is the molar coefficient of the component. i denoted as the fugacity coefficient of the component, and deltaVap as the heat of vaporization; S5: Determine the enthalpy value H 计算值 The error in enthalpy H is also considered. When the error is within the range of tol, the output temperature T and liquid phase composition x are calculated. i Gas phase composition y i And the gas phase fraction e, otherwise re-estimate T and return to S3 for PT flash evaporation calculation.
5. The method for modeling a plug flow reactor for a digital twin system according to claim 4, characterized in that, Methods for calculating PT flash evaporation include: Step 1: Determine the flow rate F and composition z of the reactants. i Pressure is P, temperature is T; Step 2: Estimate the liquid phase composition x1 i The gas phase composition y1 i , x1 i =z i / k1 i ;y1 i =z i *k1 i ; Among them, k1 i The estimated phase equilibrium constant, k1 i =Exp(5.37*(1+ω)*(1-1 / T r )P r ); T r =T / T c ; P r =P / P c ; Step 3: Calculate the liquid phase composition x2 i The gas phase composition y2 i ; x2 i =z i / k2 i y2 i =z i *k2 i ; Among them, k2 i The phase equilibrium constant is calculated. k2 i =Exp(lnγ i ); G ji =exp(-a ji τ ji ),a ji =a ij ; a ij =c ij +d ij T; Among them, a ij b ij c ij d ij e ij f ij , where T is the temperature, x is the mole fraction of the component, i, j, l, r represent the i-th, j-th, l-th, and r-th components, respectively, and γ is the fugacity coefficient; Step 4: Calculate the gas phase fraction e; Where c is the number of components and e is the gas phase fraction; Step 5: Convergence judgment, for the estimated liquid phase composition x1 i The gas phase composition y1 i and the calculated liquid phase composition x2 i The gas phase composition y2 i Determine if it converges; if it converges, output the liquid phase composition x. i Gas phase composition y i Phase equilibrium constant k i And the gas phase fraction e; otherwise, proceed to step 2.
6. An apparatus for modeling plug flow reactors in a digital twin system, applied in a dynamic simulation system, comprising a reactor mechanism model and an artificial neural network model; characterized in that, It also includes a reactor intermediate value calculation module and a reactor intermediate value correction module; The reactor intermediate value calculation module calculates intermediate values through the reactor mechanism model and transmits the calculated intermediate values to the artificial neural network model; the calculation of reactor intermediate values includes the calculation of reactor reaction rate; The reactor intermediate value correction module corrects the reactor intermediate value through an artificial neural network model and feeds the corrected intermediate value back to the reactor mechanism model. The reactor mechanism model then performs calculations based on the corrected intermediate value and outputs the calculation results. The reactor mechanism model, combined with the corrected intermediate values, is used for calculations including: the calculation of the total mass balance of the reactor, the calculation of the energy balance of the reactor components, and the calculation of the reactor component balance.
7. The apparatus for modeling plug flow reactors in a digital twin system according to claim 6, characterized in that, The reactor intermediate value calculation module includes the reactor reaction rate calculation module. The reaction equation for the reactor reaction rate calculation module is aA+bB→cC+dD. The kinetic reaction rate equation is as follows: R = k·f(BASIS) - k'·f'(BASIS) Where R is the reaction rate kmol / m3-h; BASIS is the reaction baseline; k is the forward reaction rate constant; k' is the reverse reaction rate constant; and a, b, c, and d represent the stoichiometric coefficients of the reaction components.
Citation Information
Patent Citations
System and method for using an artificial neural network to simulate pipe hydraulics in a reservoir simulator
CA2825189A1
Catalytic reforming process modeling method based on data and mechanism mixing
CN113628692A