Chemical reaction mechanism optimization method and system based on multi-objective optimization algorithm
By optimizing the chemical reaction mechanism through a multi-objective optimization algorithm, the problems of insufficient description of the objective function and deviation of the optimization direction in the existing technology are solved, and higher calculation accuracy and global optimal solution are obtained. The generated mechanism is closer to the detailed mechanism.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIHANG UNIV
- Filing Date
- 2024-04-02
- Publication Date
- 2026-06-26
AI Technical Summary
Existing chemical reaction mechanism optimization methods suffer from insufficient description of objective functions in combustion device design, leading to deviations in optimization direction. Furthermore, different components exhibit different rates of decrease, resulting in reduced optimization effectiveness. These methods are unable to optimize multiple objectives simultaneously and are prone to getting trapped in local optima.
Multi-objective optimization algorithms (such as MOEA/D algorithm and NSGA-III algorithm) are used to conduct zero-dimensional isobaric autoignition simulation under different working conditions. The objective function of the multi-objective optimization algorithm is established. The chemical reaction mechanism is optimized through sensitivity analysis and multi-objective optimization algorithm to generate the Pereto front and achieve simultaneous optimization of multiple objectives.
It improves the calculation accuracy of chemical reaction mechanisms, avoids the directional deviation of small components being affected by large components in single-objective algorithms, can find the global optimal solution under different working conditions, and the generated mechanism is closer to the calculation results of detailed mechanisms.
Smart Images

Figure CN118298943B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of combustion device engineering design technology, and more specifically to a chemical reaction mechanism optimization method and system based on multi-objective optimization algorithms. Background Technology
[0002] In the engineering design and fundamental research of combustion devices such as gas turbines, rocket engines, and piston engines, numerical simulation of chemical reaction flow processes is often required. In reaction flow CFD (Computational Fluid Dynamics) simulations, the accuracy of the chemical reaction mechanism model used directly affects the overall calculation accuracy of the simulation.
[0003] Specifically, in reaction flow simulation, a chemical reaction mechanism file needs to be provided to the simulation program. This file specifies all elementary reactions involved in the combustion process and their corresponding Arrhenius constants. Based on this information, the calculation program uses the Arrhenius formula to calculate the chemical reaction source term in the governing equations. The process of optimizing the chemical reaction mechanism involves changing the Arrhenius constant in the mechanism to increase its accuracy. The accuracy of the chemical reaction mechanism is reflected in the error compared to experimental data or simulation data from a detailed mechanism; the smaller the error, the higher the accuracy. Sometimes we have a detailed mechanism with high accuracy, but its scale is too large for direct calculation; conversely, we have a simplified mechanism with a smaller scale but lower accuracy. Therefore, we can optimize the simplified mechanism to make its calculation results closer to the detailed mechanism while achieving faster calculation accuracy.
[0004] In optimizing chemical reaction mechanisms, existing methods involve zero-dimensional auto-ignition or one-dimensional laminar flame simulations. The distribution data of physical quantities (such as component content and temperature) in the calculation results are compared with experimental values or simulated values of detailed mechanisms. The main problems with this method are: 1. Essentially, it combines multiple error values into a single objective function through simple summation. The objective function itself does not adequately describe the chemical reaction mechanism, losing some information. Therefore, inappropriate data point selection may lead to deviations in the optimization direction (i.e., the minimum value of the objective function does not correspond to the optimal reaction mechanism); 2. During optimization, different components decrease at different rates, resulting in differences in magnitude. Smaller components may be masked by the floating-point errors of larger components, reducing the optimization effect; 3. When some components in the objective function conflict and cannot decrease simultaneously during optimization, only the minimum weighted value under a certain weight can be obtained, without the ability to choose between the two.
[0005] Therefore, how to better characterize the difference between the mechanism that needs to be optimized and the detailed mechanism, while improving the calculation accuracy to assist the engineering design of combustion devices, is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] In view of this, the present invention provides a chemical reaction mechanism optimization method and system based on multi-objective optimization algorithms. Multi-objective optimization algorithms (such as MOEA / D algorithm, NSGA-III algorithm, etc.) are applied to the optimization of chemical reaction mechanisms. Zero-dimensional isobaric autoignition simulation is performed under different operating conditions. Each operating condition corresponds to an objective. The results of these objective calculations are simultaneously approximated to the detailed mechanism through multi-objective optimization algorithms, thereby assisting in the accurate simulation and design of combustion devices.
[0007] To achieve the above objectives, the present invention adopts the following technical solution:
[0008] A chemical reaction mechanism optimization method based on multi-objective optimization algorithms includes the following steps:
[0009] Step 1: Based on the chemical reaction mechanism file to be optimized and the detailed reaction mechanism file, obtain the reaction mechanism to be optimized, the optimized operating conditions and important components, and perform zero-dimensional isobaric autoignition simulation on the detailed reaction mechanism file under the optimized operating conditions to obtain the detailed mechanism calculation results;
[0010] Step 2: Obtain the reaction type of each elementary reaction according to the reaction mechanism to be optimized, determine the number of optimization variables required for the corresponding elementary reaction according to the reaction type, sum up the number of optimization variables of all elementary reactions to determine the total number of variables required for the reaction mechanism to be optimized, establish a mapping relationship, and number all optimization variables.
[0011] Step 3: Based on the calculation results of the optimized working conditions, important components, and detailed mechanisms, establish the objective function based on the multi-objective optimization algorithm, and automatically generate the calculation function of the objective function;
[0012] Step 4: Zero-dimensional isobaric autoignition simulation is performed on the reaction mechanism to be optimized. Based on the simulation results, sensitivity analysis is carried out on the objective function through the calculation function. The sensitivity analysis results are obtained according to the optimization variable number.
[0013] Step 5: Select optimization variables based on the sensitivity analysis results and the total number of variables, call the multi-objective optimization algorithm to optimize the objective function, obtain the convergence history and generate the Pereto front; determine the number of optimization variables that need to be adjusted based on the total number of variables, and then try to optimize each optimization variable that needs to be adjusted.
[0014] Preferably, the method further includes step 6: calling the program post-processing module to visualize the calculation results, including the convergence curves of all objective functions during the optimization process, the convergence curve of the geometric mean of the objective functions, and the visualization of the Pereto front based on the parallel coordinate method.
[0015] Preferably, according to the user's instructions, the solution() function in Cantera is called to read in the chemical reaction mechanism file and detailed reaction mechanism file that need to be optimized, as well as the optimization conditions and important components given by the user.
[0016] Preferably, the key components include reactants, products, and intermediates; the objective function of the multi-objective optimization algorithm is expressed as:
[0017]
[0018] Where m is the operating condition number, F 1,m F 2,m F 3,m and F 4,m These are used to characterize the different errors between the optimized reaction mechanism and the detailed mechanism calculation results under each operating condition, specifically:
[0019] (1)F 1,m The error in reactants or products used to characterize the error between the reaction mechanism to be optimized and the detailed mechanism calculation results is given by the following formula:
[0020]
[0021] x i,m For the m-th operating condition, T represents the mole fraction of the i-th reactant or product at each moment in the calculation results. The superscript D indicates that the calculation results are from a detailed mechanism. s T is the moment when the reaction begins. e The reaction termination time; I i This represents the set of numbers for reactants and products;
[0022] (2)F 2,m The error of intermediate products, used to characterize the error between the reaction mechanism to be optimized and the detailed mechanism calculation results, is expressed by the following formula:
[0023]
[0024] Where τ p,j,m For the m-th operating condition, the time when the j-th intermediate product reaches its peak value or the time when the generation / consumption rate reaches its peak value; I p This represents the set of intermediate product numbers;
[0025] (3)F 3,mThe error in temperature data, used to characterize the error between the reaction mechanism to be optimized and the detailed mechanism calculation results, is expressed by the following formula:
[0026]
[0027] Among them, T m Let be the temperature at each moment in the calculation results for the m-th operating condition;
[0028] (4)F 4,m The error in the peak temperature rise rate, used to characterize the error between the reaction mechanism to be optimized and the detailed mechanism calculation results, is expressed by the following formula:
[0029]
[0030] Where, τ T,m This represents the moment when the rate of temperature change reaches its peak under the m-th operating condition.
[0031] Preferably, step 4 includes the following specific steps:
[0032] Step 41: Determine the variables for sensitivity analysis;
[0033] Step 42: Substitute the sensitivity analysis variables into the reaction mechanism to be optimized, and perform zero-dimensional isobaric autoignition simulation to obtain the calculation results;
[0034] Step 43: Input the calculation result into the calculation function to obtain the target function value;
[0035] Step 44: Use the objective function value to evaluate the sensitivity using the difference method, and record the index of the optimization variable with a sensitivity of 0. Then, take the root mean square of the sensitivity of all optimization variables in the objective function and sort them. Mark the index of the optimization variable at the end of the sort according to the number of user inputs as low sensitivity.
[0036] Step 45: Output the sensitivity analysis results. The sensitivity analysis results include: the sensitivity of all optimization variables, as well as the index of the optimization variable with sensitivity of 0 and the index of the optimization variable with low sensitivity.
[0037] Preferably, step 5 includes the following specific steps:
[0038] Step 51: Based on the sensitivity analysis results, screen the optimization variables and select the sensitive optimization variables as the optimization variables to be optimized;
[0039] Step 52: Construct a new reaction mechanism to be optimized based on the optimization variables and the chemical reaction mechanism file to be optimized, and perform zero-dimensional isobaric auto-ignition simulation to obtain the optimization calculation results;
[0040] Step 53: Input the optimization calculation results into the calculation function to obtain the optimization objective function value;
[0041] Step 54: Optimize the objective function value using a multi-objective optimization algorithm to obtain new optimization variables, and return to step 51 until the preset number of iterations is reached. Obtain the convergence history and generate the Pereto front. The convergence history is a set of optimization variables and objective function values for each optimization iteration step.
[0042] Preferably, the convergence history includes the optimization variables and objective function in each optimization iteration.
[0043] A chemical reaction mechanism optimization system based on a multi-objective optimization algorithm includes: a zero-dimensional isobaric auto-ignition simulation module, a sensitivity analysis module, an objective function calculation module, a reaction mechanism construction module, and a multi-objective optimization module;
[0044] The reaction mechanism construction module receives sensitivity analysis results, the chemical reaction mechanism file to be optimized, and the reaction rate parameter offset vector. It extracts the reaction rate parameters from the reaction mechanism file and multiplies them by the reaction rate parameter offset vector to obtain new reaction rate parameters. It then constructs a YAML string based on the reactants, products, and new reaction rate parameters in the chemical reaction mechanism file to be optimized. Using `cantera.Reaction.fromYaml`, it constructs the modified elementary reactions from the string and uses `cantera.Solution.modify_reaction` to construct the modified mechanism based on the modified elementary reactions, thus obtaining a new reaction mechanism to be optimized. Finally, it filters optimization variables based on the sensitivity analysis results and constructs the reaction mechanism based on the filtered optimization variables, the reaction mechanism file, and the reaction rate parameter offset vector.
[0045] The zero-dimensional isobaric auto-ignition simulation module receives the reaction mechanism and reaction conditions to be optimized, performs zero-dimensional isobaric auto-ignition simulation under the reaction conditions, and obtains the calculation results; the calculation results include the component content and temperature change curves over time.
[0046] The objective function calculation module receives the reaction rate parameter offset vector, performs a linear transformation to obtain variable values, and generates the reaction mechanism to be optimized through the reaction mechanism construction module based on these variable values. This is then converted into the Cantera reaction mechanism. The zero-dimensional isobaric autoignition simulation module is then invoked to simulate the Cantera reaction mechanism. Important components and temperatures are selected from the calculation results, and the error F of reactants or products in the objective function value is calculated using numerical integration. 1,m Error F of temperature data 3,m The derivatives of the important components and temperature with respect to time are calculated using the second-order difference formula. The maximum value of the derivative is then calculated, thereby yielding the error F of the intermediate product.2,m Error F of temperature data 4,m ;
[0047] Multi-objective optimization module: It uses a multi-objective optimization algorithm to optimize the objective function of multiple objectives, realizes multi-objective optimization, saves the convergence history of the optimization process, and generates the Pereto front after the optimization is completed;
[0048] The sensitivity analysis module performs sensitivity analysis on the objective function being optimized, sorts the optimization variables by sensitivity, and marks the optimization variables with lower sensitivity according to the number of user inputs. These variables can be skipped in subsequent optimization processes, thereby reducing optimization time. The sensitivity analysis results are fed back to the reaction mechanism construction module.
[0049] Preferably, in the sensitivity analysis phase of the system, the module operation flow is as follows:
[0050] Step 11: The sensitivity analysis module provides a set of variable values for sensitivity analysis, which are then input into the reaction mechanism construction module;
[0051] Step 12: The reaction mechanism construction module provides a set of reaction mechanisms to be optimized under this set of optimization variable values. Input this set of reaction mechanisms to be optimized into the zero-dimensional isobaric autoignition simulation module:
[0052] Step 13: The zero-dimensional isobaric autoignition simulation module inputs the calculation results to the objective function calculation module to calculate the objective function value under the given set of variable values, and the obtained objective function is input back to the sensitivity analysis module;
[0053] Step 14: Complete the following in the sensitivity analysis module: Evaluate the sensitivity using the difference method with the objective function value, and record the index of the optimized variable with a sensitivity of 0. Then, take the root mean square of the sensitivity of all objectives and sort them. Mark the index of the optimized variable at the end of the sort as low sensitivity based on the number of user inputs.
[0054] Step 15: Output the sensitivity analysis results. The sensitivity analysis results include: the sensitivity of all optimization variables, as well as the index of the optimization variable with sensitivity of 0 and the index of the optimization variable with low sensitivity.
[0055] Preferably, the system also includes a post-processing module and a reaction mechanism preservation module;
[0056] Post-processing module: Presents the results of multi-objective optimization, including (1) the convergence curve applicable to general objective functions, the optimization variables in the Pereto front based on the parallel coordinate method, the objective function value and the corresponding reaction mechanism visualization, (2) the calculation of ignition delay time and one-dimensional laminar flame rate in chemical reaction mechanism, etc.
[0057] Reaction Mechanism Saving Module: Provides the function of saving reaction mechanisms, and outputs the reaction mechanism to be optimized as a YAML file.
[0058] Preferably, in the process of system optimization, the module operation flow is as follows:
[0059] Step 21: Input the results of the sensitivity analysis, remove the indexes of optimization variables with sensitivity of 0 and low sensitivity from the optimization variables, and generate the optimization variables to be optimized with sensitivity.
[0060] Step 22: In the multi-objective optimization module, the objective function value corresponding to the optimization variable to be optimized generates a new set of optimization variables in one optimization iteration step. Specifically, the optimization variable to be optimized is processed by the reaction mechanism construction module, the zero-dimensional isobaric autoignition simulation module, and the objective function calculation module to calculate the objective function value under this set of optimization variables. The objective function value is fed back to the multi-objective optimization module, where the optimization variable for the next optimization iteration step is generated by a multi-objective optimization algorithm (such as NSGA-III, CTAEA, etc.). The above process is repeated until the number of iteration steps reaches the specified number of iteration steps.
[0061] Step 23: The multi-objective optimization module outputs the convergence history (optimization variables and objective function values in each optimization iteration step) to a file;
[0062] Step 24: The multi-objective optimization module saves the Pereto front generated by the optimization program, and the reaction mechanism to be optimized in the Pereto front is saved to a file through the reaction mechanism saving module.
[0063] Preferably, in the multi-objective optimization module, for multi-objective optimization methods that require a reference direction, the user-input quantity is used as the population quantity to generate the reference direction.
[0064] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a chemical reaction mechanism optimization method and system based on a multi-objective optimization algorithm. Compared with traditional methods, the algorithm of the present invention has the following advantages:
[0065] 1. With more objectives, the mechanism is described more fully, each objective has practical significance, and the objective function can better reflect the quality of the mechanism. Therefore, when multiple objectives descend simultaneously through an algorithm, the directional deviation problem caused by the influence of large components on small components in a single-objective algorithm is avoided.
[0066] 2. When there is an order of magnitude difference between different objectives, the decline of the smaller objective is less affected by the decline of the larger objective;
[0067] 3. A set of Pareto fronts can be obtained. Each point in the Pareto front can correspond to a solution that can be chosen between different solutions. Therefore, when using the mechanism, different chemical reaction mechanisms can be used for different problems.
[0068] 4. The probability of getting stuck in a local optimum and failing to find the global optimum is smaller. Attached Figure Description
[0069] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0070] Figure 1 A schematic diagram of the chemical reaction mechanism optimization method based on a multi-objective optimization algorithm provided by the present invention;
[0071] Figure 2 A schematic diagram of sensitivity analysis data transmission in the chemical reaction mechanism optimization system based on a multi-objective optimization algorithm provided by this invention;
[0072] Figure 3 This is a schematic diagram of multi-objective optimization data transmission in the chemical reaction mechanism optimization system based on a multi-objective optimization algorithm provided by the present invention;
[0073] Figure 4 This is a schematic diagram comparing the results of single-objective optimization and multi-objective optimization in Embodiment 3 of the present invention;
[0074] Figure 5 This is a schematic diagram of the optimization results of ignition delay time error under low pressure in Embodiment 3 of the present invention;
[0075] Figure 6 This is a schematic diagram of the optimization results of ignition delay time error under high pressure in Embodiment 3 of the present invention. Detailed Implementation
[0076] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0077] Example 1
[0078] This invention discloses a chemical reaction mechanism optimization method based on a multi-objective optimization algorithm, such as... Figure 1 As shown, it includes the following steps:
[0079] S1: Based on the chemical reaction mechanism file to be optimized and the detailed reaction mechanism file, obtain the reaction mechanism to be optimized, the optimized operating conditions, and the important components. Perform zero-dimensional isobaric autoignition simulation on the detailed reaction mechanism file under the optimized operating conditions to obtain the detailed mechanism calculation results. According to the user's instructions, read the chemical reaction mechanism file to be optimized and the detailed reaction mechanism file by calling Solution() in Cantera, and read the optimized operating conditions and important components given by the user.
[0080] S2: Obtain the reaction type of each elementary reaction according to the reaction mechanism to be optimized, determine the number of variables to be optimized for the corresponding elementary reaction according to the reaction type, sum up the number of variables of all elementary reactions to determine the total number of variables required for the reaction mechanism to be optimized, establish a mapping relationship, and number all optimization variables.
[0081] S3: Based on the calculation results of important components, optimized working conditions and detailed mechanisms, establish an objective function based on a multi-objective optimization algorithm, and automatically generate the calculation function of the objective function;
[0082] S4: Conduct sensitivity analysis on the objective function and obtain the sensitivity analysis results;
[0083] S41: Determine the variables for sensitivity analysis;
[0084] S42: Substitute the sensitivity analysis variables into the reaction mechanism to be optimized, and perform zero-dimensional isobaric autoignition simulation to obtain the calculation results;
[0085] S43: Input the calculation result into the calculation function to obtain the target function value;
[0086] S44: Use the objective function value to evaluate the sensitivity using the difference method, and record the index of the optimization variable with a sensitivity of 0. Then, take the root mean square of the sensitivity of all optimization variables in the objective function and sort them. Mark the index of the optimization variable with lower sensitivity at the end of the sort according to the number of user inputs.
[0087] S45: Output the sensitivity analysis results, which include: sensitivity, the index of the optimization variable with sensitivity of 0, and the index of the optimization variable with low sensitivity.
[0088] S5: Select optimization variables based on the sensitivity analysis results and the total number of variables, call the multi-objective optimization function for optimization, obtain the convergence history and generate the Pereto front; the convergence history includes the optimization variables and objective function in each optimization iteration;
[0089] S51: Based on the results of the sensitivity analysis, screen the optimization variables and select the optimization variables to be optimized;
[0090] S52: Construct a new reaction mechanism to be optimized based on the optimization variables and the chemical reaction mechanism file to be optimized, and perform zero-dimensional isobaric auto-ignition simulation to obtain the optimization calculation results;
[0091] S53: Input the optimization calculation results into the calculation function to obtain the optimization objective function value;
[0092] S54: Use a multi-objective optimization algorithm to optimize based on the objective function value, obtain new optimization variables, and return to step 51 until the preset number of iterations is reached, obtain the convergence history and generate the Pereto front.
[0093] S6: Call the program post-processing module to visualize the calculation results, including the convergence curves of all objective functions during the optimization process, the convergence curve of the geometric mean of the objective function, and the visualization of the Pereto front based on the parallel coordinate method.
[0094] Furthermore, to better characterize the difference between the mechanism to be optimized and the detailed mechanism, the following objective function was designed for the multi-objective optimization algorithm:
[0095]
[0096] Where m is the working condition number. If there are 6 working conditions to optimize, then the value range of m is 1, 2, 3, 4, 5, 6, meaning the number of targets is 6. Where F 1,m ~F 4,m The four sources of error used to characterize the result of the optimization mechanism and the detailed mechanism calculation for each operating condition are:
[0097] (1)F 1,m The error in the result of detailed mechanism calculations, specifically the error in reactants or products, is represented by the following formula:
[0098]
[0099] x 1,m For the m-th operating condition, T represents the mole fraction of the i-th reactant or product at each moment in the calculation results. The superscript D indicates that the calculation results are from a detailed mechanism. s T is the time at which the reaction begins. eThis is the time at which the reaction terminates. Here, we need to consider the set of reactants or products. For example, in the reaction of hydrogen and oxygen to produce water, the components include H, H2, O, O2, OH, H2O, H2O2, HO2, etc., corresponding to numbers 1, 2, 3, 4, 5, 6, and 7. Generally, H2, O2, and H2O are considered the initial products and products, so set I... i It is {2,4,6}, because H2 is the second, O2 is the third, and H2O is the fifth;
[0100] (2)F 2,m The error of intermediate products, used to characterize the error between the results and detailed mechanism calculations, is expressed by the following formula:
[0101]
[0102] Where τ p,j,m For the m-th operating condition, the time when the j-th intermediate product reaches its peak value or the time when the generation / consumption rate reaches its peak value; I p This indicates the intermediate product error that needs to be considered here. For example, in the reaction mentioned above where hydrogen and oxygen produce water, OH, H₂O₂, and HO₂ can be considered important intermediate products. Therefore, set I... p It is {5,7,8};
[0103] (3)F 3,m The error in temperature data, used to characterize the error between the results and detailed mechanism calculations, is expressed by the following formula:
[0104]
[0105] Where T m Let be the temperature at each moment in the calculation results for the m-th operating condition;
[0106] (4)F 4,m The error in the peak rate of temperature rise, used to characterize the error between the results and detailed mechanism calculations, is expressed by the following formula:
[0107]
[0108] Where τ T,m This represents the moment when the rate of temperature change reaches its peak under the m-th operating condition.
[0109] Example 2
[0110] Based on the above embodiments, in one specific embodiment, a chemical reaction mechanism optimization system based on a multi-objective optimization algorithm is constructed. The system runs in a Python environment and uses the Cantera library to numerically solve the initial value problem of auto-ignition, employing a multi-objective optimization algorithm. The entire computational system is highly integrated, allowing users to optimize chemical reaction mechanisms through simple code. The system includes: a zero-dimensional isobaric auto-ignition simulation module, a sensitivity analysis module, an objective function calculation module, a reaction mechanism construction module, a multi-objective optimization module, a post-processing module, and a reaction mechanism storage module.
[0111] The reaction mechanism construction module takes sensitivity analysis results, mechanism, and reaction rate parameter offset vector as input. It extracts reaction rate parameters from the mechanism and multiplies the reaction rate parameters by the reaction rate parameter offset vector to obtain new reaction rate parameters. Based on the reactants, products, and new reaction rate parameters in the original mechanism, it constructs a YAML string. It uses `cantera.Reaction.fromYaml` to construct the modified elementary reaction from the string and uses `cantera.Solution.modify_reaction` to construct the modified mechanism based on the modified elementary reaction to obtain the reaction mechanism.
[0112] The zero-dimensional isobaric auto-ignition simulation module uses the Cantera package to input the reaction mechanism and reaction conditions (including equivalence ratio, pressure, and initial temperature), and performs auto-ignition simulation under the reaction conditions to obtain calculation results. The calculation results include component content and temperature change curves over time.
[0113] The objective function calculation module transforms the input variable values into the Cantera reaction mechanism through the reaction mechanism construction module. It then calls the zero-dimensional isobaric autoignition simulation module for simulation calculations. From the calculation results, it selects key components and temperatures, and uses numerical integration to calculate the error F of reactants or products in the objective function value. 1,m Error F of temperature data 3,m The derivatives of the important components and temperature with respect to time are calculated using the second-order difference formula. The maximum value of the derivative is then calculated, thereby yielding the error F of the intermediate product. 2,m Error F of temperature data 4,m ;
[0114] Multi-objective optimization module: Implements optimization of various multi-objective algorithms, saves the convergence history of the optimization process during optimization, and generates the Pereto front after optimization is completed;
[0115] The sensitivity analysis module performs sensitivity analysis on the optimized function, sorts the optimization variables by sensitivity, and marks the optimization variables with low sensitivity according to the number of user inputs. These variables can be skipped in subsequent optimization processes, thereby reducing optimization time. The sensitivity analysis results are fed back to the reaction mechanism construction module.
[0116] Post-processing module: Presents the results of multi-objective optimization, including (1) convergence curves applicable to general multi-objective problems and Pereto front visualization based on parallel coordinate method, (2) ignition delay time verification and one-dimensional laminar flame verification in the field of chemical reaction mechanism optimization.
[0117] Reaction Mechanism Saving Module: Provides the function of saving chemical reaction mechanism files, and outputs the reaction mechanism as a YAML file.
[0118] Furthermore, in the sensitivity analysis process of the system, data transmission such as Figure 2 As shown, the module's operation flow is as follows:
[0119] S11: The sensitivity analysis module provides a set of optimized variables for sensitivity analysis, which are then input into the reaction mechanism construction module;
[0120] S12: The reaction mechanism construction module provides a set of reaction mechanisms under this set of optimization variables. This set of reaction mechanisms is then input into the zero-dimensional isobaric autoignition simulation module.
[0121] S13: The zero-dimensional isobaric autoignition simulation module inputs the obtained calculation results into the objective function calculation module to calculate the objective function value under the given set of variable values, and the obtained objective function is input back into the sensitivity analysis module;
[0122] S14: Complete in the sensitivity analysis module: Evaluate sensitivity using the difference method and record the index of the optimization variable with sensitivity of 0. Then, take the root mean square of the sensitivity of all objectives and sort them. Mark the index of the optimization variable with lower sensitivity at the end of the sort according to the number of user inputs.
[0123] S15: Output sensitivity analysis results and return to S11. The sensitivity analysis results include: sensitivity, the index of the optimization variable with sensitivity of 0, and the index of the optimization variable with low sensitivity.
[0124] Furthermore, during the system optimization process, data transmission, such as... Figure 3 As shown, the module's operation flow is as follows:
[0125] S21: Input the results of the sensitivity analysis and remove the indexes of optimization variables with sensitivity of 0 and low sensitivity from the optimization variables;
[0126] S22: In the multi-objective optimization module, for optimization methods that require a reference direction, a reference direction is generated based on the population size input by the user.
[0127] S23: In the multi-objective optimization module, in one optimization iteration step, a set of optimization variables is generated. These variables are then processed by the reaction mechanism construction module, the zero-dimensional isobaric autoignition simulation module, and the objective function calculation module to calculate the objective function value under this set of optimization variables. The objective function value is then input back to the multi-objective optimization module. In this module, the optimization variables for the next optimization iteration step are generated using a multi-objective optimization algorithm (such as NSGA-III, CTAEA, etc.). The above process is repeated until the number of iteration steps reaches the specified number of iteration steps.
[0128] S24: The multi-objective optimization module outputs the convergence history (optimization variables and objective function in each optimization iteration step) to a file;
[0129] S25: The multi-objective optimization module saves the Pereto front generated by the optimization program, and saves the reaction mechanism in the Pereto front to a file through the reaction mechanism saving module.
[0130] Example 3
[0131] A 45-step combustion reaction mechanism was optimized under six operating conditions using different methods. These conditions included lean, rich, and equivalence combustion under both low and high pressure. For multi-objective optimization, NSGA-III and CTAEA algorithms were selected, and the Riesz s-Energy method was used to generate reference directions. After optimization, the optimal mechanism was selected for testing based on the principle of minimizing the geometric mean of the objectives. The objective function used for single-objective optimization was the 2-norm corresponding to the multi-objective method, i.e.:
[0132]
[0133] The single-objective optimization algorithm employs genetic algorithm and differential evolution algorithm. The results obtained using single-objective and multi-objective optimization are as follows: Figure 4 As shown, genetic algorithm and differential evolution are single-objective optimization algorithms, while NSGA-III and CTAEA are multi-objective optimization algorithms. The results show that the objective function values were similar in magnitude before optimization, but during optimization, the objective function for case 3 decreased relatively little, while other cases decreased by several orders of magnitude. Therefore, when using traditional single-objective methods, the components of other cases are overridden by case 3, making descent more difficult. The two multi-objective optimization algorithms do not have this problem.
[0134] By demonstrating the ignition delay time error F obtained from different optimization algorithms, 4,m This demonstrates the superiority of multi-objective algorithms, as follows: Figure 5-6 As shown, Figure 5 The figure shows the optimization results of ignition delay time error under low pressure. Figure 6 The figure shows the optimization results of ignition delay time error under high pressure. It can be seen from the figure that although the objective function in the single-objective optimization algorithm decreases under all operating conditions, the ignition delay time F... 4,m The term did not decrease. This indicates that in the problem of optimizing the reaction mechanism, since the multi-objective optimization algorithm introduces an objective function for each operating condition instead of simply combining them, it can be assumed that the objective function contains more information, and the direction of mechanism optimization is less likely to deviate, thus making the mechanism closer to the calculation results of the detailed mechanism.
[0135] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0136] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A chemical reaction mechanism optimization method based on a multi-objective optimization algorithm, characterized in that, Includes the following steps: Step 1: Based on the chemical reaction mechanism file to be optimized and the detailed reaction mechanism file, obtain the reaction mechanism to be optimized, the optimized operating conditions and important components, and perform zero-dimensional isobaric autoignition simulation on the detailed reaction mechanism file under the optimized operating conditions to obtain the detailed mechanism calculation results; Step 2: Obtain the reaction type of each elementary reaction according to the reaction mechanism to be optimized, determine the number of optimization variables required for the corresponding elementary reaction according to the reaction type, sum up the number of optimization variables of all elementary reactions to determine the total number of variables required for the reaction mechanism to be optimized, and number all optimization variables. Step 3: Based on the calculation results of the optimized working conditions, important components, and detailed mechanisms, establish the objective function based on the multi-objective optimization algorithm, and generate the calculation function of the objective function; Step 4: Zero-dimensional isobaric autoignition simulation is performed on the reaction mechanism to be optimized. Based on the simulation results, sensitivity analysis is conducted on the objective function through the calculation function. The sensitivity analysis results are obtained according to the optimization variable number. Step 5: Select optimization variables based on the sensitivity analysis results and the total number of variables, call the multi-objective optimization algorithm to optimize the objective function, obtain the convergence history and generate the Pereto front; Key components include reactants, products, and intermediates; the objective function established in step 3 based on a multi-objective optimization algorithm is expressed as: ; Where m is the operating condition number, , , and These represent the different errors between the calculated reaction mechanism and the detailed mechanism under each operating condition, specifically: The error in the reaction mechanism to be optimized, expressed as the error in reactants or products between the calculated results and the detailed mechanism, is given by the following formula: ; For the m-th operating condition, T represents the mole fraction of the i-th reactant or product at each moment in the calculation results; D represents the calculation results of the detailed mechanism. s T is the moment when the reaction begins. e The reaction termination time; Ii represents the set of reactant and product numbers; The error in the intermediate product represents the error between the calculated result of the reaction mechanism to be optimized and the result of the detailed mechanism calculation. The formula is: ; in For the m-th operating condition, the time when the j-th intermediate product reaches its peak value or the time when the generation / consumption rate reaches its peak value; I p This represents the set of intermediate product numbers; The error in temperature data, representing the difference between the calculated result of the reaction mechanism to be optimized and the result of the detailed mechanism calculation, is expressed by the following formula: ; in, Let be the temperature at each moment in the calculation results for the m-th operating condition; The error in the peak temperature rise rate, used to characterize the error between the reaction mechanism to be optimized and the detailed mechanism calculation results, is expressed by the following formula: ; in, This represents the moment when the rate of temperature change reaches its peak under the m-th operating condition. Step 4 includes the following specific steps: Step 41: Determine the variables for sensitivity analysis; Step 42: Substitute the sensitivity analysis variables into the reaction mechanism to be optimized, and perform zero-dimensional isobaric autoignition simulation to obtain the calculation results; Step 43: Input the calculation result into the calculation function to obtain the target function value; Step 44: Use the objective function value to evaluate the sensitivity using the difference method, and mark the index of the optimization variable with sensitivity of 0. Then, take the root mean square of the sensitivity of all optimization variables in the objective function and sort them. Mark the index of the optimization variable at the end of the sort as low sensitivity according to the number of user inputs. Step 45: Output the sensitivity analysis results. The sensitivity analysis results include: the sensitivity of all optimization variables, as well as the index of the optimization variable with sensitivity of 0 and the index of the optimization variable with low sensitivity.
2. The chemical reaction mechanism optimization method based on a multi-objective optimization algorithm according to claim 1, characterized in that, Step 5 includes the following specific steps: Step 51: Based on the sensitivity analysis results, screen the optimization variables and select the optimization variables to be optimized; Step 52: Construct a new reaction mechanism to be optimized based on the optimization variables to be optimized, and perform zero-dimensional isobaric autoignition simulation to obtain the optimization calculation results; Step 53: Input the optimization calculation results into the calculation function to obtain the optimization objective function value; Step 54: Use a multi-objective optimization algorithm to optimize the objective function value, obtain new optimization variables, and return to step 51 until the preset number of iterations is reached, obtain the convergence history and generate the Pereto front.
3. A chemical reaction mechanism optimization system based on a multi-objective optimization algorithm, characterized in that, The chemical reaction mechanism optimization method based on multi-objective optimization algorithm according to any one of claims 1-2 includes: a zero-dimensional isobaric auto-ignition simulation module, a sensitivity analysis module, an objective function calculation module, a reaction mechanism construction module, and a multi-objective optimization module; The reaction mechanism construction module receives sensitivity analysis results, the chemical reaction mechanism file to be optimized, and the reaction rate parameter offset vector, and constructs a new reaction mechanism to be optimized. The zero-dimensional isobaric auto-ignition simulation module receives the reaction mechanism and reaction conditions to be optimized, performs zero-dimensional isobaric auto-ignition simulation under the reaction conditions, and obtains the calculation results. The objective function calculation module receives the reaction rate parameter offset vector, generates the reaction mechanism to be optimized through the reaction mechanism construction module based on the reaction rate parameter offset vector, and converts it into the Cantera reaction mechanism. The zero-dimensional isobaric auto-ignition simulation module is then called to perform simulation calculations on the Cantera reaction mechanism to obtain the calculation results. Multi-objective optimization module: The objective function is optimized using a multi-objective optimization algorithm. During the optimization process, the convergence history of the optimization process is saved, and a Pereto front is generated after the optimization is completed. The sensitivity analysis module performs sensitivity analysis on the optimized objective function, obtains the sensitivity analysis results, and feeds them back to the reaction mechanism construction module.
4. The chemical reaction mechanism optimization system based on a multi-objective optimization algorithm according to claim 3, characterized in that, The module operation flow during the sensitivity analysis process is as follows: Step 11: The sensitivity analysis module outputs a set of optimized variables for sensitivity analysis and inputs them into the reaction mechanism construction module; Step 12: The reaction mechanism construction module determines a set of reaction mechanisms to be optimized under a set of optimization variables, and inputs this set of reaction mechanisms to be optimized into the zero-dimensional isobaric autoignition simulation module: Step 13: The zero-dimensional isobaric autoignition simulation module inputs the obtained calculation results into the objective function calculation module to calculate the objective function value under the given set of variable values, and the obtained objective function is fed back to the sensitivity analysis module; Step 14: In the sensitivity analysis module, the sensitivity is evaluated using the objective function value through the difference method, and the index of the optimized variable with sensitivity of 0 is marked. Then, the root mean square of the sensitivity of all objectives is taken and sorted. According to the number of user inputs, the index of the optimized variable corresponding to the end of the sort is marked as low sensitivity. Step 15: Output the sensitivity analysis results. The sensitivity analysis results include: the sensitivity of all optimization variables, as well as the index of the optimization variable with sensitivity of 0 and the index of the optimization variable with low sensitivity.
5. The chemical reaction mechanism optimization system based on a multi-objective optimization algorithm according to claim 3, characterized in that, The system also includes a post-processing module and a reaction mechanism preservation module; Post-processing module: Presents the results of multi-objective optimization; Reaction Mechanism Saving Module: Provides the function of saving reaction mechanisms, and outputs the reaction mechanism to be optimized as a YAML file.
6. The chemical reaction mechanism optimization system based on a multi-objective optimization algorithm according to claim 3, characterized in that, During the system optimization process, the module operation flow is as follows: Step 21: Input the results of the sensitivity analysis, remove the indexes of optimization variables with sensitivity of 0 and low sensitivity from the optimization variables, and generate the optimization variables to be optimized; Step 22: In the multi-objective optimization module, the objective function value corresponding to the optimization variable to be optimized generates a new set of optimization variables in one optimization iteration step. Specifically, the optimization variable to be optimized is processed by the reaction mechanism construction module, the zero-dimensional isobaric auto-ignition simulation module, and the objective function calculation module to calculate the objective function value under this set of optimization variables. The objective function value is fed back to the multi-objective optimization module, and the multi-objective optimization algorithm is used to generate the optimization variables for the next optimization iteration step. The objective function value is recalculated and fed back to the multi-objective optimization module until the number of iteration steps reaches the specified number of iteration steps. Step 23: The multi-objective optimization module outputs the convergence history to a file; Step 24: The multi-objective optimization module saves the Pereto front generated by the optimization program, and the reaction mechanism to be optimized in the Pereto front is saved to a file through the reaction mechanism saving module.
7. The chemical reaction mechanism optimization system based on a multi-objective optimization algorithm according to claim 3, characterized in that, The reaction mechanism construction module receives the chemical reaction mechanism file to be optimized and the reaction rate parameter offset vector. It extracts the reaction rate parameters from the chemical reaction mechanism file to be optimized, and multiplies the reaction rate parameters with the reaction rate parameter offset vector to obtain new reaction rate parameters. It constructs a YAML string based on the reactants, products and new reaction rate parameters in the chemical reaction mechanism file to be optimized, uses cantera.Reaction.fromYaml to construct the modified elementary reaction from the string, and uses cantera.Solution.modify_reaction to construct the modified mechanism based on the modified elementary reaction to obtain the reaction mechanism to be optimized.
8. The chemical reaction mechanism optimization system based on a multi-objective optimization algorithm according to claim 3, characterized in that, The objective function calculation module generates the reaction mechanism to be optimized based on the variable values through the reaction mechanism construction module, and transforms it into the Cantera reaction mechanism. The zero-dimensional isobaric autoignition simulation module is then called to simulate the Cantera reaction mechanism. Important components and temperatures are selected from the calculation results, and the error in the reactants or products in the objective function value is calculated using numerical integration methods. Errors in temperature data The derivatives of important components and temperature with respect to time are calculated using the second-order difference formula. The maximum value of the derivative is then calculated, thereby yielding the error of the intermediate product. Errors in temperature data .