Generative Adversarial Networks with Physical Evaluators for Spray Simulation of Pintle Injector

Due to the adjustable geometry, pintle injectors are specially suitable for the liquid rocket engines which require a widely throttleable range. While applying the conventional computational fluid dynamics approaches to simulate the complex spray phenomena in the whole range still remains to be a great challenge. In this paper, a novel deep learning approach used to simulate instantaneous spray fields under continuous operating conditions is explored. Based on one specific type of neural networks and the idea of physics constraint, a Generative Adversarial Networks with Physics Evaluators (GAN-PE) framework is proposed. The geometry design and mass flux information are embedded as the inputs. After the adversarial training between the generator and discriminator, the generated field solutions are fed into the two physics evaluators. In this framework, mass conversation evaluator is designed to improve the training robustness and convergence. And the spray angle evaluator, which is composed of a down-sampling CNN and theoretical model, guides the networks generating the spray solutions more according with the injection conditions. The characterization of the simulated spray, including the spray morphology, droplet distribution and spray angle, is well predicted. The work suggests a great potential of the prior physics knowledge employment in the simulation of instantaneous flow fields.


Introduction
Due to a wider throttling range and greater combustion stability, pintle injectors are specially suitable for the liquid rocket engines that require deep, fast, and safe throttling [1,2], such as the descent propulsion system in Apollo program [3] and the reusable Merlin engine of SpaceX [4].
In the practical throttleable engine applications, the pintle is movable to alter the injection area so that the mass flow rate of the injected propellants can be varied continuously according to the economical and safe thrust curve in a given situation [5]. However, in the previous spray simulations of pintle injectors, the changes were only considered under discrete condition combinations over a limited amount of select operating points [6,7,8]. For the traditional discrete methods they used, simulations have to be conducted repeatedly to varies the operating conditions and the computational cost becomes prohibitively expensive [9].
Innovations for the spray simulation of the pintle injector are needed to address this issue.
Contrarily, machine learning approach, especially the Neural Networks(NN), has demonstrated its efficiency to predict the flow fields under different conditions with a single surrogate model [10]. The previous researches on flow field prediction using NN are mainly focused on the data-driven method. Besides the indirect way using closure model [11,12], the field solution can also be directly obtained from the network model which is trained with a large number of samples [13,14,10,15]. However, some predictive results obtained by datadriven methods may still exhibit considerable errors against physics laws or operating conditions [13,16,17]. Besides, In some sparse data regime, some machine learning techniques are lacking robustness and fail to provide guarantees of convergence [18]. For the purpose of remedying the above mentioned shortcomings of data-driven methods, the physics-driven/informed methods are proposed recently [19]. By providing physics information, NN are able to directly obtain field solutions which obey physical laws and operating conditions. In these work, Partial Differential Equations (PDEs) was employed in the loss function to explicitly constrain the network training [20,21].
In the state-of-the-art neural networks methods, Generative Adversarial Networks (GANs) proposed by Goodfellow et al. [22], are efficient to generate the instantaneous flow fields [23,24]. In spite of the impressive performance for unsupervised learning tasks, the quality of generated solutions by GANs is still limited for some realistic tasks [25]. Besides, as shown in the training results later, the transient nature of the spray injection and liquid sheet break results in the extreme difficulty of usual networks to qualify the place and intensity of dominating characterizations.
In this paper, based on one specific type of GAN and the idea of physics constraint, a novel Generative Adversarial Networks with Physical Evaluators (GAN-PE) framework is proposed. By introduction of mass conversation and spray angle model as the two evaluators, this framework has a better training convergence and predictive accuracy. The trained model is able to simulate the macroscopic morphology and characterization of the instantaneous flow fields under different conditions. This paper is organized as follows. We firstly introduce the experimental settings and data set acquisition. Secondly, the architecture of GAN-PE and the detailed parts are described. Then, the learning results of numerical experiments are presented for validation. Finally, conclusion is drawn.

Data Set from Experiments
Our training data are extracted from the spray experimental results of the pintle injectors.

Experimental facilities
The non-reactive cold experiments were conducted at atmospheric pressure.
The dry air is used as the stimulant for axial flows and filtered water as the stimulant for radial flows. The schematic of experimental facilities are shown in Figure 1a. A back-lighting photography technique is used for instantaneous spray image visualization. The image acquisition system consists of an LED light source, a high-speed camera and a computer. The exposure time is 10 µs and frame rate is 50k fps.  The detailed gas-liquid pintle injector is featured in Figure 1b. In order to study the influence of the momentum ratio on the spray angle, the experimental device is designed to use the replaceable parts. In the experiment, the height of the radial liquid jet outlet and the thickness of the axial gas sheet are adjusted by changing the height of the sleeve and the axial gap distance, respectively.
When the liquid propellant is injected radially from the two sides of the pintle end through the manifold, the liquid columns is formed. These columns are broken by the axially gas propellant injection from the gap cling to the pintle.
Finally, due to an impingement and collision, the liquid columns break and form a plane conical spray like a hollow-cone atomizer. This design induces vigorous mixing of the gaseous and liquid propellants which yields a high combustion efficiency [26]

Data set acquisition
The spray experiments are carried out with the throttling level L t of 40% ∼ 80%. L t is varied by the linear adjustment of the height of radial liquid jet outlet and the thickness of axial gas sheet. The radial liquid jet outlet height at throttling levels of 40%, 60%, and 80% are 2mm, 3mm and 4mm, respectively.
When L t is fixed, the height of the radial liquid jet outlet is fixed and equal to the thickness of the axial gas sheet. Table 1 shows the operating conditions of the experimental campaign and the corresponding key specifications of the pintle injector. Table 1: Experimental operating conditions. Lopen and Tgs are injector opening distance and gas sheet thickness respectively. mg and m l are the mass flow rate of gaseous and liquid propellant respectively. C TMR is the momentum ratio of the two propellants. As shown in Figure 2, to measure the spray angle, the spray images obtained in the experiment are post-processed to clarify the spray boundary. The average of 10 images is used to measure the spray angle manually. Using this setup, the time-averaged images of sprays are obtained and the spray angles, defined as , are manually-measured. Then, the average images and the corresponding spray angles are used to train the spray angle estimator later.
The resolutions of the instantaneous spray image are 640 × 480. In order to reduce the training cost, the images are interpolated to the images with a resolution of 128 × 128. While the measured angle values, which represented the nature of the spray phenomenon, are fixed in spite of the image scaling.

Overview
Here, a Generative Adversarial Networks with physical evaluators (GAN-PE) framework is proposed. As shown in Figure 3, The GAN-PE is composed of 4 parts, Generator (G), Discriminator (D) and two physical evaluators. After the initial field solution is generated by G, there are three parts are employed to guarantee the output being an accurate field solution. GANs is the base of the proposed networks framework, the G captures the real spray data distribution which is corresponding to the operation conditions, and the D estimates the probability that a condition-sample pair came from the training data rather than G. There are also two evaluator designed to improve the performance of GANs.
The first Mass Conservation Evaluator (E MC ) is used to improve the generation robustness and training convergence. The second Spray Angle Evaluator (E SA ) is used to improve the predicting accuracy in the specific operating conditions. Fed with the outputs from G, the losses of D, E MC and E SA are calculated respectively. After that, the backpropagation is applied to adjust the U-net CNN of G to generate a new spray field that more satisfies the conditions and prier physics knowledge. After enough iterations, the network will be able to generate 'correct' spray field.

Generator
From inputs towards outputs, the network of G consists of two parts: encoding and decoding [27] . In the encoding process, the operating conditions L open , T gs , m g and m l are resized as four matrices for progressively convolutional downsampling with corresponding kernels. By this way, the matrices with a size of 128 × 128 is reduced into one liner data pool consisting of 512 neurons. Then the decoding part works in an opposite way, which can be regarded as an inverse convolutional process mirroring the behavior of the encoding part. Along with the increase of spatial resolution, the spray fields are reconstructed basing on the data pool by up-sampling operations. In addition, there are the concatenation of the feature channels between encoding and decoding. More details of the U-net architecture and convolutional block, including active function, pooling and dropout, are referred to Ref. [21].
The weighted loss function considering the following discriminator and evaluators is written as where L D , L EMC and L ESA are the loss terms that calculated by D, E MC and E SA respectively. Also, α and β are the constant hyperparameters which are tuned to adapt the scales of these loss terms. After proper training, the generator is able to map a spray sample from a random uniform distribution to the desired distribution which obey the physical knowledge and conditions.

Discriminator
Then D is used to feed the possibility of that samples come from the training rather than generation distribution back to G. We use Least Squares Generative Adversarial Networks (LSGANs) settings to train the D and the G simultaneously [28]. This special type of GANs helps to remedy the gradients vanishing by using the least square loss function instead of the sigmoid cross entropy loss function [29].
Here, D is modified by the encoder of the G, which means the generations are dawn-sampling by the re-convolutional calculation so that the spray field information are concluded into the linear 1-D tensor. And then this 1-D data pool will be used to be trained to maximize the probability of assigning the correct label (real/fake) to both training targets and generating solutions. Similar with the work in Ref. [30], we use the input-output pair to feed D instead of only G's outputs in the random image generation tasks. The operating conditions and the outputs are concatenated as the different feature channels in a unique 4-D data tensor. By this way, the D helps to judge whether the outputs accord with the corresponding conditions, not only having right spray morphology.
The loss functions for LSGANs are defined as where x is the training data and z is the input variables. Also, a and b are the labels for fake data and real data respectively, and c denotes the possibility that G wants D to believe for fake data. Here, we apply a = 0 and b = c = 1. So, L D is equal to the second part of Equation (2).

Mass conservation evaluator
As shown in Figure 4, we assume that there are a few rings with different diameters that are tangent at the middle point of the upper boundary in both generating images and the average images. Following the definition of "L1loss" which is widely used in machine learning community, we define a mass conservation loss here. The difference is that the former measures the sum of absolute error between each element in the generation and target [31], but ours is calculating firstly a gray value summation of every element in one concerning ring and then the summation of absolute error between the corresponding rings in the generation and target. The idea is from that the spray phenomenon obeys mass conservation law, i.e. the mass fluxes of droplets through one specific ring in every instantaneous frame are equivalent. Here, the "mass flux" is a broader concept which also involves the background shadow. The mass conservation error, i.e. the loss term from E MC , is defined as where x and y are the gray values in generated images and average targets respectively. Also, m is the amount of the concerning rings and n is the amount of data points in one concerning rings in the matrix. E is the error between the output and average matrix and defined as where N is the amount of all the data points in the matrix. To improve the generation randomness and in view of the error caused by light transmission and reflection, loss threshold E thr is introduced herein. Once the loss is less than the threshold, this loss term will be ignored.

Spray angle evaluator
This evaluator is composed of two parts, one is the theoretical model of spray angle, the another is a CNN encoder to estimate the spray angles from the generated field solutions. The axial momentum equation can be written as follows: so that integration of the axial momentum equation with respect to time is with u l = du dt , a second integration with respect to time is For the collision between the gas sheet and the rectangular liquid jet, the momentum ratio is Equation 7 could then be expressed in terms of the momentum ratio C TMR as follows where the slope of the liquid jet θ at the thickness of the gas sheet could be written as The theoretical model assumes that the liquid jet does not deform, but in reality it will deform under aerodynamic forces, which results in a reduction of the effective momentum of the liquid jet. Therefore, the liquid jet deformation factor γ, which is obtained through the experimental results, is introduced to modify the spray angle theoretical model. The Eq(10) is rewritten as In the field of medical image analysis, the machine learning approach, especially the deep neural networks, has been employed for automated scoliosis assessment [32]. In these work, the X-ray images are fed into the neural networks estimator and the spinal Cobb angles are obtained [33,34]. Similarly, inside the E SA , there is a well-trained spray angle estimator to output the angle values from the predictive images. The architecture of this CNN encoder is like the D, except added one liner layer in the end to output the estimated spray angle θ .
The loss term from E SA is calculated as 4. Results  performs very well in some steady or mean state field prediction tasks, such as the work in Ref. [17,21]. However, when the training cases have a multimodal distribution, this loss will fail down. In our spray field prediction task, although the morphology under one specific operation condition are similar, but the detailed droplet distributions are distinguishable. So the spray field solution actually has many possibilities and the prediction in every iterative step should be one of them. But the L1 loss averages all the possibilities and produces a very blurry average image instead. However, the discriminator in GANs which can be regarded as the loss of generator is not an explicit loss function. Instead of the pixel-wise loss, D is an approximation loss and it denotes the overall spray morphology which discriminates between the real and fake data distributions.

Model validation
In the training process of GANs, the generator and discriminator have to been balanced trained and the convergence is often an unstable state. For the spray simulation task, the discriminator have difficulties to capture the detailed feature of the small droplets.
The L D has a possibility of becoming less meaningful through the training process. And the G will update itself based on the random feedback and the quality of generation may collapse. The G outputs low-quality images through many epochs, some of them shows faint spray pattern in the background but are easily identified as fake. It will be very easy for the discriminator to distinguish the targets and generation so the values of the loss from D drop to zero rapidly. The comparison of generated spray images from different framework demonstrates the superior performance of the mass conservation evaluator as shown in Figure 7. In some generated images, the background is not agree with the real target, the introduction of the L EMC helps G identifying the position and intensity of the droplet as well as the background shadow.
In our framework, when getting the predicted spray field, all the output matrices in one batch will be averaged to one image. Then this average image will be used to feed the down-sampling CNN to obtain the spray angle of this batch. Here, we use the average images from experiments as test samples for the validation of the spray angle estimator. Table 2

Predictions
Literature shown that the macroscopic morphology study is important to characterize a spray [35]. Here, the simulated spray morphology is analyzed and compared with the experimental results.   For the test cases which are not in the learning domain, the results have a small deviation and all the predicted angle values are less than the manually-measured ones. It is because these test cases are not constrained by the targets so the prediction have a trend to approach the mean value of the adjacent operating points which is happened to be larger.

Conclusion
In this paper, we proposed a novel deep learning framework constrained by physical evaluators to directly predict spray solutions based on generative adversarial networks. The normal discriminator and the mass conservation and spray angle evaluators are used to constrained the CNN to generate the spray solution, including macroscopical morphology and spray angle. The former evaluator is able to improve the training convergence and the latter one helps obtaining more accurate solutions that are consist with the operating conditions. It is noteworthy that the related network architecture and spray problem are generic and the proposed framework is potentially suitable for other fluid field simulations which have proper prior physics knowledge. Further research will be carried out for spray droplet size analysis and prediction with the present network framework.