Image-Processing-Based Study of the Interfacial Behavior of the Countercurrent Gas-Liquid Two-Phase Flow in a Hot Leg of a PWR

The interfacial behavior during countercurrent two-phase flow of air-water and steam-water in a model of a PWR hot leg was studied quantitatively using digital image processing of a subsequent recorded video images of the experimental series obtained from the TOPFLOW facility, Helmholtz-Zentrum Dresden-Rossendorf e.V. (HZDR), Dresden, Germany. The developed image processing technique provides the transient data of water level inside the hot leg channel up to flooding condition. In this technique, the filters such as median and Gaussian were used to eliminate the drops and the bubbles from the interface and the wall of the test section. A Statistical treatment (average, standard deviation, and probability distribution function (PDF)) of the obtained water level data was carried out also to identify the flow behaviors. The obtained data are characterized by a high resolution in space and time, which makes them suitable for the development and validation of CFD-grade closure models, for example, for two-fluid model. This information is essential also for the development of mechanistic modeling on the relating phenomenon. It was clarified that the local water level at the crest of the hydraulic jump is strongly affected by the liquid properties.


Introduction
One hypothetical accident scenario in which two-phase countercurrent flow may occur in a PWR hot leg is a lossof-coolant accident (LOCA), which is caused by the leakage at any location in the primary circuit.During this scenario it is considered that the reactor will be depressurized and vaporization will take place, thereby creating steam in the PWR primary side.Should this lead to "reflux condensation," which may be a favorable event progression, the generated steam will flow to the steam generator through the hot leg.This steam will condense in the steam generator, and the condensate will flow back through the hot leg to the reactor, resulting in countercurrent steam/water flow.In some scenarios, the success of core cooling depends on the behavior of this countercurrent flow.
The stratified countercurrent flow of steam and condensate is only stable for a certain ranges of steam and water mass flow rates.For a given condensate flow rate, if the steam mass flow rate increases to a certain value, a portion of the condensate will exhibit a partial flow reversal and will be entrained by the steam in the opposite flow direction towards the steam generator.This phenomenon is known as countercurrent flow limitation (CCFL) or the onset of "flooding."In case of an additional increase of the steam flow, the condensate is completely blocked and the reflux cooling mode ends.In this situation the cooling of the reactor core from the hot leg is impossible but may be continued by coolant drained through the cold leg to the downcomer.Figure 1 illustrates the countercurrent flow in the hot leg under reflux condensation conditions.In order to understand safety-related issues in nuclear power plants, analytical simulations using computational fluids dynamics (CFD) tools have been done, expecting to enhance the accuracy of the simulation predictions compared to the established one-dimensional thermal hydraulic analyses.Compare to the traditionals thermal hydraulic codes, CFD would supply a more reliable scale up to the reactor scale, as well as a more flexible behavior in terms of transferability of models to changes in geometry and thermodynamic boundary conditions.This due to its ability to reveal the interactions between the phases, which are determined by interfacial transfers, and the ability to substitute geometry-dependent empirical closure relations with more physically justified closure laws formulated at the scale of the structures of the interface.
To support the theoretical model development and to validate the CFD codes, a horizontal rectangular channel connected to an inclined riser was constructed, as a model of a PWR hot leg, where air/water countercurrent twophase flow experiments were performed.This equipment was installed in the pressure chamber of the TOPFLOW test facility (transient two-phase flow) of Helmholtz-Zentrum Dresden-Rossendorf (HZDR), Dresden, Germany.This model allows the investigation of co-and countercurrent flows under reactor typical boundary conditions (steam/water at pressures up to 5.0 MPa and saturation temperature).This has become the major experimental facility of the German CFD-network, initiated by the GRS (Gesellschaft für Anlagen und Reaktorsicherheit mbH).
For the CFD validation, it is of great importance to ensure a good access for measurements of distributed flow parameters, more than to create an exact geometrical similarity with the original equipment.Also, there is no need to quantify the critical mass flow rate since it was done in the past (e.g., UPTF, Germany, in UPTF-Fachtagung IV [2]).In previous experiments, the recognition of bubbles and droplets as detailed structures was not possible mainly because the optical access was limited, and so the observation of the flow was mainly used to support the interpretation of results.
Since investigations in the past, performed in pipes [3][4][5], were limited by the three-dimensional shape of the interfacial structure, the new test section has been optimized for the application of optical observation using a flat channel model of a PWR hot leg.In order to accelerate the CFD code validation program, the high-resolution pictures were analyzed by own developed image-processing algorithms.In the present paper, experimental procedure and developed image-processing technique will be presented firstly.Next, the time variation of water level inside the hot leg channel around the CCFL will be given.By using this data, the development of the waves around the CCFL can be clarified.Next, the statistical treatment of the data will be presented on the basis of the average parameters.Finally, the effect of fundamental parameters such as liquid mass flow rate, system pressure, and liquid properties will be discussed.

Experimental System and Image
Processing Technique

Experimental Setup.
A schematic view of the hot leg model test section is shown in Figure 2. It consists of the test section, the reactor pressure vessel (RPV) simulator located at the lower end of the horizontal channel, and the steam generator (SG) separator connected to the inlet chamber.This test section is a reproduction of the diameter of PWR hot leg of a German Konvoi type at a 1 : 3 scale.In order to provide better viewing conditions, the test section is not composed of pipes as in the original plant, but rather is a channel of about 50 mm (wide) which represents a vertical cut through the midplane of the hot leg and the inlet chamber of the steam generator.By using a flat section the error produced by the three-dimensional interface in highspeed videos is eliminated, allowing a closer look of the interface, including dispersed structures (drops and bubbles) that cannot be observed in a common pipe.Consequently, the test section is composed of a horizontal rectangular channel, a bend that connects it to an upward inclined and expanded channel, and a quarter of a circle representing the steam generator inlet chamber.The horizontal part of test section is 2.12 m long and has a rectangular cross-section of 0.05 m × 0.25 m.The SG and RPV simulators are identical vessels with 0.8 m × 0.5 m × 1.55 m (D × W × H) cubic shape.
Unfortunately, due to the overall dimensions of the hot leg model (3 m long), it was not possible to visualize the complete test section.Therefore, a region of observation had to be chosen.Previous investigations (e.g., [3]) indicate that the most agitated flow region is located near the bend and that a recirculation zone is formed there.Consequently, it was chosen to observe the bended region of the hot leg and the steam generator inlet chamber as shown in Figure 2. The flow behavior was recorded by a high-speed video camera at frequencies of 60 to 100 Hz and a shutter speed of 1/1000 s.
The test section was placed in a pressure chamber, in which it was operated in pressure equilibrium with the inner atmosphere of the tank in TOPFLOW (transient two-phase flow) facility as shown in Figure 3.A special heat exchanger condenses the exhaust vapor from the test section directly in the pressure vessel, when steam/water experiments are made.As shown in Figure 3, the cold end of this condenser and the inside atmosphere of the vessel are permanently connected, in order to guarantee full pressure equilibrium at all times [6].The vessel can be pressurized up to 5 MPa either with air for cold experiments or with nitrogen for steam experiments.Using this method allowed to design the equipment with thin materials.
The injected water mass flow rate was measured by a vortex meter.The injected air mass flow rate was measured and controlled using thermal mass flow meters.The steam flow rate over the pressure drop was measured through a venturi's tube.The temperatures of the fluids were measured by thermocouples at various positions in the facility.The water levels in both tanks were determined by the measurement of the differential pressure between the top and the bottom of the vessels with differential pressure transducers.The pressure drop over the test section was measured by a differential pressure transducer placed between the SG simulator and the RPV separator.These global parameters were measured via a data acquisition system running at 1 Hz, which was synchronized with the high-speed video camera.
In this experiment, the air was injected in the RPV simulator and flowed through the test section to the SG separator, from which it was released to the inner atmosphere of the pressure tank.The water from the feed water pump was injected in the SG separator, from where it can flow in countercurrent to the air flow through the test section to the RPV simulator.The onset of flooding was obtained by a stepwise increase of the gas mass flow rate with a small increment (9-35 g/s), under a constant water mass flow rate.Due to the internal buffer of the high-speed camera that was limited to 8 GB, a compromise had to be found in each run between the number and duration of the plateau of air flow rate.The number of plateau realized during one run was varied between 4 and 8, with a duration of each between 15 and 35 s [7].The onset of flooding was defined as the limiting point of stability of the countercurrent flow, indicated by the maximum air mass flow rate at which the down-flowing water mass flow rate is equal to the inlet water mass flow rate.This is a method used previously by Zabaras and Dukler [8] and Deendarlianto et al. [9].The experiments were carried out until the point of zero liquid penetration occurs, when the down-flowing water mass flow rate was equal to zero [7].
During the onset of flooding, the water level reached in the horizontal segment of the hot leg, obstructs the passage of steam enough to generate waves at the interface, which are eventually transform into slugs.Consequently, the pressure difference between the separators increase and become unstable.Then, the gas that impedes the water to flow into the RPV accumulates in the SG separator.The average pressure drop through the test section increases with the level of water in the steam generator, and the slug increases until the zero liquid penetration point occurs.

Image Process Techniques.
For the analysis of the highspeed video data obtained from the TOPFLOW experiments, two programs based on image processing techniques were used.These programs were written in MATLAB code along with simulink files.First the program will cut a submatrix from the original data, which becomes separate in a horizontal, inclined, and steam generator segments of the image as shown in Figure 4.An example of one image before processing can be seen in Figure 5(a).
A pre-processing stage is begun in the horizontal segment of the image in order to improve the interface in this part.Next step is to eliminate the drops and bubbles in the interface and the water that is stick in the walls of the test section.Here the bubbles and drops were considered as noise and possible reason of error.In order to correct this, the smooth filters were used to eliminate any salt and pepper noise.
In order to improve the uneven light conditions found in the data before processing, a background was created using the first image obtained from the Gaussian filter.After this, the background image is subtracted from the one before the background development.Next, an image enhancement function was implemented to improve the contrast.Finally, the image quality can be improved.An example of the processing steps of the horizontal segment can be found in Figure 5(b).
When analyzing the inclined segment, the original image is rotated about −50 degrees in order to make it become a horizontal approximation as in Figure 5(c).For the steam generator, the raw image is cut into a submatrix leaving only the part of interest.When the preprocessed of the steam generator segment ends, then all the obtained data is send from the workspace to a simulink file.In this file, the raw image is binarized in order to detect the borders of the hot leg channel.Finally, the water level can be calculated.An example of the processing steps for the steam generator segment can be found in the Figure 5(d).
To obtain the local information, the picture was divided into twelve points for the horizontal segment, nine points for inclined segment, and ten points for the steam generator segment.The program for analyzing the steam-water data works on the same philosophy as the air-water data.Finally, an example of the detected water level for the steam-water case is shown in Figures 6(a Ten experimental data series of HZDR in total were studied.Six of them were steam-water, and four of them were air-water.These sets of data were chosen in order to obtain a wide variety of parameters' combinations for pressure and mass flow rate, where XY-WZ represents the name of the specific experiment based on the date in which the experiment was made.The selected series are shown in Table 1.
Extensive checks were made in order to analyze the quality of the algorithm, but the most useful method in order to verify the reliance of the code is an automated one inside the same algorithm.When the water level's values are found in pixels, the algorithm creates markers that are drawn in the exact place in the original gray-level images where the water level point was calculated.This allows verifying each    exact value that is calculated for each water level in every image.This is made automated, and the result images with the markers are saved in a separate folder, which allow the possibility of verifying the results during any point after the processing of a set of images.
Analyzing a representative set of data of 5000 pictures after using the image processing algorithm on them, allowed to find that 233 points out of 155000 were deviated from the actual interphase, which represents a discrepancy of 0.15%.x/L = 0.17

Results and Discussions
x/L = 0.22 x/L = 0.27 x/L = 0.58 x/L = 0.68 x/L = 0.82 x/L = 0.84 δ (mm) x/L = 0.17 x/L = 0.22 x/L = 0.27 x/L = 0.58 x/L = 0.68 x/L = 0.82 In addition, the maximum of the water level was lower than 250 mm.This indicates that there is no total blockage of the water inside the channel during the CCFL.
3.1.Average Parameters. Figure 8 illustrates the distribution of the water level inside the hot leg channel.Figures 8(a) and 8(b) correspond to the cases of air-water and steam-water, respectively.The injected liquid mass flow rate was 0.3 kg/s of each case.For a meaningful comparison, a nondimensional gas superficial velocity J G * , namely, as gas Wallis parameter, is used.Here the gas Wallis parameter in Figure 8 is defined as follows: where J G indicates the superficial gas velocity, ρ the density, g the acceleration of gravity, and H the height of the channel.Close inspection of Figure 8 reveals that before the onset of flooding the water levels in horizontal and inclined parts increase with the increase of the gas Wallis parameter.Meanwhile it is almost constant in the steam generator until the onset of flooding.Next, it shows also that the water level in the horizontal part decreases when x/L closes to the inclined part.The decrease of water level at the beginning of the inclined part indicates the change of the liquid film profile from the subcritical to supercritical condition as described by Deendarlianto et al. [7].Meanwhile this profile changes dramatically when the gas mass flow rate approaches the onset flooding.This means that the change of wave direction is begun here.Next, it is noticed the observed phenomenon of air-water is the same as of the steam-water.Figure 9 illustrates the standard deviation of water level inside the hot leg channel.The flow condition was similar to that of Figure 8.The figure shows that the standard deviation in horizontal and inclined parts increases with the increase of gas Wallis parameter.This means that wave fluctuations increase also with the increase of the gas superficial velocity.On the other hand, the wave in the steam generator begins fluctuating near the onset of flooding.
A small algorithm to calculate the probability distribution function was created.The probability distribution of a random variable can be defined as a function that assigns the probability that an event occurs to each defined variable.The program computed the normpdf (X, mu, sigma).This function determines the PDF for each value of X, using the data, the average, and standard deviation.The mathematical function that defined this is After the calculation of the PDF, the obtained values are ordered from highest to lowest to get the PDF chart with the values placed in a corresponding manner, without requiring any subsequent operation.This operation is performed for the 31 data points (x/L).At the end of the program, the results for the 31 points of the PDF are stored in two vectors to be used or transferred to another cell's working program in the future (e.g., Excel).Figure 10 shows the example of the probability distribution function (PDF) of the water level at the horizontal segment.This figure reveals that the PDF begins to spread when the gas velocity approaches the onset of flooding.From this result, it is possible to notice that the spread of PDF in the horizontal position under this flow condition can be used as a good indicator to detect the occurrence of flooding.
When J G * is small compared with the other values studied in this case, the probability function is represented x/L = 0.22 by a curve with the smallest dispersion of water levels in comparison with the rest.This curve is equivalent to a stratified and almost laminar flow.As J G * increases, the curve opens and the dispersion of probabilities on the water level rises.This means that as J G * increases, the flow becomes more turbulent and less stratified, which is why it can be seen an opening of the probability to multiple values of water level instead of tending to one.
In the case of Figure 10(a), before reaching the CCFL (J G * < 0.33), the values of the liquid phase level in which the probabilities are greater are displaced to the left, indicating a lower water level at this point.Then, when the CCFL occurs (J G * = 0.33), the values became more scattered (less stratified flow), and the level of the phase is most likely to become greater in the region near the elbow.It can be seen that, once the onset of flooding is reached, the curves for higher J G * are maintaind around the same values.
While in Figure 10(b) could be difficult to find the point for the onset of flooding, it can be noticed that, based on the same principle, the values keep changing, becoming increasingly dispersed until J G * = 0.36.This same pattern repeats for all the other experimental conditions.One of the main differences between air/water and steam/water experiments when analyzing the PDF is that because the steam/water interphase is not completely laminar since low values J G * , then the change to the onset of flooding seems more drastic in the air/water experiments.
Figures 11 to 13 show the effects of the fundamental parameters such as the injected liquid mass flow rate, system pressure, and liquid properties on the water level inside the hot leg channel, respectively.The shown data is the water level at the horizontal part of x/L = 0.32, which is the closest location to the elbow.It was taken due to the consideration x/L = 0.32 m L = 0.3 kg/s, Figure 13: Effect of physical properties on the water level.
that the flooding coincides to the slugging inception in the lower leg of the elbow close to the bend [10,11].
Figure 11 shows that for the conditions presented, when every parameter but the liquid mass flow rate is fixed, the water level will depend of this last value.When m L = 0.30 kg/s, the water level will be approximately 100 mm greater than that when a liquid mass flow rate of 0.15 kg/s is used.
In Figure 12, the effect of system pressure of water level is shown.It can be seen that, when every parameter is fixed but the system pressure, the water phase is maintained almost at the same level.Finally, Figure 13 shows the effect of physical properties over the water level, where it can be seen that when air-water are used as the fluids for the experiments, the water level in the onset of flooding increases in around 80 mm when compared to the experiment in which the steam-water are the working fluids.The same pattern repeats when other experiments are analyzed.This clearly indicates that the liquid mass flow rate and the physical properties greatly affect the onset of flooding in the experiments, while the pressure is a parameter that would not affect the water level in a drastic way when changed.
Then, it is shown that before the onset of flooding the water level increases with the increase of gas superficial velocity.Meanwhile, at the onset of flooding, it is dependent on the injected liquid mass flow rate and the physical properties.Those effects were not considered by previous researches; therefore, the proposed flooding correlations in their literature were not successful.

Conclusions
An image-processing technique was developed to analyse the sequence video images of the countercurrent gas-liquid twophase flow of air-water and steam-water in a model of PWR hot leg.The data images were taken from the experimental series of TOPFLOW facility, HZDR, Dresden, Germany.This technique allows us to access the quantitative local flow information; therefore, a detailed CFD-grade data for the water level evolution inside the hot leg channel including its statistic characteristics were set up.Extensive checks were also made with regard to the quality of the method.The data can be used to validate the CFD code, and physics behind the observed phenomenon were clarified by being able to understand more in deep the behavior of the system and the particular properties that affected the water level during the onset of flooding, as well as the effect of the J G * in the water level and the time-dependent interfacial behavior of the flow.

Figure 2 :Figure 3 :
Figure 2: Schematic view of the hot leg model test section (dimension in mm).
(a) Example of an original image of steam-water (b) Image processing, contrast enhancement, and binarization of the horizontal section for the steam-water data (c) Image processing, contrast enhancement, and binarization of the inclined section for the steam-water data (d) Image processing, contrast enhancement, and binarization of the steam generator section for the steam-water data

Figure 5 :
Figure 5: Detected water level and boundaries of the hot leg channel (steam-water).

Figure 6 :
Figure 6: Detected water level and boundaries of the hot leg channel (steam-water).

Figures 7 (
Figures 7(a) and 7(b) show the time variation of the water level during the CCFL of air-water and steam-water, respectively.The injected liquid mass flow rate was 0.3 kg/s.The temperature of the fluids for the experiments with air/water was 18-24• C (room temperature) and for stem/water was saturation temperature.As shown in the figure, the water level in the horizontal and inclined parts exhibits notable oscillations, and the shape of the wave varies along the channel.This indicates that the wave patterns during the CCFL are space and time dependent.Next, it can be seen that the successive waves do not follow the direction of liquid injection, and for that matter the CCFL can be identified.

Figure 7 :Figure 8 :
Figure 7: Time variation of water level inside the hot leg channel during CCFL.

Figure 9 :
Figure 9: Distribution of the standard deviation of the water level inside the hot leg channel.

Figure 11 :Figure 12 :
Figure 11: Effect of injected liquid mass flow rate on the water level.