Method for constructing a simulation model of a chemical reaction
By integrating a mass conservation layer into an artificial neural network, the method addresses the imprecision in chemical reaction simulations by ensuring accurate prediction of chemical compositions, enhancing simulation precision and robustness.
Patent Information
- Application Number
- FR2021004735
- Authority / Receiving Office
- FR · FR
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-05-05
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-05-05
AI Technical Summary
Existing data-based approaches for simulating chemical reactions fail to accurately predict chemical compositions due to the lack of consideration for mass conservation, leading to imprecise predictions in systems like combustion engines and fuel cells.
A method involving an artificial neural network with an additional mass conservation layer is used to construct a simulation model, ensuring precise prediction of chemical compositions by applying a linear correction to output data to enforce mass conservation.
The method ensures accurate and reliable prediction of chemical compositions during chemical reactions by maintaining mass conservation, improving simulation precision and robustness.
Smart Images

Figure 00000021_0000 
Figure 00000021_0001 
Figure 00000021_0002
Abstract
Description
Description Title of the invention: Method of constructing a simulation model of a chemical reaction Technical field The present invention relates to the field of chemical kinetics simulation, with the aim of predicting a mixture of chemical species at the output of a reactive system. Predicting the behavior of chemical reactive systems is important for the design of many industrial systems, such as processes or energy conversion systems in chemically powered transportation, as well as in the transport issues of these chemical compounds. In these systems, a fluid containing a mixture of chemical species undergoes various transformations, called chemical reactions. For example, this may involve predicting the composition of chemical species within a combustion process, particularly in a combustion engine, chemical reactions within an electric battery, within a fuel cell, within a reactive flow, within a catalysis process, etc. This modeling consists of predicting the evolution of chemical reactants (chemical species) in a reactive system between an input and an output. In this patent application, the notion of input and output can correspond to one of the following definitions: input and output can correspond to a physical input and output of a system (before and after a chemical reaction), as well as to the evolution of the system between two time steps during a numerical simulation (before or after a time step of a chemical reaction). Prior art To simulate chemical reactions, so-called "data-based" approaches can be used. Such approaches make it possible to predict the behavior of the chemical reaction in the reacting system from data from simulations or previous experiments, and by means of machine learning algorithms. Generally, these approaches, not directly related to physics, do not allow taking into account all the physical phenomena involved in chemical reactions, in particular the conservation of the mass of each atom present in the mixture of chemical species. Consequently, such approaches remain imprecise. To take into account the conservation of mass, some approaches have provided an additional step in which the conservation of mass is verified. However, this additional step is performed outside the model, which limits the optimization of the prediction. Patent application WO2020176914 describes a prediction of gas concentrations based on neural networks. The method is applied to the aftertreatment of engine exhaust gases. The direct calculation of chemical kinetics is expensive, hence the use of neural networks. However, for this method, the conservation of mass is not taken into account by neural networks, which does not allow for accurate prediction of exhaust gas concentrations. Patent application CN109918702 envisages the prediction of chemical states by neural networks, taking into account the conservation of the mass of atoms by means of a constraint. However, this constraint is not included in the neural network. The paper: "Hendricks et al, LINFARLY CONSTRAINED NEURAL NETWORKS, arXiv:2002.01600, 2020" concerns the field of fluid mechanics. In this paper, an artificial neural network is proposed to guarantee zero divergence of a velocity field in the case of an incompressible fluid. This paper does not allow for the consideration of mass conservation for a chemical reaction. The paper "Mohan et al., EMBEDDING HARD PHYSICAL CONSTRAINTS IN NEURAL NETWORK COARSE-GRAINING OF 3D TURBULENCE, arXiv:2002.00021, 2020" also concerns the field of fluid mechanics. In this paper, an artificial neural network is also proposed to guarantee zero divergence of a velocity field in the case of an incompressible fluid. This paper does not allow for the consideration of mass conservation for a chemical reaction. Summary of the invention The aim of the invention is to construct a simulation model of at least one chemical reaction that can accurately and reliably predict the chemical compositions during the at least one chemical reaction. For this purpose, the present invention relates to a method for constructing a simulation model of at least one chemical reaction, which constructs an intermediate model using an artificial neural network and a learning base, and then constructs the simulation model by adding an additional mass conservation layer to the artificial neural network. Furthermore, the invention relates to a method for simulating a chemical reaction, implementing the constructed simulation model. The invention relates to a method for constructing a simulation model of at least one chemical reaction between several chemical species within a reactive system, by means of a learning base, said learning base comprising learning input data and learning output data of said chemical reaction, said learning input and learning output data being representative of the mass fractions of said chemical species respectively at the input and output of said chemical reaction. For this method, the following steps are implemented: a We build an intermediate model of said simulation model at using an artificial neural network, which has a layer input, at least one hidden layer and one output layer, the construction said intermediate model being implemented by means of said base learning; and b. Said simulation model is constructed using said model intermediate and an additional layer implemented after said layer output of said neural network, said additional layer being formed by a linear operator that applies a linear correction to the data output of said output layer of said artificial neural network for ensure the conservation of the mass of the chemical elements forming said chemical species used in said chemical reaction. According to one embodiment, said additional layer is constructed by means of a step of calculating linear correction and a step of applying said calculated linear correction. Advantageously, the linear correction is calculated for a number of chemical species of said chemical reaction corresponding to the number of chemical elements of said chemical reaction. According to one implementation, synaptic weights of the artificial neural network are optimized after adding the additional layer using the input and output data of the training base. According to one aspect, said input and output data are determined respectively before and after said chemical reaction, or respectively before and after a time step of said chemical reaction. According to one embodiment option, said input data are mass fractions of said chemical species. According to one feature, said output data are mass fractions of said chemical species or variations in the mass fractions of said chemical species. Furthermore, the invention relates to a method for simulating at least one chemical reaction between several chemical species within a reactive system. For this method, the following steps are implemented: a A simulation model is constructed using the construction method of a simulation model according to one of the preceding characteristics; and b. The said simulation model is applied to input data of simulation, said simulation input data being representative of said mass fractions of said chemical species at the input of said chemical reaction. According to one embodiment, said simulation model is constructed for a time step, and the step of applying said simulation model is repeated for a plurality of successive time steps, and at each reiteration, said simulation input data are the output data of the previous time step. According to one implementation, said chemical reaction is a chemical reaction within an energy conversion system, for example a combustion within an engine or a chemical reaction within an electric battery, or a chemical reaction within a fuel cell, or a chemical reaction within a system for transporting said chemical species. Other characteristics and advantages of the method according to the invention will appear on reading the following description of non-limiting examples of embodiments, with reference to the figures appended and described below. List of figures [Fig.1] [Fig.1] illustrates the steps of the method for constructing a simulation model of a chemical reaction according to a first embodiment of the invention. [Fig.2] [Fig.2] illustrates the steps of the method for constructing a simulation model of a chemical reaction according to a second embodiment of the invention. [Fig.3] [Fig. 3] illustrates the steps of the method for simulating a chemical reaction according to a first embodiment of the invention. [Fig.4] [Fig.4] illustrates the steps of the method for simulating a chemical reaction according to a second embodiment of the invention. [Fig.5] [Fig.5] illustrates the steps of the method for simulating a chemical reaction according to a third embodiment of the invention. [Fig.6] [Fig.6] illustrates a simulation model of a chemical reaction according to one embodiment of the invention. [Fig.7] [Fig.7] illustrates a simulation model of a chemical reaction according to one embodiment of the invention. [Fig.8] [Fig.8] illustrates the curves of the mass fractions of four chemical elements as a function of time for a simulation using a method according to the prior art. [Fig.9] [Fig.9] illustrates the curves of the mass fractions of four chemical elements as a function of time for a simulation using a method according to one embodiment of the invention. Description of the embodiments The present invention relates to a method for constructing a simulation model of at least one chemical reaction between several chemical species within a reactive system. In other words, the present invention relates to the prediction of chemical kinetics; that is to say, the prediction of chemical species during a chemical reaction, or at a given instant of the chemical reaction. For illustrative purposes only, the various terms will be illustrated in the case of methane combustion within a combustion chamber. However, the method according to the invention can be applied to other chemical reactions. The various possible applications of the method according to the invention are described at the end of this application. A chemical reaction is the exchange of matter between various chemical species in a reactive system. Generally, a chemical reaction can be written in the form of a balanced equation. For the example of methane combustion (without taking into account the presence of nitrogen in the air), the chemical reaction can be written: CH,+20,> CO,+2H,0. The reacting system is the system in which the chemical reaction occurs. For the example of methane combustion, the reacting system is the combustion chamber. The molecules involved in the chemical reaction are called chemical species. For the example of methane combustion, the chemical species are methane CH, oxygen O, carbon dioxide CO, and water H,0. In addition, the atoms involved in the chemical reaction are called chemical elements. For the example of methane combustion, the chemical elements are carbon C, hydrogen H, and oxygen O. The present invention implements a learning base. The learning base comprises input data representative of the mass fractions of the chemical species entering the reactive system. The learning base further comprises output data representative of the mass fractions of the chemical species leaving the reactive system. The mass fraction of a chemical species is defined by the ratio of the mass of the chemical species to the total mass of the mixture in the reactive system. The notion of input and output can correspond to one of the following definitions: this notion of input and output can correspond to a physical input and output of a system (before and after a chemical reaction), or to the evolution of the system between two time steps during a numerical simulation (before or after a time step of a chemical reaction). Advantageously, the input data of the learning base can correspond to the mass fractions of the chemical species. According to one embodiment, the output data of the learning base may correspond to the mass fractions of the chemical species. Alternatively, the output data of the learning base may correspond to the variations in mass fractions of the chemical species, these variations being those made during the chemical reaction. The input and output data of the learning base may come from experimentally measured data and / or data from simulation. According to an implementation of the invention, the method may comprise a prior step of constructing the learning base, from the experimentally measured data and / or data from simulation. According to the invention, the method for constructing a simulation model comprises the following steps: 1. Construction of an intermediate model (artificial neural network) 2. Construction of the simulation model These steps can be implemented by computer means, including a computer or a server. These steps will be detailed in the following description. [Fig.1] illustrates, schematically and in a non-limiting manner, the steps of the method according to a first embodiment of the invention. From a BAP learning base, an intermediate model is trained using an ANN artificial neural network and an OPT optimization (learning) of the ANN artificial neural network. This optimization step makes it possible to determine the synaptic weights of the ANN artificial neural network based on the data from the BAP learning base. Then, the MSI simulation model is constructed, using the optimized (learned) RNA artificial neuron model and an additional layer, called the RNC conservation additional layer. According to one embodiment, the synaptic weights of the artificial neural network can be optimized after adding the additional conservation layer using the data from the training base. In other words, the training is applied to the entire model formed from the artificial neural network and the additional conservation layer. Thus, the simulation model can be optimized by taking into account data from the training base. [Fig.2] illustrates, schematically and in a non-limiting manner, the steps of the method of this embodiment. An artificial neural network ANN, and the additional conservation layer RNC, are constructed. Then, from a learning base BAP, the artificial neural network ANN is optimized OPT (learning) simultaneously with the additional conservation layer RNC so as to construct the simulation model MSI. Thus, during this optimization step, an update of the synaptic weights of the artificial neural network with the additional conservation layer RNC is implemented from the learning database BAP. Furthermore, the invention relates to a method for numerical simulation of at least one chemical reaction between several chemical species within a reactive system. Such a numerical simulation method corresponds to a method for predicting the chemical species during a chemical reaction within a reactive system. The simulation method implements the method of constructing the model according to any one of the variants or combinations of variants described in the present application, and a step of applying the simulation model to simulation input data. The numerical simulation then generates simulation output data. The simulation input data and simulation output data are of the same nature as the input and output data of the training base. In other words, the simulation input and output data are representative of the mass fractions of the chemical species respectively at the input and output of the simulated reactive system. The notion of simulation input and output can correspond to one of the following definitions: on the one hand to a physical input and output of a system (before and after a chemical reaction), on the other hand to the evolution of the system between two time steps during a numerical simulation (before or after a time step of a chemical reaction). Advantageously, the simulation input data can correspond to the mass fractions of the chemical species. According to one embodiment, the simulation output data may correspond to the mass fractions of the chemical species. Alternatively, the simulation output data may correspond to variations in mass fractions of chemical species. Simulation input data can be obtained experimentally, or can be obtained by simulation. Thus, the simulation process includes the following steps: 1. Construction of an intermediate model (artificial neural network) 2. Construction of the simulation model 3. Application of the simulation model These steps may be implemented by computer means, including a computer or a server. Preferably, steps 1 and 2 may be implemented only once beforehand, and step 3 may be repeated with the simulation model. These steps are detailed in the remainder of the description. [Fig. 3] illustrates, schematically and in a non-limiting manner, the steps of the numerical simulation method according to a first embodiment of the invention. From a BAP learning base, an intermediate model is trained using an ANN artificial neural network and an OPT optimization of the ANN artificial neural network. This optimization step makes it possible to determine the synaptic weights of the ANN artificial neural network according to the data of the BAP learning base. Then the MSI simulation model is constructed, using the optimized ANN artificial neural model and an additional RNC conservation layer. Then, the MSI simulation model is applied SIM to DES simulation input data to determine DSS simulation output data. [Fig.4] illustrates, schematically and in a non-limiting manner, the steps of the numerical simulation method according to a second embodiment of the invention. This second embodiment of the numerical simulation method implements the second embodiment of the method for constructing the simulation model of [Fig.2]. An artificial neural network ANN, and the additional conservation layer RNC, are constructed. Then, from a BAP learning base, the artificial neural network ANN is optimized OPT simultaneously with the additional conservation layer RNC so as to construct the MSL simulation model. Thus, during this optimization step, an update of the synaptic weights of the artificial neural network with the additional conservation layer RNC is implemented from the BAP learning database.Then, SIM is applied to the MSI simulation model, DES simulation input data to determine DSS simulation output data. According to an implementation of the invention, for which a simulation is carried out for a plurality of successive time steps (i.e. for several intermediate stages of the chemical reactions), the step of applying the simulation model can be repeated several times, and, at each reiteration, the simulation input data can be the simulation output data of the previous time step. Thus, a chemical reaction can be simulated step by step, in a precise and robust manner. [Fig.5] illustrates, schematically and in a non-limiting manner, the steps of the numerical simulation method according to a third embodiment of the invention. This third embodiment of the numerical simulation method implements the second embodiment of the method for constructing the simulation model of [Fig.2]. An artificial neural network ANN and the additional conservation layer RNC are constructed. Then, from a BAP learning base, the artificial neural network ANN is optimized OPT simultaneously with the additional conservation layer RNC so as to construct the simulation model MSI. Thus, during this optimization step, an update of the synaptic weights of the artificial neural network with the additional conservation layer RNC is implemented from the BAP learning database.Next, we apply SIM, the MSI simulation model, to DES simulation input data to determine DSS simulation output data. Then, we repeat the simulation step for new simulation input data, which correspond to the simulation output data of the previous time step. 1. Construction of the intermediate model. In this step, an intermediate model is constructed using an artificial neural network. The model is called intermediate because it is not the simulation model obtained by the process: this intermediate model is modified in step 2. The artificial neural network makes it possible to obtain a model that allows rapid evaluation of the output data, and with limited computer memory requirements, in particular faster than a complex numerical model representative of the chemical reaction. In addition, the artificial neural network is suitable for complex chemical reactions, particularly those involving a large number of chemical species. Indeed, simulations of these complex systems can require significant computing resources, particularly in terms of memory, and long simulation times.An artificial neural network is an algorithm whose parameters are optimized using a so-called training database from the learning base, which contains the learning input / output pairs. Once this network is trained on . data, it can then be used to make inferences on never-before-seen inputs. The artificial neural network comprises an input layer, at least one hidden layer, and an output layer. The input layer and the output layer comprise a number of neurons that correspond to the number of chemical species in the chemical reaction. The construction of the artificial neural network is implemented using the learning base. In other words, the synaptic weights of the neural network are learned in a supervised manner to correspond to the input and output data of the learning base. Thus formed, the intermediate model makes it possible to determine output data from input data, by being representative of the data in the learning base. The inputs of the intermediate model are of the same nature as the input data of the learning base, and the outputs of the intermediate model are of the same nature as the output data of the learning base. The artificial neural network can be of any form, for example a deep neural network, a recurrent neural network, a multi-layer Perceptron neural network, etc. The construction of the intermediate model may include a validation step for the artificial neural network, in particular to avoid overfitting problems. Validation can be implemented using part of the data from the training base. 2. Construction of the simulation model In this step, the simulation model is built using the intermediate model built in step 1 and an additional layer, called the additional conservation layer. The additional conservation layer is added after the output layer of the artificial neural network. The additional conservation layer is formed by a linear operator for the conservation of the mass of the chemical elements present in the chemical reaction. In other words, the simulation model includes the input layer, the at least one hidden layer and the output layer of the artificial neural network, the additional conservation layer. Thus, the additional conservation layer makes it possible to verify the conservation of the mass of the chemical elements within the simulation model itself, which makes the simulation model more accurate.In addition, the linearity of the additional conservation layer allows to preserve the advantages of the artificial neural network: simulation of complex systems with limited computer memory and limited calculation time. The additional conservation layer includes a number of inputs and a number of outputs that correspond to the number of chemical species in the reaction chemical. At the output of the additional conservation layer, and consequently at the output of the simulation model, data representative of the mass fractions of the chemical species of the chemical reaction are determined. Once determined, the additional conservation layer is static and constant. In other words, the additional conservation layer is not modified. According to one aspect of the invention, the additional conservation layer can be constructed by means of a step of calculating the linear correction and a step of applying the calculated linear correction. For this embodiment, in the case where the number of chemical species is greater than the number of chemical elements, the correction step can be applied for a number of chemical species that corresponds to the number of chemical elements. Preferably, the chosen chemical species can contain at least once each atom present in the mixture. Thus, underdetermination of the problem can be avoided. According to an embodiment for which the input data and the output data are normalized, these two steps (correction and application of the correction) may be preceded by a step of reversing the normalization, and may be followed by a normalization step. These two steps (correction and application of the correction) are detailed in the following description. In the following description, we consider a mixture of chemical species numbered L …, NS, and described by the mass fraction Y; of each of these species. The mass fraction is defined by Y, = nm, / m where ” is the mass of the species Æ in the mixture and ”* the total mass of the mixture. We consider that the chemical species react with each other, excluding nuclear reactions. Consequently, the mass of each atom composing the molecules of the mixture is conserved between the input state and the output state. For the following description, an input chemical state is noted i and the corresponding output Of. The corresponding mass fractions are respectively noted Y}" and yes The passage between the input and the output involves a certain number of chemical reactions between these species. We denote by j any atom (a chemical element) present in the mixture (for example: ÿ= 0, H, C, N in the case of a system involving combustion reactions). We assume that there are Na distinct atoms in the mixture. The fraction Y; corresponds to the mass of atom j relative to the total mass of the mixture. This mass fraction can be written from the mass fractions of species in the following way: NM; - Y; = The RiY, Where M corresponds to the molar mass of the chemical species Ÿ, nZ is the number of atoms j present in the molecule of the chemical species and M; corresponds to the molar mass of atom j. This relationship can be written in a matrix form by setting Y,e P“ the vector containing the mass fractions of atoms and Y,e ps the vector of the mass fractions of the chemical species. We can then write: Y,= MY, mini = jR jKk, m; 1 that y such x) *M=(m; es Ave The conservation of the mass of the atoms between the input and the output gives the following property, which can be written for any atom j present in the mixture: qi y} =r; Either in matrix version: Mr? = in Myo We denote by g the output vector of the artificial neural network. This embodiment consists of correcting the vector # in order to satisfy the previous relation. The correction can be written by adding an a priori term to be determined, denoted *: Yo = g+a Ave ae pv a vector to correct the vector #. The previous equation becomes: Ma=M(r""- 2) This equation is a linear system with unknowns at, k € { LN,}. Since M € PY*Y,, this system contains N, unknowns and Na equations. Typically, the number of atoms is much smaller than the number of species (N4 < N,), and the system is therefore underdetermined. In order to remove the underdetermination, a set of N'y chemical species among the N, present in the mixture can be extracted. It is preferable that these species contain at least once each atom present in the mixture. We denote 1, In, the indices of these species. We assume that x, #0 Ÿ k€ {1, … ln,} and & =0 otherwise (in other words, for this implementation, a correction can be made for the selected chemical species, and no correction is made for the other species of the chemical reaction). A new correction vector can be defined as follows: @, ge \ y) The system of equations then becomes: M3as3 = M(Y”"- g) Where M corresponds to the submatrix of M containing only the columns corresponding to the species / , … In, We then have M°e PY*". Moreover, if each atom is represented in the selected species, it is possible to show that the system is invertible. The solution is then noted: a'=M'(M(-2)) Thus, by this calculation, the correction is determined. Then, by applying this correction to the selected species, the exact conservation of atoms is guaranteed. This application of the correction can be written for each chemical species k: Y*=g+a According to one implementation of the invention (corresponding to [Fig. 2]), a modification of the neural network, in this case a modification of the synaptic weights, can be carried out after the application of the correction. Thus, this correction being applied inside the neural network, the parameters of the at least one upstream hidden layer can be adjusted so that the output is well predicted, despite the fact that an arbitrarily chosen set of species is selected to correct the mass of the atoms. Figure 6 illustrates, schematically and in a non-limiting manner, the construction of the simulation model according to one embodiment of the invention. First, the artificial neural network RNA is constructed. The artificial neural network RNA comprises an input layer CE, for which the mass fractions of the chemical species y5, Me y, constitute the input data. The artificial neural network RNA comprises at least one hidden layer CC. The artificial neural network RNA further comprises an output layer CS, for which mass fractions of the chemical species g:, …, gnscConstitute the output data. The layers of the artificial neural network RNA comprise a plurality of artificial neurons NA, represented by circles. Each artificial neuron NA is associated with a synaptic weight.In addition, the RNC simulation model further comprises an additional conservation layer Ac which determines the linear correction of the output data g,,.…,gs, of the artificial neural network ANN to determine the mass fractions of the chemical species y}, …, V4 at the output, while ensuring the conservation of the mass of the chemical elements. For the embodiment of Figure 6, for which the output data Yo, …, re are mass fractions, the additional conservation layer Ac takes into account the input data y”, y®. . Figure 7 is a figure similar to Figure 6, in the case where the output data are variations of the mass fraction of chemical species “» ---s vs with = y, pis, The elements identical to Figure 6 are not detailed again. For this embodiment, the additional preservation layer A. does not need to take into account the input data y”. y'. 3. Application of the simulation model This step only concerns the numerical simulation process of at least one chemical reaction. In this step, the simulation model constructed in step 2 is applied to simulation input data. In other words, the chemical kinetics of the chemical reaction are simulated from simulation input data and the simulation model. This can be a simulation for the entire chemical reaction or for a time step of the chemical reaction. According to an implementation of the invention, for which a simulation is carried out for a plurality of successive time steps (i.e. for several intermediate stages of the chemical reaction), the step of applying the simulation model can be repeated several times, and, at each reiteration, the simulation input data can be the simulation output data of the previous time step. Thus, a chemical reaction can be simulated step by step, in a precise and robust manner. This implementation corresponds to that illustrated in [Fig.5]. The chemical reaction can be a chemical reaction from the field of reactive fluid mechanics. In this case, the chemical species can be liquids or gases. According to a first example of implementation, the invention may relate to a chemical reaction of combustion, in particular within a combustion engine, a turbine, or any similar system. Indeed, the methods according to the invention can make it possible to model complex systems with numerous chemical species. According to a second exemplary implementation, the invention may relate to a chemical reaction within an energy storage and supply system, in particular within an electric battery or a fuel cell. Indeed, the methods according to the invention can make it possible to model complex systems with numerous chemical species. According to a third example of implementation, the invention may relate to a chemical catalysis reaction, in particular catalysis within an exhaust gas post-treatment system, or catalysis implemented in the field of hydrocarbon production. Indeed, the methods according to the invention can make it possible to model complex systems with numerous chemical species. According to a fourth example, the invention may relate to a chemical reaction specific to fluid flows in a porous medium, in particular a precipitation reaction. or dissolution of one or more minerals. Indeed, the methods according to the invention can make it possible to model complex systems with numerous chemical species. Furthermore, the invention relates to a numerical chemical reaction simulator implementing the simulation model constructed by the method according to one of the variants or combinations of variants of the method according to the invention. The numerical simulator implements simulation input data to determine simulation output data. The simulation input data and the simulation output data are representative of the mass fractions of the chemical species of the chemical reaction. Furthermore, the invention relates to a method for designing a reactive system, in which at least one chemical reaction takes place, in which the following steps are implemented: The chemical reaction in the reactive system is numerically simulated at means of the simulation method according to any of the variants or combinations of variants previously described, and We design the reactive system, and we implement the chemical reaction in the reactive system. For this design process, a plurality of numerical simulations can be carried out, for a plurality of chemical reactions (for example by modifying the chemical species initially present) and / or for a plurality of reactive systems (for example for several dimensions or shapes of reactive systems). Comparison of the simulations makes it possible to determine the chemical reaction and / or the reactive system to be designed. The present invention may also relate to a method for controlling a reactive system, in which at least one chemical reaction takes place, and in which the following steps are implemented: The chemical reaction in the reactive system is numerically simulated at means of the simulation method according to any of the variants or combinations of variants previously described, and The reactive system is controlled, preferably in real time, based on the simulated chemical reaction, in particular to avoid dangerous situations, or not suitable for the desired use. Preferably, for the control of the reactive system, data can be measured in real time, which serves as input data for the simulation. For the example of combustion, the control may consist of controlling the amount of air or fuel in the combustion chamber. The purpose of this control which may be the limitation of polluting emissions, or the avoidance of the knocking phenomenon, etc. For the example of an electric battery, the control can correspond to the control of the voltage or the current, in particular to limit overheating or premature aging of the electric battery. For the example of a fuel cell, the control can in particular correspond to the control of the air intake, to optimize the chemical kinetics within the fuel cell, so as to increase its performance. Comparative example The characteristics and advantages of the method according to the invention will appear more clearly on reading the comparative example below. To illustrate the invention, an example is given in this section. Here we consider the use of neural networks in the context of numerical simulation of combustion. The idea is to replace an exact resolution algorithm with an equivalent neural network. In particular, the neural network takes as input mass fractions at a time ' of the simulation (state ## in the description of the method above) and evaluates the mass fractions at a time # + dé (state OU). This is done iteratively for é4 = kdt, € fo, Nip} where Va is the total number of iterations of the simulation. The case considered here is a case of combustion of methane at constant pressure, where the atoms generally present are carbon (C), hydrogen (H), oxygen (O) and nitrogen (N). For this comparative example, a method according to the prior art implementing an artificial neural network (without an additional conservation layer) is compared with a method according to the invention implementing an artificial neural network with an additional conservation layer. For both simulations, the learning base is the same, and the number of layers and the number of neurons in the artificial neural network are the same. More particularly, the selected neural network is a multi-layer perceptron type network (from the English "Multi-Layer Perceptron") which comprises two hidden layers with 64 units each. The database consists of simulations of the combustion of H » air mixtures for different initial temperatures Ty and richness %. One thousand simulations are selected from the learning base, using a Latin hypercube sampling algorithm (from the English "Latin Hypercube Sampling").This sampling is carried out for Ty values between 1600 K (approximately 1326 °C) and 1800 K (approximately 1526 °C), and richness values between 0.7 and 1.5. The optimization of the network weights is carried out using a gradient descent method. [Fig.8] illustrates the curves of the prior art method, as a function of time t in ms, of the normalized mass fraction of carbon Yç (top left), of the normalized mass fraction of hydrogen Yy (top right), of the normalized mass fraction of oxygen Yo (bottom left), and of the normalized mass fraction of nitrogen Yx (bottom right). It can be noted for these figures that the curves of the mass fraction of carbon and hydrogen are not constant over time. Consequently, the artificial neural network according to the prior art cannot guarantee the conservation of the mass of carbon atoms and hydrogen atoms, while the conservation of the masses of atoms during the simulation is a critical point. Indeed, a deviation of the mass at a given moment can have negative repercussions on the rest of the simulation, and make the simulation inaccurate. Figure 9 illustrates the curves of the method according to the invention (with the additional conservation layer), as a function of time t in ms, of the normalized mass fraction of carbon Yc (top left), of the normalized mass fraction of hydrogen Yy (top right), of the normalized mass fraction of oxygen Yo (bottom left), and of the normalized mass fraction of nitrogen Yx (bottom right). It can be seen that the four curves are constant over time. Consequently, the use of the layer A according to the invention allows the conservation of the mass of the atoms, and consequently better precision and robustness of the simulation model.
Claims
Claims
1. Method for designing or controlling a reactive system in which a chemical reaction takes place, in which the following steps are carried out: - the chemical reaction in the reactive system is numerically simulated by means of a method for simulating a chemical reaction between several chemical species within a reactive system, by means of a learning base (BAP), said learning base (BAP) comprising learning input data and learning output data of said chemical reaction, said learning input and learning output data being representative of the mass fractions of said chemical species respectively at the input and output of said chemical reaction, and said input and output data of the learning base being derived from experimentally measured data and / or data from simulation, said simulation method implementing the following steps by computer means: a We build a simulation model (MSI) of the said one r chemical reaction between several chemical species within of a reactive system by means of the following steps: I We construct an intermediate model of the said model € simulation using a neural network artificial intelligence (RNA), which has an input layer e (CE), at least one hidden layer (CC) and one c output channel (CS), the construction of said model intermediate being implemented by means of the ite learning base (B AP); and he, We build the said simulation model (MSI) at means of said intermediate model and a layer additional (RNC) implemented after said co output channel of said neural network, said channel additional che (RNC) being formed by an opera linear converter that applies a linear correction to the x output data of said output layer (CS) said artificial neural network (RNC) for ass to assert the conservation of mass of chemical elements iques forming the said chemical species put into works in said chemical reaction; b. The said simulation model (SIM) is applied to data simulation input data (DES), said input data d e simulation being representative of said mass fractions of said chemical species at the input of said reaction chemical, - we design the reactive system and implement the reaction chemical in the reactive system, or we control the reactive system, depending on the simulated chemical reaction.
2. The method of claim 1, wherein in the method of simulation, we construct said additional layer (RNC) using of a linear correction calculation step and an application step of said calculated linear correction.
3. The method of claim 2, wherein in the method simulation, we calculate the linear correction for a number of chemical species of said chemical reaction corresponding to the number of chemical elements of said chemical reaction.
4. Method according to one of the preceding claims, in which, in the simulation process, we optimize (OPT) weights synaptic of the artificial neural network after the addition of the additional layer using the input and output data of the learning base.
5. A method according to any preceding claim, wherein, in the simulation process, said input and output data are determined respectively before and after said chemical reaction, or respectively before and after a time step of said reaction chemical.
6. Method according to one of the preceding claims, in which, in the simulation process said input data are mass fractions of said chemical species.
7. A method according to any preceding claim, wherein, in the simulation process, said output data are fractions masses of said chemical species or variations of the fractions mass of said chemical species.
8. Method according to one of the preceding claims, in which, in the simulation process, said simulation model (MSI) is built for a time step, and in which the step is repeated application of said simulation model (MSI) for a plurality of successive time steps, and at each reiteration, said data simulation input data (DES) are the simulation output data (DSS) of the previous time step.
9. Method according to one of the preceding claims, in which said chemical reaction is a chemical reaction within a energy conversion system, for example combustion within an engine or a chemical reaction within a electric battery, or a chemical reaction within a battery fuel, or a chemical reaction within a system of transport of said chemical species.
