Quantitative metrics for comparison of in-cylinder velocity fields using particle image velocimetry

The in-cylinder flow field plays a key role in determining the combustion performance of internal combustion engines (ICEs) and it is critically important to validate numerical simulations of the flow field by comparison to experimental measurements using techniques such as particle image velocimetry (PIV). With the current trend for high-speed diagnostics, methods for quantitative comparison of vector fields are required which can provide robust spatially averaged results, without inspection of individual flow fields. The quality of match between vector fields, when quantified using current metrics such as the relevance index (RI), can be overly sensitive to the alignment of regions of low velocity such as the tumble vortex centre. This work presents complementary metrics, weighted using a function of the local velocity, for robust quantification of the alignment and magnitude differences between vector fields, the weighted relevance index (WRI) and the weighted magnitude index (WMI). These metrics are also normalized and combined in the combined magnitude and relevance index (CMRI). PIV measurements taken up to every 2 crank angle degrees within the tumble plane of a motored, optically accessible ICE are used to demonstrate the motivation for development and the application of the WRI, WMI, and CMRI metrics. The metrics are used to determine the number of cycles required to provide a representative mean flow field and to identify single cycles of interest. Variability of the flow field is quantified using the metrics and shows high variability in the region of the spark plug near typical ignition timings. Graphic abstract


Introduction
The internal combustion engine (ICE) remains the most common form of powertrain used in ground transportation throughout the world (Kalghatgi 2018). Although there has been significant progress in the development of battery electric vehicles, they currently account for only 2% of vehicle sales and make up of order 0.5% of the global fleet (OICA 2018;IEA 2019). Several predictions suggest that the total number of passenger vehicles will exceed 2 billion by 2040, with the majority powered at least in part by an ICE (Kapustin and Grushevenko 2019). Therefore, it is highly likely that the ICE will play a key role in ground transportation in the coming decades.
For this reason, the continued development of combustion engines is necessary to meet the increasingly stringent emissions and fuel economy legislation enforced by governments across the world. To achieve this, further understanding of the complex in-cylinder processes that affect mixture preparation and combustion are required to reduce fuel consumption and harmful emissions. In both industry and research, computational fluid dynamics (CFD) is now a common tool used to simulate the performance of ICEs and provide data that can be used to improve the design of new combustion systems (Hentschel et al. 2001). It is well known that the incylinder air motion has a profound effect on mixture preparation and combustion (Stone 2012;Heywood 2018), therefore it is vital that it is captured with sufficient accuracy by CFD.
Optically accessible engines are a useful tool that have been used frequently to provide insights into the operation of ICEs that would be otherwise unavailable (Sick et al. 2010;Sick 2013;Miles 2014). They are also a vital source of data for validation of CFD engine simulations. For incylinder air motion, particle image velocimetry (PIV) is a common experimental technique (Böhm et al. 2011) due to its non-intrusive nature and ability to provide multiple velocity components in two or three dimensions (Prasad 2000;Adrian and Westerweel 2011;Peterson et al. 2017;Raffel et al. 2018). Accordingly it is the technique of choice for many engine related velocimetry studies (Justham et al. 2006;Zeng et al. 2014Zeng et al. , 2016Zhang et al. 2014;Stiehl et al. 2016) . In-depth validation of CFD using PIV flow fields requires the application of quantitative metrics for comparisons between simulated and experimental vector fields.

Methods for comparing vector fields
Computational fluid dynamics has found applications across many fields and the issue of validation is not restricted to ICE research. In biomedical engineering, comparisons between measured and simulated flow fields have been made for studies of blood flow and nozzle flow, mimicking common medical devices (Ford et al. 2008;Buchmann et al. 2010;Hariharan et al. 2011). Validation is also required for larger scale experiments, such as the air flow over buildings (Tominaga et al. 2015). The methods that are used to investigate the differences between vector fields vary from qualitative, simply plotting the vector fields side-by-side (Franco et al. 2005;Enaux et al. 2011;Raj et al. 2013), to quantitative metrics. Although qualitative methods can be useful, quantitative metrics are preferred for robust comparisons and validation of simulated vector fields.
In some cases a characteristic feature of the flow field may provide the most appropriate metric for comparison of velocity fields from PIV, large eddy simulations (LES) or Reynolds averaged Navier Stokes (RANS) modelling. The speed of the flow along the central axis of the intake port (Pera and Angelberger 2011), or the axis of the intake jet (Ameen et al. 2017) can be suitable choices, as can the location of vortex centres (Imberdis et al. 2007;Yang et al. 2014) or spatially averaged tumble ratio (Krishna et al. 2013;Koch et al. 2014). As well as mean velocities, for LES simulations with many realisations, RMS velocities along selected vertical and horizontal planes have been used to compare the effect of mesh refinement on the simulation of an optical engine (Baumann et al. 2014).
A more general approach is to consider the entire flow field by calculating differences in RMS velocities over the whole field (Van Dam et al. 2018). Statistical methods such as the circular standard deviation can also be used to investigate cyclic variability in velocity magnitudes and directions (Van Dam and Rutland 2015) and flow field differences between sequential and parallel LES simulations (Van Dam et al. 2017).
One of the main advantages of using PIV is multi-component measurements in multiple dimensions. As a result, spatially derived quantities such as the rate of strain or vorticity can be calculated and used for comparisons between flows. Vorticity has been used to validate RANS and LES simulations of the flow around blades of a vertically aligned wind turbine (Simão Ferreira et al. 2007). Streamlines have also been used to qualitatively compare LES simulations of the in-cylinder flow in engine-like geometry (Montorfano et al. 2014).
A widely used metric for comparison of two vector fields is the relevance index (RI), defined by Liu and Haworth (2011), where q A , q B is the dot product between two vectors q A and q B , and |q| is the magnitude of q . The RI produces values between − 1 and 1, with 1 corresponding to perfect alignment. In this way, the RI compares the alignment of two vectors independently of their magnitudes. This metric can trivially be applied to each location within a pair of vector fields and subsequently spatially averaged to produce a single value that quantifies the match in alignment between two fields.
The RI has been used to investigate the convergence of LES simulations of a GDI engine , to directly compare LES simulations to experimental results for model validation (Wang et al. 2015) and to investigate the cyclic variability of PIV in-cylinder flow fields (Wang et al. 2016) including the influence of fuel injection (Chen et al. 2018). The RI has also been applied to quantify the differences in spray characteristics (Chen et al. 2013a and Proper Orthogonal Decomposition modes derived from PIV measurements (Chen et al. 2012(Chen et al. , 2013b. Under the alternative title, the Structure Similarity Index (SSI), the RI has been used to determine the minimum number of LES realisations of a turbulent, non-reacting spray needed to produce a representative mean (Hu et al. 2015).
An alternative metric that, unlike the RI, accounts for both magnitude and direction when comparing vectors is the magnitude similarity index (MSI) (Hu et al. 2015), defined as The MSI produces values between 0 and 1 with larger values corresponding to better alignment. This metric has been used to investigate the convergence of simulated OH mass fraction and soot mass fraction distributions of an n-dodecane spray flame (Ameen et al. 2016) and to quantify flow field differences between simulations and experiments (Ameen et al. 2017;Van Dam et al. 2017). Similarly to the MSI, the local magnitude index (LMI), defined using magnitude subtraction rather than vector subtraction, has recently been used to compare LES simulations to PIV measurements across five planes within an optical engine (Zhao et al. 2019).
Existing metrics such as the RI can be highly sensitive to low velocity regions of the flow field commonly found in IC engine flows. The following work details the motivation for and development of complementary metrics, the weighted relevance index (WRI), the weighted magnitude index (WMI) and a combined magnitude and relevance index (CMRI) which address these low velocity issues for comparisons of in-cylinder flow fields. These metrics can be used to quantify the differences in alignment or magnitude between vector fields either independently using the WRI and WMI or in combination using the CMRI.
Applications of these metrics are demonstrated on a large dataset (1000 cycles) of velocity field measurements using PIV on an optically accessible GDI engine. The metrics are used to determine a representative mean cycle, to rapidly identify single cycles that provide the best and worst matches to this mean cycle and to quantify the spatial distribution of variability across the tumble plane. For application of these metrics to mean flow fields for validation of CFD simulations using PIV across multiple engine operating points the reader is directed to Scott et al. (2019).

Optical engine
Particle image velocimetry measurements were made in the central tumble plane of a single-cylinder, optically accessible GDI engine under motored conditions. This engine has a pent-roof combustion chamber closely based on a recent production engine and the spark plug was replaced with a blank to reduce excess scattered laser light. Specifications of the optical engine are given in Table 1 and a schematic of the experimental setup is shown in Fig. 1.
A transparent acrylic annulus with a height varying between 25 and 39 mm was used to provide optical access to the combustion chamber including the pent-roof. An extended Bowditch piston arrangement with a 45° mirror and a quartz piston window 60 mm in diameter provided access for the laser sheet. The surface of the cylinder head, valve edges and the rear internal surface of the acrylic annulus were painted matt black to reduce excess background scatter.

PIV system
Particle image velocimetry measurements were made in the central tumble plane, normal to the crankshaft and offset 1 mm from the cylinder axis in the direction away from the flywheel to minimize the strong scatter from the centrally located fuel injector tip. The measurement plane therefore lies between the pair of intake valves. A LaVision aerosol generator was used to introduce droplets of vegetable oil approximately 0.2-0.4 µm in diameter into the intake plenum upstream of the intake runner to encourage a more uniform seeding distribution on entry to the combustion chamber. A mass flow controller was used to control the seeding density, which was optimised by an iterative process. The droplets were illuminated by a pulsed laser sheet produced by a diode-pumped, double cavity Nd:YLF laser operating at 527 nm, with each cavity providing a pulse energy of approximately 17 mJ at a repetition rate of 1.8 kHz. The beam was formed into a 1 mm × 60 mm sheet at the measurement region using a spherical lens telescope and a concave cylindrical lens with a focal length of − 20 mm.
The oil droplets were imaged onto a Phantom VEO 710L high-speed 12-bit digital CMOS camera with a resolution of 1280 × 800 pixels using a Nikon 50 mm f/1.4 lens working at f/4. The on-board camera memory holds up to 6000 image pairs resulting in a trade-off between the frame rate and crank angle range of PIV measurements. The maximum number of cycles recorded per experimental run was limited to approximately 100-150 by fouling of the transparent annulus due to a layer of oil.
Two recording conditions are discussed here. For the lower frame rate condition image pairs were recorded every 10°CA from 270°CA before firing top-dead-centre (bTDC) in the intake stroke to 30°CA bTDC at the end of the compression stroke. 10 experimental runs of 100 cycles were performed to build a large set of 1000 cycles for analysis with the vector comparison metrics. Variability of mean peak pressure for each run with respect to the 1000-cycle average was 0.46% (standard deviation) with worst case deviations of + 0.72% and − 0.86%. At the higher frame rate condition 150-cycle datasets were recorded, with measurements every 2°CA but restricted to the compression stroke, starting at 180°CA bTDC.
Images of the seeded oil droplets taken in the tumble plane suffer from astigmatism due to imaging through the curved surface of the quartz annulus. The working distance of the camera was adjusted to achieve equal defocus in the horizontal and vertical directions and hence produce circular particle images as suggested by Reuss et al. (2002). This slight blurring effect also aided in the avoidance of discretisation errors due to peak-locking (Prasad et al. 1992) by ensuring the size of the droplet images was larger than a single pixel.
A LaVision programmable timing unit (PTU v10) was used to independently set the time separation between each pair of laser pulses at each measurement timing within the cycle. This allows the delay between frames to be optimised to suit the varying in-cylinder flow velocities throughout the cycle on a crank angle resolved basis, increasing the dynamic range of the velocity measurements (Abraham et al. 2013).
All image acquisition and processing was performed using LaVision DaVis 8.0 software. An image of a grid of uniformly spaced dots was used for coordinate transformation and distortion correction. The raw images were preprocessed using a min-max filter and a static digital mask was applied so that only particle images were used in the velocity calculation. A multi-pass cross-correlation algorithm was used to calculate the displacement of particle images. An iterative scheme that started with a window size of 128 × 128 pixels and decreased to 32 × 32 pixels for the final three passes was used (Westerweel et al. 1997;Riethmuller 1999, 2000), giving a spatial resolution of 1.91 mm with a vector spacing of 0.95 mm due to the 50% overlap between interrogation windows. Spurious vectors were removed from the calculated vector fields using a validation routine. Any vector with a correlation peak ratio (the ratio of the highest correlation peak to the second highest) of less than 1.8 was deleted. At each pass, a remove and replace algorithm was also used to remove spurious vectors by comparing each vector to the median of its 8 neighbours. Analysis of the resulting vector fields was performed in MATLAB.

Low velocity sensitivity of RI
Metrics such as the relevance index (RI) provide a spatially resolved map of the differences between vector fields. However, for large datasets it is impractical to manually compare individual fields, as is the case in this work where each experimental run generates 2800 vector fields. Instead, spatial averages of the metric values are commonly taken to reduce the comparison for each vector field pair to a single value, e.g., where RI is the spatial average of the relevance index field RI(i) containing N values. Reduction of the alignment information within a RI(i) field, often corresponding to thousands of vector pairs, to a single value raises questions as to the reliability of the spatial average, RI , as a representative value of the overall field.
In-cylinder flow fields often contain both high and low velocities simultaneously. In particular, tumble motion is commonly generated in spark ignition (SI) engines by the directed intake manifold and moving piston resulting in a strong tumble vortex with a region of low velocities near the vortex centre (Stone 2012). The following discussions are based on the planar, 2-component PIV experiments of this work and any reference to 'low' velocities refers to low in-plane velocities as the third velocity component is not measured.
A key feature of the relevance index is its independence of the velocity of the vectors being compared. This means that small differences in velocity will have a much greater effect on the RI for regions of low velocity due to the larger relative change in alignment. Near the centre of the tumble vortex where velocity magnitudes are low and flow direction varies significantly over short distances (reversing across the centre of the vortex), small absolute differences in velocity can dominate the spatially averaged RI of a pair of flow fields, masking other differences which may be present in higher velocity regions of the flow.
To investigate the effect of vortex centres on the RI, PIV measurements were taken every 2°CA during the compression stroke. Datasets A and B of Fig. 2 are each average flow fields from 150 cycles which display a 5 mm horizontal difference in the locations of the tumble vortex centres at 86°CA bTDC.
The inset of the overlaid flow fields shows the strong misalignment of vectors near the vortex centres which is quantified by the corresponding negative RI values in the lower figure. However, the majority of the velocity vectors away from the vortex centres are well matched with over 75% of the vector field having a relevance index over 0.99.
Inspection of the RI field ( Fig. 2) clearly identifies the poor alignment of vectors near the centre of the vortex and the good alignment of vectors across the majority of the field but does not answer the question of how strongly the few vectors near the vortex centres are influencing the spatially averaged RI value. For a given RI , is the angle between vectors which results in the same value of RI if all vectors in datasets A and B were uniformly misaligned by this fixed angle. In this way, the standard RI is plotted as a function of crank angle during the compression stroke (blue solid line). A modified RI to remove and hence quantify the contribution from misaligned very low velocity vectors near the vortex centres is calculated by removing any RI values below zero from each field before spatially averaging (red dashed line).
For the first half of the compression stroke the tumble vortex centre is below the field-of-view and the standard and modified RI have identical values. Once the tumble vortex centre enters the measurement region at around 90°CA bTDC, the modified RI shows a significant difference to the standard RI , with a difference in average angle of misalignment (black dot-dashed line) of up to 25%. This is despite the fact that the fraction of vectors removed to calculate the modified RI (purple dotted line) is only 1%.
Using the standard spatially averaged RI to identify the best match between a reference field and a large dataset will therefore, if a region of low velocity such as a tumble vortex centre is present, be likely to identify the flow field which provides the best local match to the low velocity region, potentially at the expense of a poorer match across the field as a whole.
To produce a spatially averaged value of the relevance index which is also sensitive to the alignment across the higher velocity regions of the flow, it is necessary to mitigate the low velocity sensitivity of the standard RI when analysing flows with rotating structures.

Weighted relevance index (WRI)
An alignment metric with reduced sensitivity to the alignment of low velocity regions may be constructed by weighting the RI at each vector location, RI x i , z j , by a function of the local velocity magnitudes, such a way as to preserve the desirable qualities of the metric. Normalization of all weighting factors is required to ensure the metric remains independent of scalar velocity magnitude changes. An alignment metric's value should not change if the speed of every vector in one field is doubled as the directional information and relative velocities within the field have not changed. Each field should be normalized with respect to its own velocity scale to ensure both fields are treated equivalently.
To construct such a metric, the weighted relevance index (WRI) (Eq. 4), a misalignment penalty based on the standard RI is calculated at each spatial location for a pair of flow fields, 1 − RI x i , z j ∕2 . This penalty is then weighted by the normalized local velocity magnitude of each field which suppresses the penalty for small local velocities. For a given angular difference this weighting assigns more importance to misaligned high velocity vectors (a large absolute velocity difference) than misaligned low velocity vectors. The WRI is defined as with spatial coordinates x i and z j . Here median Q A is defined as the median value of all elements (including duplicate values) of the magnitude field Q A . The normalization factor is chosen to be the median of the velocity magnitudes across the corresponding flow field. While the maximum velocity magnitude would provide a metric bounded by 0 and 1, similarly to the standard RI, normalizing by the maximum is vulnerable to spurious vectors or small pockets of high velocities determining the weighting factor for the entire field. Instead the median is used to provide a robust normalization factor to represent the velocity scale within the field. Perfect alignment corresponds to a WRI of 0, while a WRI value of 0.5 is equivalent to a misalignment of 90° between two vectors which each have the median velocity magnitude within their field. Normalization using information from across the whole flow field means that unlike the RI, the WRI is not defined for the comparison of single vector pairs as it is not possible to objectively define a velocity scale for the suppression of low velocity penalties without other vectors for comparison.
The WRI field for datasets A and B of Fig. 2 is displayed in Fig. 4 with an inverted colour scheme for ease of comparison with Fig. 2, in both cases blue represents poor alignment. Large WRI values identify not only the severe local misalignment of low velocity vectors near the vortex centres (filled black and red circles), but also regions Fig. 3 The spatially averaged RI values for datasets A and B of Fig. 2a as a function of crank angle with (red dashed) and without (blue) the RI < 0 vectors removed. Also shown is the corresponding percentage difference in RI (black dot-dashed) and the percentage reduction in number of vectors (purple dotted) of misalignment across the higher velocity regions of the field. This ensures that the spatial average of WRI values characterises the alignment of vectors across the entire field and avoids the low velocity sensitivity issue of RI in Fig. 3.

Weighted magnitude index (WMI)
For comparisons of flow fields, it is also important to be able to quantify differences in velocity magnitude. The magnitude similarity index (MSI) (Eq. 2), (Hu et al. 2015) is one method for quantifying velocity magnitudes that is valid for any pair of vectors. For the purposes of this work, the vector subtraction is undesirable as it takes into account both alignment and magnitude. In addition, the normalization by the local velocities presents a similar low velocity issue to that discussed for the RI. If the local velocity magnitudes of both flow fields are small, their presence in the denominator of a metric can amplify tiny absolute differences in velocity. The weighted magnitude index (WMI) is defined as where median Q A , Q B is defined as the median of all elements (including duplicate values) of the magnitude fields Q A and Q B . The difference in velocity magnitudes at each spatial location is normalized to produce a dimensionless metric and is independent of the alignment of the vectors. Vectors with the same magnitude produce a WMI of zero, while vectors with large magnitude differences produce values of WMI greater than one.
Similarly to the WRI, the normalization factor has been chosen to be the median velocity magnitude across both vector fields A and B. This provides robustness of the normalization against spurious vectors or small pockets of high velocity as before and also avoids small local velocities in the denominator over-stating the importance of tiny velocity magnitude differences. This low local velocity effect is Fig. 5 where the WMI has been calculated using a normalization factor of either (a) the local maximum velocity, max Q A x i , z j , Q B x i , z j in a similar way to the MSI, or (b) the global median velocity, median Q A , Q B as in Eq. 5. Near the vortex centres (filled red and black/ white circles), normalization using small local velocities in a) results in extremely poor WMI values (dark blue) despite small absolute differences in magnitudes. The WMI values in Fig. 5b better represent the absolute magnitude differences across the whole field, such as the lower left region where magnitude differences in the high velocity flow far from the vortex centre were partially suppressed in Fig. 5a due to their smaller relative difference.

Combined magnitude and relevance index (CMRI)
When comparing vector fields it is not always desirable to focus solely on either direction or magnitude and a good match in alignment with a reference field (low WRI) does not necessarily imply a good match in magnitude (low WMI) so an overall comparison cannot be provided by either metric alone. It is therefore useful to also define a combined metric which encompasses the differences in both alignment and magnitude between flow fields. To develop and test the capabilities of the WRI, WMI and a combined metric, PIV measurements were recorded in 10°CA increments between 270°CA bTDC and 30°CA bTDC to provide a 1000 cycle dataset covering sections of both the intake and compression strokes. Figure 6 provides an example of the motivation for a combined metric, showing there is negligible correlation at the end of the intake stroke (190°CA bTDC) between spatially averaged WRI and WMI values for comparisons of each of the 1000 individual cycles with the 1000-cycle mean field. Unfortunately the two metrics cannot be trivially combined into a single metric that retains sensitivity to both alignment and magnitude differences. Figure 7a presents the mean flow field for the 1000-cycle dataset at 240°CA bTDC, in which the lower edge of the intake jet is visible in the upper right region of the field. An example single-cycle flow field is shown in Fig. 7b highlighting two regions of the flow which for this cycle clearly differ from the mean flow field in either velocity magnitude (solid circle) or direction (dashed circle). The WRI and WMI metrics identify these regions as having poor matches in alignment and magnitude, respectively, with high (yellow) values (Fig. 7c, d). However, a trivial combination of the metrics, (WRI + WMI)∕2 is insensitive to differences in alignment (Fig. 7e).
Combining WRI and WMI by simple addition is ineffec- trivial combination of the metrics to be heavily weighted towards the contribution of the WMI over the WRI, leading to a combined metric that is insensitive to differences in alignment (Fig. 7e).
Other flow field comparisons may have very different distributions of WRI and WMI. To ensure both the WRI and WMI are equally weighted in a combined metric for any flow field, the metrics must be rescaled to suit the flow fields of interest.
For a given set of N f flow fields each containing N v vectors compared in turn to N r reference flow fields, there will be a total of N t values for each metric, one for each individual vector comparison, where N t = N f × N v × N r . These N t metric values are given by f and the rescaling is chosen such that the majority of normalized metric values, f norm , lie between 0 and 1 where f norm is given by The threshold values f low and f high are defined by sorting f and ignoring the highest and lowest 2% of values for the purposes of rescaling to avoid the extremal WRI or WMI values defining the scaling factor for each metric. The highest and lowest remaining values are f high and f low . In this way 96% of rescaled metric values, f norm , lie within the range 0 to 1. Figure 8 illustrates this rescaling from WMI and WRI to WMI norm and WRI norm for a single-cycle flow field compared to a 1000-cycle mean field at 70°CA bTDC, i.e., N f = N r = 1 . For this example comparison the WMI has approximately 5 times the range of the WRI when considering f high − f low for each unscaled metric (Fig. 8a, c). By definition, the range of the central 96% of WMI norm and WRI norm values is identical, from 0 to 1 (Fig. 8b, d).
The rescaled metrics can then be trivially combined into a single metric to quantify both alignment and magnitude differences, the combined magnitude and relevance index (CMRI), where a high value of CMRI identifies a region of a flow field with a large difference to the reference field in either magnitude, direction or both.
(7) CMRI = WRI norm + WMI norm 2 , The WRI norm and WMI norm values (Fig. 9a, b) retain the same alignment and magnitude information as the WRI and WMI values (Fig. 7c, d) however unlike the trivial combination of the unscaled metrics in Fig. 7e, the CMRI values (Fig. 9c) successfully represent the variation in both alignment and magnitude present within the example flow field.
In this way, the CMRI may be used to quantify overall differences between flow fields. Spatially resolved fields of CMRI values may be used to identify regions of interest for further study, while via spatial averaging the CMRI can provide a single value which quantifies the similarity of two flow fields.
As the CMRI metric is sensitive to both differences in alignment and in magnitude by design, the CMRI values alone do not distinguish between these two types of flow differences, such as the two circled regions of Fig. 9c within which the CMRI is simply 'high' for both. The CMRI, WRI and WMI therefore provide a complementary set of metrics which should be used in combination for flow field investigations.
Due to the rescaling of the WMI and WRI metrics, the CMRI values may only be compared quantitatively to other values within the dataset used for the normalization of the WRI and WMI. However, the set of flow field comparisons used to define the normalization may be freely chosen. The metrics may be normalized within a single flow field pair to finely resolve the spatial variation in alignment and magnitude between the two flow fields. Alternatively, the scaling may be calculated using very large datasets involving thousands of cycles at a variety of crank angles and engine operating conditions to enable quantitative comparisons of large differences in flow fields across an entire measurement campaign.
Care must therefore be taken when interpreting CMRI values and it would be unreasonable to define a CMRI value that corresponds to a universal threshold for vectors or flow fields being similar, especially when the concept of two flow fields being similar is highly dependent on context.
A value of WRI norm of 1 corresponds to a misalignment between vectors for which only 2% of vector pairs within the normalization dataset have higher WRI values. Similar logic follows for WMI norm . Therefore a CMRI value of 1 (0) corresponds to a vector pair which has a combined directional and magnitude difference to the reference flow field equivalent to being in the worst-matched (best-matched) 2% of all vectors within the dataset for both direction and magnitude independently.
Selection of threshold values for investigations using CMRI values may be guided by spatially resolved features identified within CMRI fields such as those circled in Fig. 9c, for which case a threshold value of 0.5 would isolate other flow features within the dataset equivalently poorly matched to the reference field.
Alternatively, a value of CMRI may be selected by inspection of the distribution of (known) CMRI values. If for a certain dataset compared to a reference field, 10% of the vector-wise CMRI values are greater (or less) than 0.7, then 0.7 may be used as a threshold to identify a vector as being within the 'worst (or best) matched 10% of all vectors in the dataset'.
A key application of these quantitative metrics is the validation of CFD models by quantitatively comparing experimental PIV flow fields to CFD. In such a case one choice for an appropriate CMRI threshold for evaluating similarity between simulation and experiment would be a value which represents the experimental variability between tests. This CMRI value is readily obtainable by including both the CFD flow field and mean flow fields from individual experimental runs within the dataset for comparison to the overall experimental mean flow field.

Application of metrics to in-cylinder flows
The CMRI, WRI, WMI, RI and MSI metrics all have advantages and should be applied where most appropriate and also in combination with other flow characterisation methods such as vortex tracking (Simpson et al. 2018). The WRI, WMI, and CMRI are sensitive to differences in both high and low velocity regions of a flow field, while where relative changes in low velocity regions are critically important or where any form of velocity weighting is undesirable, the RI and MSI metrics are better suited.

Number of cycles required for a representative mean
A single measurement of the flow field within an engine differs from the mean flow fields due to both turbulent fluctuations and cycle-to-cycle variations of the flow. For quantitative comparison of the flow structures to the results of CFD modelling, or between different experimental conditions, a representative mean flow field is obtained by averaging the flow fields obtained from multiple cycles. The optimal number of cycles to average must balance accurate representation of the mean flow field with experimental and analytical costs.
Depending on the nature of the flow field at a given condition, tens, hundreds or even thousands of cycles may be required to converge onto a representative mean cycle. The CMRI metric provides a quantitative approach to determining the number of cycles required.
The 1000-cycle, lower frame rate (every 10°CA) dataset was used to provide a nominally accurate mean flow field for comparison. A random number generator was used to select varying numbers of cycles from the large dataset which were then cycle-averaged and each compared to the full 1000 cycle dataset using the CMRI metric (Fig. 10). A similar analysis using the standard relevance index (RI) to determine the number of cycles required for a representative mean for high and low swirl motion was performed in Wang et al. (2016).
The spatially averaged CMRI values in Fig. 10a show that the dependency of the quality of match of the overall field on sample size is similar across the range of crank angles measured. In this case, the CMRI values averaged across all crank angles may therefore be used to determine the number of cycles required (Fig. 10b).
In addition to the CMRI values, the standard deviation of the sample-means for the x component and z component of velocity for each sample size were calculated following the methodology of Baum et al. (2014). These values were averaged across all crank angles and normalized by a constant scale factor to the value of the CMRI metric for a sample size of 500 cycles (Fig. 10b). This illustrates the similarity of the trend of the reduction in both CMRI metric values and the standard deviation of sample-means for increasing sample size.
Samples with less than 10 cycles produce very high CMRI values, which for this dataset are in the range 1-30, corresponding to very poor matches to the 1000-cycle mean field. A significant improvement in the quality of match to the 1000-cycle mean is seen for increasing the number of cycles averaged above 10 cycles, as shown by the large reduction in CMRI values for 50 cycles (0.48) and 100 cycles (0.27). Averaging more than 100 cycles begins to give diminishing returns with averages of 200, 300, and 500 cycles giving CMRI values of 0.18, 0.14, and 0.10, respectively.
This suggests that for these flow conditions, an average of 100 cycles is sufficient to represent the flow field as a whole for measurements where a high throughput of test points is required. An average of 300 cycles provides an accurate representation of the mean flow field, while averaging more than 300 cycles may be considered to offer negligible benefit.
While the above treatment is appropriate for whole-field comparisons, in many cases key local features such as the flow over the intake valves, recirculation zones or flows near surfaces are targeted for CFD validation and detailed studies of flow characteristics (Buhl et al. 2017). In such cases, care must be taken to consider the spatially resolved nature of the flow field variability as convergence of velocity components has been shown to depend on the location within the cylinder (Baum et al. 2014). This may be achieved by considering either the full CMRI fields or by restricting the spatial average to the region of interest.
Different operating conditions or measurement planes are likely to have different levels of cyclic variability of the flow field. Use of the CMRI to validate the choice of the number of cycles required to produce a representative mean flow field is recommended for each significantly different measurement condition.

Identification of representative cycles
The CMRI metric offers an opportunity for rapid, quantitative identification of cycles of interest within a large dataset. In-cylinder flow fields are often subject to significant cycleto-cycle variation and it is not necessarily the case that the mean flow field is representative of any single cycle, with implications for the validity of comparisons of mean fields with RANS simulations. The CMRI can be used to rapidly sort a dataset with hundreds of cycles by the quality of the vector-wise match in both alignment and magnitude to the mean flow field.
An example 300 cycle, higher frame rate (every 2°CA) dataset has a mean flow field at 80°CA bTDC given by Fig. 11a. The single cycle which provides the best match to the mean flow field at 80°CA bTDC as identified by the CMRI is shown in Fig. 11b. For this engine operating condition, it is clear that there is a single cycle which can be considered to be representative of the mean cycle as this best-matched cycle shares the velocity magnitude and directional characteristics of the mean field with a well-defined single tumble vortex.
In contrast, the cycle with the worst match (highest CMRI value, Fig. 11c shows the tumble vortex centre displaced by 10 mm towards the exhaust side of the cylinder, with a large region of high velocity upwards flow near the centre of the field-of-view, directed towards the inlet port. Figure 11 demonstrates that there is significant cycle-tocycle variation in the flow under the engine operating conditions of this work. Cyclic variability of the in-cylinder flow field is an area of great interest in engine research. The strength of cycle-to-cycle variations has shown correlation with the variability of IMEP (Clark et al. 2018) and strong variations in flow direction and magnitude from the ensemble average have been observed in the region of the spark plug (Müller et al. 2010).

Quantification of cyclic variability
For investigations into in-cylinder flow field variability, Reynolds decomposition of the instantaneous velocity field into a fluctuation velocity field ′ and an ensemble average velocity field , where = + � , is commonplace (Braun et al. 2019). These velocity fluctuations, ′ , may be considered to arise from both cyclic variability in bulk flow features and small-scale fluctuations due to turbulence. Distinguishing between the contributions from each source for an experimentally obtained set of flow fields is non-trivial. Typical approaches include temporal filtering (Towers and Towers 2004;Aleiferis et al. 2017), spatial filtering (Clark et al. 2018) and POD mode partitions (Roudnitzky et al. 2006), in which a cutoff frequency, length or POD mode number, respectively, is selected to isolate large scale cyclic variations from small-scale turbulent motion. For large datasets containing a well-defined flow feature, such as a late compression tumble vortex centre, conditional sampling may be used to reduce the contribution of cyclic variation to a measurement of turbulent velocity fluctuations (Zentgraf et al. 2016). The velocity fluctuations quantified by the CMRI in this work encompass both cyclic variations and turbulent fluctuations. Analysis of cyclic variability as distinct from the turbulent contribution will be addressed in future work.
The CMRI can be used to quantify the spatial distribution of velocity fluctuations at each crank angle by comparing each individual cycle to the mean flow field and averaging the resulting CMRI values over all cycles. Figure 12 highlights examples of such averaged CMRI fields from the lower frame rate (every 10°CA), 1000-cycle dataset. During the intake stroke, the greatest variability is found in the region where the lower edge of the high velocity intake jet interacts with the partially established tumble flow, with mean CMRI values above 0.35 at the top of the CMRI field at 200°CA bTDC (Fig. 12a). For early compression the mean CMRI values are around 30% lower due to the well-established tumble motion which results in lower variability (Fig. 12b). For the second half of the compression stroke, the individual cycle flow fields are well matched to the mean field towards the exhaust side of the measurement plane. However, cyclic variability in the shape and location of the tumble vortex centre contributes to a region of high CMRI values on the inlet side of the flow field which, as the piston rises, moves up towards the region of the spark plug (Fig. 12c). This region of high velocity fluctuation reaches the vicinity of the spark plug (blanked for these experiments) to coincide with a typical spark timing of 30°CA bTDC. The potential for this variability to influence the flame development and hence combustion performance will be investigated in future work.

Conclusions
Quantitative metrics for the comparison of in-cylinder flow fields have been detailed in this work which mitigate the high sensitivity of existing metrics to regions of low velocity. The weighted relevance index (WRI) and weighted magnitude index (WMI) quantify spatially-resolved differences in flow field alignment and magnitude, respectively, using a function of the local velocity as a weighting factor.
Application of the WRI and WMI metrics to PIV measurements in the tumble plane of an optically accessible SI engine has demonstrated the robustness of the metrics near the tumble vortex centre and the generation of reliable spatially averaged metric values for quantifying differences between in-cylinder flow fields.
The WRI and WMI were normalized and combined to provide a single metric for comparison of differences in both alignment and magnitude between flow fields, the combined magnitude and relevance index (CMRI). The rescaling of the WRI and WMI metrics in the calculation of the CMRI restricts the comparison of CMRI values to flow fields within the dataset used for normalization. As the normalization dataset may, and should be, chosen to contain all the flow fields of interest, this ensures equal weighting is given to alignment and magnitude differences relevant to the selected dataset, whether subtle differences in a small, low variability dataset or large differences across many experimental conditions.
Quantitative vector comparison metrics such as the RI, MSI and this work's WRI, WMI, and CMRI each have advantages. For robust comparisons of both magnitude and direction, the CMRI is well suited to identifying cycles or features of interest within large datasets which can then be investigated in more detail.
The CMRI metric was used to determine the number of cycles required to provide a representative mean flow field for the conditions of this work. Individual flow fields which provided the best and worst match to the mean flow field were identified using the CMRI. A region of high variability, Fig. 12 Mean CMRI fields calculated by averaging the CMRI fields obtained by comparing each of 1000 single cycle flow fields to the 1000-cycle mean flow field for a 200°CA bTDC, b 80°CA bTDC and c 40°CA bTDC. Vectors represent velocities of the mean flow field resulting in large CMRI values, during the second half of the compression stroke was found in the vicinity of the blanked spark plug.
Future measurements under fired operation will investigate the influence of cyclic variability on combustion. Any cycle which combustion analysis identifies as having particularly good or poor combustion can also be rapidly matched to similar flow fields from other cycles using the WRI, WMI and CMRI metrics. This will enable investigations into the correlation of specific flow features with combustion quality within this engine and improve the validation of CFD simulations using experimental flow fields.