Investigation of unsteady secondary flows and large-scale turbulence in heterogeneous turbulent boundary layers

Following the findings in \cite{wangsawijaya2020}, we re-examine the turbulent boundary layers developing over surfaces with spanwise heterogeneous roughness of various roughness wavelengths $0.32 \leq S/\overline{\delta} \leq 3.63$, where $S$ is the width of the roughness strips and $\overline{\delta}$ is the spanwise-averaged boundary-layer thickness. The heterogeneous cases induce counter-rotating secondary flows, and these are compared to the large-scale turbulent structures that occur naturally over the smooth wall. Both appear as meandering elongated high- and low-momentum streaks in the instantaneous flow field. Results suggest that the secondary flows might be spanwise-locked turbulent structures, with $S/\overline{\delta}$ governing the strength of the turbulent structures and possibly the efficacy of the surface in locking the structures in place (most effective when $S/\overline{\delta} \approx 1$). Conditional averages of the fluctuating velocity fields of both spanwise heterogeneous and smooth wall cases result in structures that are strongly reminiscent of the streak-vortex instability model. Secondary flows and large-scale structures coexist in the limits where either $S/\overline{\delta} \gg 1$ or $S/\overline{\delta} \ll 1$, where the secondary flows scale on $\delta$ or $S$, respectively. When $S/\overline{\delta} \gg 1$, the secondary flows are locked about the roughness transition, while relatively unaltered large-scale structures occur further from the transition. In the case where $S/\overline{\delta} \ll 1$, $S$-scaled secondary flows are confined close to the surface, coexisting with unaltered larger scale turbulent structures that penetrate much deeper into the layer.


1. Introduction
We consider a specific case of heterogeneous roughness where the roughness varies in the spanwise direction. Spanwise heterogeneity is imposed by alternating rough and smooth strips to form a test surface over which a turbulent boundary layer is developed (figure 2). This type of roughness heterogeneity induces secondary flows in the form of counterrotating streamwise rollers, which are apparent in the time-averaged velocity field. An examination of the instantaneous velocity field, however, reveals the secondary flows as elongated meandering high-and low-speed streaks, not unlike the large-scale/very-largescale motions (LSM/VLSM) that occur naturally in wall-bounded turbulence (Wangsawĳaya et al. 2020).
LSMs have commonly been associated with hairpin packets (Adrian et al. 2000;Tomkins & Adrian 2003) and -scaled meandering high-and low-momentum streaks (Hutchins & Marusic 2007a,b) in the outer layer of wall-bounded turbulent flows, where is either the boundary layer thickness, channel half-height, or pipe radius. In the logarithmic region, clusters of hairpin packets agglomerate to form VLSM or 'superstructures' (Kim & Adrian 1999;Guala et al. 2006;Balakumar & Adrian 2007;Hutchins & Marusic 2007a;Dennis & Nickels 2011b;Lee & Sung 2011;Hutchins et al. 2012;Wu et al. 2012). The imprint of symmetrical hairpin vortex packets is evident in certain statistical analyses of these structures. For example, two-point correlations of the fluctuating flow field exhibit an elongated lowmomentum streak flanked by high-momentum streaks in the spanwise direction (Tomkins & Adrian 2003;Ganapathisubramani et al. 2003Ganapathisubramani et al. , 2005Hutchins et al. 2005;Hutchins & Marusic 2007a;Marusic et al. 2010;Dennis & Nickels 2011a). However, Johansson et al. (1991) cautioned against this interpretation of the two-point correlation contours. Ensemble averaging and assumptions of spanwise homogeneity, as typically applied in the computation for smooth wall-bounded turbulence, enforce a plane of symmetry in the resulting conditional average. Asymmetrical large-scale structures (one-sided roll modes) have, in fact, been observed instantaneously in turbulent boundary layers formed over smooth walls (Lozano-Durán et al. 2012;Kevin et al. 2019a), heterogeneous roughness (Vanderwel et al. 2019;Wangsawĳaya et al. 2020), and converging-diverging (C-D) riblets (Kevin et al. 2017). Elsinga et al. (2010) observed that hairpin packets are most likely comprised of arch-like or cane-shaped structures. Similar to the near-wall cycle, an alternative model for the formation mechanism has been suggested for coherent structures in the outer layer. Large-scale elongated streaks with a sinuous instability and associated asymmetric staggered quasi-streamwise vortices have been observed in the logarithmic region and beyond (Flores & Jiménez 2010;Cossu & Hwang 2017;de Giovanetti et al. 2017), which are similar to, but at a much larger scale than, structures associated with the streak-vortex instability, which was initially developed as a model for near-wall streak formation (Jeong et al. 1997;Waleffe 2001;Schoppa & Hussain 2002).
The naturally occurring large-scale structures and the secondary flows induced by spanwise heterogeneity share some similarities: both are characterised by roll modes and elongated high-and low-momentum streaks. An unsteadiness or streamwise periodic behaviour of the secondary flows have also been inferred from previous studies of spanwise heterogeneous roughness through the 1-D energy spectrograms (Nugroho et al. 2013;Awasthi & Anderson 2018;Medjnoun et al. 2018;Zampiron et al. 2020;Wangsawĳaya et al. 2020), two-point correlation maps (Kevin et al. 2017(Kevin et al. , 2019bWangsawĳaya et al. 2020), and POD (proper orthogonal decomposition) of the turbulent fluctuation fields (Vanderwel et al. 2019). It was suggested in Wangsawĳaya et al. (2020) that this unsteadiness is a function of the spanwise roughness wavelength Λ = 2 , where is the width of the roughness strip. The secondary flows strongly meander when / ≈ 1, with a greater meandering amplitude as compared to the LSM/VLSM of smooth-wall turbulent flows and the secondary flows in the limiting cases where / 1 or / 1. These observed similarities and differences pose questions about the nature of the secondary flows imposed by surface roughness in comparison to the large-scale structures in wall-bounded turbulence. The similarities might suggest that secondary flows and large-scale structures share the same formation mechanism (a notion alluded to by Townsend 1976, p. 328-331). If that is the case, (i) is it possible that secondary flows are just phase-locked large-scale structures (and, large-scale structures are just non-phase-locked secondary flows)? Given the unsteadiness of secondary flows noted above, (ii) can this be explained as the natural meandering process of the large-scale structures? In Chung et al. (2018), the isovels of the mean streamwise velocity showed that in the limiting case scenarios where / 1 or / 1 the secondary flows are confined within certain parts of turbulent boundary layer while other regions approach locally homogeneous conditions. This leads to the final question about (iii) the extent to which the secondary flows and the naturally present turbulent structures coexist in boundary layers formed over spanwise heterogeneous roughness. To answer these questions, we conduct an analysis of the fluctuating velocity components obtained from particle image velocimetry (PIV) measurements on turbulent boundary layers developing over surfaces composed of streamwise-aligned, spanwise-alternating sandpaper and cardboard strips (figure 2). The test surfaces cover a range of spanwise wavelength 0.32 / 3.63, where is the spanwise-averaged boundary layer thickness at the measurement station.
The axis system in this study = ( , , ) is defined as the streamwise, spanwise, and wallnormal directions, respectively, which corresponds to the instantaneous velocity components = ( , , ). As illustrated in figure 1, is triple decomposed into its temporal-, spatialaverage, and the fluctuations (Raupach & Shaw 1982;Finnigan 2000;Coceal et al. 2006 where (figure 1a) is the Reynolds (temporal) average, and (figure 1f) is the turbulent fluctuations about this Reynolds average. is further decomposed into its -average Λ (figure 1d) and the spatial fluctuations about this mean (figure 1e). Since Λ = Λ = 0, = ( , , ). With this chosen decomposition method for spanwise heterogeneous roughness, can be considered as the stationary components of the secondary flows (or the dispersive components) and are both the advecting turbulence and the unsteadiness of the secondary flows. We also introduce the quantity (see 1.3), which is defined as ≡ + (figure 1h). It should be noted that for the reference smooth-wall case SW-2, as a result of spanwise homogeneity, = 0 and = .

Test surfaces
The measurements are performed in an open return boundary layer wind tunnel in the Walter Basset Aerodynamics Laboratory at the University of Melbourne using the same experimental set-up and test surfaces as Wangsawĳaya et al. (2020). The spanwise heterogeneous roughness ('SR') surfaces are constructed from spanwise-alternating strips of P-36 grit sandpaper ('rough' patch) and cardboard ('smooth' patch) of equal width (figure 2), with minimal variations in surface elevation between the two. Throughout this report, the rough patches are shaded black and the smooth strips are shaded white. This study considers measurements Figure 1: Triple-decomposition of (a) instantaneous snapshot streamwise velocity into (d) -average Λ , (e) time-average, spatial fluctuation , and (f) instantaneous snapshot of turbulent fluctuation for case SR50 ( / = 0.62). In (b), Λ is the mean swirl strength multiplied by the sign of streamwise vorticity Ω /|Ω | and normalised by / ∞ . Red dashed lines illustrate the extent of non-zero Λ , whose width is . (c) shows the variance of streamwise turbulent fluctuation . (g) contours of time-averaged streamwise velocity . Vectors indicate and , downsampled for clarity. Solid white lines mark the three spanwise locations related to the mean secondary flows: common flow up ( u ), centre of a mean secondary flow ( c ), and common flow down ( d ). Black and white patches indicate 'rough' and 'smooth' strips, respectively. (h) Contours of , which is defined as ≡ + . over heterogeneous surfaces of various at = 4 m downstream of the sandpaper trip located at the inlet of the wind tunnel test section, covering a range of 0.32 / 3.63. For comparison to SR cases, measurements are also conducted over a reference smooth-wall ('SW') case at the same ≡ ∞ / as the SR cases, where ∞ is the freestream velocity. The details of spanwise heterogeneous and smooth wall reference cases are summarised in table 1. Note that the '-2' suffix in SR250 and SW cases refer to measurements at = 4 m, such that it is consistent with the nomenclature in Wangsawĳaya et al. (2020).

Particle image velocimetry (PIV)
PIV measurements are conducted over the test surfaces in two planes: stereoscopic PIV (SPIV) in the cross-stream ( -) plane and wall-parallel PIV (WPPIV) in the streamwisespanwise ( -) plane (figure 2). Measurements in both planes are non-time-resolved and non-simultaneous. The SPIV plane is located at = 4 m downstream of the trip, coinciding with the WPPIV plane which spans 3.5 4.01 m. SPIV images are captured by two pco.4000 cameras in forward scatter arrangement, which gives the field of view (FOV) of 4 × 3 ( × ). For WPPIV, the FOV is obtained by stitching images from three pco.4000  Table 1: Summary of spanwise heterogeneous roughness cases and the reference smooth-wall cases. is the spanwise-averaged 98% boundary-layer thickness of the surface with spanwise heterogeneity, while is the 98% boundary-layer thickness of the reference smooth-wall case. is the spanwise-averaged momentum thickness of the spanwise heterogeneous surfaces, while is the momentum thickness of the reference smooth-wall case. Reynolds number definitions are: ≡ ∞ / , ≡ ∞ / , ≡ ∞ / , and + ≡ / , where is the friction velocity. ℎ is the wall-normal location of the wall-parallel PIV laser sheet, measured from the wall. cameras, resulting in a FOV of total size 9 × 5 ( × ). The wall-normal location of the WPPIV laser sheet relative to the wall ℎ varies between SR cases (see table 1), depending on whether the secondary flow sizes are governed by or (see equation 3.1 in Wangsawĳaya et al. 2020). For the cases where / 1 (SR250-2, SR160, and SR100), the sheet is located at ℎ / ≈ 0.5, while for / < 1 (SR50 and SR25), the sheet is located at ℎ / ≈ 0.5. To accommodate the variation of ℎ , WPPIV measurements for the reference smooth-wall case SW-2 are conducted in two -planes, at ℎ / = 0.46 and 0.24. It should be noted that for SR250-2 and SR160 cases, only half of the spanwise roughness wavelength is captured in the SPIV and WPPIV images due to the limited FOV width. The complete description of the SPIV and WPPIV experimental set-ups are given in the appendix A and B of Wangsawĳaya et al. (2020).

Meandering of secondary flows
In Wangsawĳaya et al. (2020), meandering of the low-speed streaks, presumably the manifestation of the secondary flows in the instantaneous flow field, is inferred from the -plane by a spanwise leaning behaviour and asymmetry of the low-speed features. That is, the structures lean sideways (in ) depending on the sign of , with the intermediate cases ( / ≈ 1) showing the strongest leaning amplitude (figure 18 in Wangsawĳaya et al. 2020). In the wall-parallel ( -) plane, meandering was implied by the two-point correlations of , showing a strong periodicity in the cases where / ≈ 1 when computed at certain locations ( figure 19 in Wangsawĳaya et al. 2020). In the current study, analysis of the WPPIV data (for the reference smooth wall case and spanwise heterogeneous roughness) is extended to permit further examination of this meandering behaviour. Further analysis of the similarities (and differences) between the secondary flows and naturally occurring LSMs/VLSMs in homogeneous canonical flows is also possible.
We attempt to reconstruct the meandering of large-scale structures and secondary flows through conditional averaging of the fluctuating velocity field. Figure 3 shows the instantaneous low-speed structures from a single representative snapshot taken from the WPPIV measurements for the reference smooth wall case SW-2 (figure 3a) at / = 0.46 and all SR cases (figure 3b-f) at a wall-normal location that corresponds to the approximate centre of the roll-modes associated with the mean secondary flows. Gray coloured contours show negative fluctuations of ≡ + (total velocity with the global -average subtracted), / ∞ < −0.03. To limit the analysis to long, large-scale structures, the velocity field is filtered with a box filter of size 0.1 × 0.1 for SW-2 and 0.1 × 0.1 for SR cases and only structures with length 3 ( 3 for SW-2) are retained for analysis. The 'spine' of each detected low-speed region is constructed from the spanwise midpoint of the structure at all streamwise locations along the length of the detected feature (gray solid lines, in figure 3). This 'spine' is further smoothed with a 1-D low-pass filter whose length is ( for SW-2), shown by the black solid lines ( ) in figure 3. Conditional averaging of the turbulent fluctuation (instead of ) is computed at the minima (in ) of the smooth spines fitted to the detected low-speed structures, as marked by the '+' symbols in figure 3. Figure 3(d,e) also shows how the meandering of low-speed structures is clearly 'phaselocked' about the spanwise location of the common flow up of the mean secondary flows (marked by dashed lines, and u ). This is expected since and is phase-locked. Ensemble averaging of the total velocity field, as shown in the contours of swirl strength Λ (figure 4), reveal time-averaged large-scale secondary flows, even for cases where / 1 (figure 4a) and / 1 (figure 4c). Based on the time-averaged secondary flows depicted in figure 4, it can be assumed that the secondary flows in the instantaneous velocity fields meander about a certain spanwise location for all / cases. Here, it is assumed that the secondary flows due to spanwise heterogeneity cause low-speed streaks to meander about , the spanwise location of common flow up ( u in figure 3 and 4), spanning the area shaded by red in figure 3. This area spans ± (figure 3b), where is the width of the mean secondary flow roll-mode, as illustrated in figure 1(b) and 4. Under this assumption, all detected low-speed structures could be classified as either secondary flows due to spanwise heterogeneity (red shaded area) or LSM/VLSM over homogeneous roughness regions in the cases where / > 1 (blue shaded area in figure 3b-d). In the cases where / < 1 (figure 3e,f), = and all detected low speed structures will be categorized as belonging to the secondary flows; hence this categorisation is somewhat flawed. It should be noted that although the secondary flows fill the entire spanwise extent of the turbulent boundary layers in these cases, larger structures whose scale is also coexist with the secondary flows. However, these two cannot be distinguished in cases where / 1 because the currently available WPPIV snapshots in the -plane are obtained at a ℎ height that is centred on the roll modes and also because the method used to separate secondary flows and LSM/VLSM is based only on the spanwise location of the secondary flows (and not the spanwise lengthscale or wall-normal extent of the detected structure). A method to discriminate secondary flows from large scale structures for the case where / 1 based on POD (proper orthogonal decomposition) filtering is proposed in §4.2.2. The locations of the wall-parallel slices relative to the secondary flows and the locations of red-and blue-shaded regions in -plane are illustrated in figure 4. For all subsequent conditional averaging, features are assigned to the red or the blue regions based on which region the detected y-minima of the low-speed structures (which is the condition vector) resides. Figure 5 shows the histogram of the detected low speed streaks (identified in the manner depicted in figure 3) for all SR cases, split into those that we crudely classified as secondary flows (occuring within the red regions of figure 3) and LSM/VLSM (occurring within the blue regions). The histogram counts the observed minima (denoted by the black + sign in figure 3) in these two regions. The probability of the occurrence of long, low-speed structures are distributed equally across the span of the FOV in the reference smooth wall case SW-2 (figure 5a). For the case SR250-2 ( / = 3.63, red bars in figure 5b) and SR160 ( / = 2.28, figure 5c), the low-speed structures related to the secondary flows comprise 41% and 74% of all structures detected across the FOV, respectively (as a reference the red shaded regions associated with the secondary flows consist of 38% and 53% respectively of the available total area in these cases). The secondary flows dominate as / approaches 1 (86% of detections occur within the red regions for case SR100, which occupy 40% of the total area, see figure 5d), and they are also clearly 'phase-locked' to the location of common flow up (case SR50, figure 5e). For the smallest / case (case SR25, figure 5f), the spines are more evenly distributed across the span compared to cases SR100 and SR50 (figure 5d,e), with a hint of some residual spanwise locking of the structures (higher probabilities over common flow up regions). Figure 6 shows the conditional average of filtered streamwise (figure 6a,c) and spanwise (figure 6b,d) turbulent fluctuations for the reference smooth wall case SW-2 at / = 0.46. The subscript ' ' denotes the velocity fields filtered with a box filter of 0.1 × 0.1 size (0.1 × 0.1 for SR cases). Figure 6(a,b) shows conditionally averaged at the local minima of the spines of the detected low-speed structures as illustrated in figure 3(a), while figure 6(c,d) is conditionally averaged at the maxima of the detected low-speed structures (not shown in figure 3a). The contours of show a low-speed structure flanked by two high-speed structures meandering to the left and right depending on the reference location (minima or maxima) where the conditional average is computed. The meandering tendency is also shown in , where the conditional average at the minima of low-speed structures   largely correspond to > 0 (figure 3b) and the maxima to < 0 (figure 3d). Diagonal alignment of , similar to that observed in Sillero et al. (2014) andde Silva et al. (2018), is also apparent in these contours.
To obtain a complete picture of how the secondary flow meanders, similar conditional averaging is also computed in the -plane from SPIV measurements. Since the minima and maxima of the spine-fitted low-speed structure cannot be observed in the -plane, a different conditional averaging approach must be taken to detect these same events. Informed by the conditional averages shown in figure 6, we elect to use the a simultaneous detection criteria of negative and either > 0 or < 0 to approximately detect the minima and maxima of the fitted structure spines (cases shown in figure 6a,b and c,d respectively). The conditional average is computed at the common flow up ( u in figure 1g) in and at / = 0.1, as close to the wall as the FOV permits. For the reference case SW-2, the average is computed at any point in along / = 0.1 where the conditions are satisfied. The conditions < 0, > 0 and < 0, < 0 are each satisfied for 25% of the smooth wall realisations. The velocity fields in the -plane are filtered with a box filter of size 0.1 × 0.1 (0.1 × 0.1 for SR cases). It should be highlighted that these condition vectors for the ensemble averaging differ between the -and -plane and are only intended to show the representation of the high-and low-speed structures to complement the conditional averages in the -plane. As a direct comparison, the conditional average at the exact same condition points inand -plane has also been computed, showing a good agreement between both planes (not shown here for brevity, but available in Wangsawĳaya 2020, p. 157-158).
Conditionally averaged for the reference smooth wall case SW-2 and all SR cases computed for features within the red-shaded region in figure 3 are shown in figure 7. The plots show a low-speed structure flanked by two high-speed structures in both the -(i) and -planes (ii). Subplot (i) shows the tendency of the structures in the cross-plane to lean sideways to the right when > 0, corresponding to the minima of in the wall-parallel plane (ii). The left-leaning tendency in the cross-plane for < 0, corresponding to the maxima of in the wall-parallel plane, is not shown for brevity. The leaning is strongly one-sided for the cases where / ≈ 1 in figure 7(d,e)(i), where the low-speed structures lean to one side and are flanked by asymmetric high-speed structures which are highly one-sided. For the reference smooth wall case SW-2 in figure 7(a) and the heterogeneous cases where / 1 (figure 7b,c), the sideways leaning of the low-speed event is less prominent with a more symmetric arrangement of flanking high-speed events. The conditionally averaged velocity fields in the -plane (ii) further confirm the differences between the smooth wall and the limiting cases compared to the / ≈ 1 cases. In the wall-parallel plane, the structures exhibit stronger meandering and asymmetry in figure 7(d,e)(ii) when → compared to the reference smooth wall and the limiting cases where or in figure 7(a-c,f). The shape of these structures provide additional evidence for the meandering inferred from the contours of normalised two-point correlation of in figure 19(e,f) in Wangsawĳaya et al. (2020), where a clear streamwise anti-phase pattern was exhibited by the / ≈ 1 cases. The approximate streamwise wavelength observed in figure 7 is / ≈ 4 (see figure 7(e)ii), similar to that observed in the contours of two-point correlation coefficients and spectrograms from hot-wire anemometry measurements for the same surfaces in Wangsawĳaya et al. (2020). Structures resulting from this conditional average for the limiting cases where / 1 and / 1 are further discussed in §4.2.1 and §4.2.2, respectively. We next attempt to quantify the meandering of the conditionally averaged structures in the -plane. This will supplement the quantification of the leaning angle in the -plane conducted in Wangsawĳaya et al. (2020). 'Spines', similar to those fitted to the instantaneous :ˆmeasured from the structures assumed to be LSM, when available (blue-shaded regions in figure 3) and :ˆmeasured from the structures assumed to be secondary flows (red-shaded regions in figure 3). Measuredˆof the reference smooth-wall case SW-2, : ℎ / = 0.24 and : ℎ / = 0.46. ×: of structures assumed to be LSM, ×:ˆof structures assumed to be secondary flows, both extracted from instead of (see appendix A for details).
low-speed structures in figure 3, are now fitted to the conditionally averaged low-speed structures in figure 7. The meandering amplitudeˆis defined as the average distance between the location of the spines at ∆ / = 0 and ∆ / ±2 (see figure 7(a)ii). It should be noted that the wall-normal location of the -plane (i.e. the WPPIV laser sheet location ℎ ) differs between cases, depending on the size of the secondary flows (table 1) -hence the measured is not directly comparable between SR and SW cases. Alternatively, meandering can also be quantified with the spanwise leaning angle in the -plane, ≡ 2 tan −1 (ˆ/2 ℎ ) (figure 8a). It should be noted that the definitions ofˆand are similar to those extracted from the conditionally averaged structures in the -plane for Wangsawĳaya et al. (2020) (cf. figure 17e and 18). Figure 8(b) showsˆnormalised by ℎ (left hand side abscissa) and (right hand side abscissa) of the secondary flows ( ) as a function of / ( ℎ is roughly the radius of the secondary flows, see figure 4). The red symbols on this figure show the meandering amplitude of the secondary flows as a function of / , and clearly this amplitude is maximum at / = 0.62 (SR50, / ≈ 1), similar to the trend previously reported for the -plane (figure 18 in Wangsawĳaya et al. 2020). The amplitude of the meandering normalised by the wall-normal sheet locationˆ/ ℎ is approximately equal to or less than 1 for the smooth wall case SW-2 and for the limiting cases ( / 1 and 1) and larger than 1 for the intermediate cases ( / ≈ 1). For the limiting cases / 1 ( / = 2.28 and 3.63), the magnitude ofˆmeasured at ℎ / ≈ 0.5 is closer to that of the reference smooth-wall case SW-2 at ℎ / = 0.46 (dashed line in figure 8b), while in the limit / 1,ˆmeasured at ℎ / = 0.18 is approximately equal to that of SW-2 at ℎ / = 0.24 (dash-dot line in figure 8b). This suggests that in the limiting cases where or , the meandering of the secondary flows reverts to smooth-like behaviour.
It is also important to note that while the contours in figure 7 show the conditionally averaged (and filtered) fluctuating velocity field , the condition points ('+' in figure 3) are extracted from for SR cases (which contains the stationary component of the secondary flows ) and from for the reference smooth-wall case SW-2 ( = 0 for this case). As a direct comparison, we compute the same conditional average of the maxima and minima of the low-speed structures with the spines extracted from (the non-stationary component of secondary flow) instead of for all SR cases. An example of this analysis is given in appendix A for case SR50 ( / = 0.62). The magnitude ofˆextracted from the field ('×' symbol in figure 8b) is approximately equal to that extracted from for the limiting cases / 1 and 1, and slightly smaller for the intermediate cases / ≈ 1. However, in general this illustrates that the choice of or for the condition vector makes very little difference in terms of the salient trends exhibited in figure 8(b). Regardless of the condition vector, the meandering amplitude of the secondary flows exhibit a clear peak when / ≈ 1.

Secondary flows and large-scale structures
The similarities and differences between secondary flows (intermediate cases, figure 7d,e) and the large-scale motions (SW case, figure 7a) raise many important questions. Firstly, is it possible that secondary flows due to spanwise heterogeneity and large-scale motions share similar formation mechanisms? Some parallels regarding the formation mechanism have been suggested. For example, Lee et al. (2019), when studying VLSMs in canonical smooth wall pipe flow, have associated their formation with instantaneous lateral variations of the wall shear stress of homogeneous turbulent pipe flows. Secondary flows, on the other hand are also associated with stationary or persistent lateral variations in the wall shear stress (Townsend 1976). In this sense, both naturally occurring large-scale structures and secondary flows are both triggered by lateral stress variations (the former convecting and transient, and the latter stationary). Figure 9(a,b) show the 3-D reconstruction of the largescale streaks from -and -plane for case SW-2 and SR100 ( / = 1.35), respectively †. The yawed and inclined asymmetric roll modes can be inferred from the in-plane vorticity (grey-shaded contours in figure 9b)  . This leads to other questions: if it is possible that both secondary flows and large-scale structures share a similar formation mechanism, is it also possible that the secondary flows are just phase-locked large-scale structures? If that is the case, why do the secondary flows strongly meander only when / ≈ 1, as shown in figure 8(b)? Finally, we ask if the secondary flows and the large-scale structures coexist with each other in certain heterogeneous wavelengths. In the next section of this study, we attempt to address these questions.

Phase locking
The 1-D spanwise energy spectra, related to spanwise wavenumber and wavelength , are computed from the fluctuating velocity field obtained from SPIV measurements. At any wall-normal location in the FOV, the non-normalised two-point correlation of the fluctuating velocity component is given bŷ where the overbar denotes ensemble averaging at all and for all SPIV realizations and ∆ is the spanwise shift. The Fourier transformation ofˆ yields the energy spectra of the fluctuating velocity component where is the spanwise wavenumber and = 2 / is the spanwise wavelength. The relationship between the Reynolds stress component and Φ is given by Due to the limited spanwise extent of the FOV, the velocity field is padded with zeros in to increase the length of the signal to three times the total width of the FOV (from 4 to about † It should be noted that the condition vectors for the ensemble averaging differ between the -and -plane and these figures are only intended to show the representation of the high-and low-speed structures above the reference smooth wall case and an intermediate case. 12 ) and thus increase the resolution in and . This method for 1-D spanwise energy spectra computation, however, must be applied with caution for the spanwise heterogeneous roughness cases. Figure 1(f) shows the instantaneous turbulent fluctuation component for case SR50 ( / = 0.62), whose mean (for all snapshots) across the repeating period of the spanwise heterogeneous roughness is zero. Its variance , however, is heterogeneous in (see figure 1c). Using this method, integration of the energy spectra across in (4.3) results in the average of in , and yields no information regarding the spanwise heterogeneity of the flow. Figure 10(i) shows the premultiplied energy spectra Φ for the reference smooth wall case SW-2 (figure 10a(i)) and SR cases: SR250-2, SR50, and SR25 (figure 10b(i)-d(i), respectively). In general, all SR cases have higher energy than the reference smooth wall case SW-2, which is expected since the presence of surface roughness results in higher magnitude of energy (when normalised by ∞ ). Further, all cases (SR and SW-2) also show an outer peak ('+') at / ≈ 0.2 and / ≈ 1 ( / ≈ 0.2 and / ≈ 1 for SW-2) which is associated with the width and spacing between large-scale low-and high-speed streaks for the large-scale and very large-scale motions (LSM/VLSM). It is important to note that Φ does not contain information regarding the stationary (time-averaged) secondary flows. Instead, this is contained in (figure 10(ii)). Figure 10(i) contains information about non-stationary turbulent fluctuations, and these seem largely similar between the smooth and heterogeneously rough surfaces. The contours of spanwise energy spectra for SR cases calculated from the SPIV data also do not contain a clear imprint of the timedependant (meandering) secondary flows, unlike the 1-D streamwise energy spectra Φ (see Wangsawĳaya et al. 2020, figure 13 and 14), which is expected since this assumed meandering behaviour is related primarily to the phase of the spanwise Fourier modes which are not analysed in the amplitude spectra (although increased meandering might affect the magnitude of the resolved Φ energy). It is also worth noting that compared to other SR cases, the magnitude of Φ is the lowest for case SR50 (figure 10c(i)) -the case which shows the strongest outer peak in Φ and the most prominent meandering (Wangsawĳaya et al. 2020). To understand this phenomenon, another attempt is made to examine the characteristics of the secondary flows that appear in the spanwise energy spectra. Instead of the turbulent fluctuations, the energy spectrograms are computed for the time-averaged spatial velocity fluctuations (figure 1e), which carries the footprint of the stationary (time-averaged) secondary flows. The method for computation is similar to that of turbulent fluctuations in (4.1)-(4.3). To ensure zero mean across , the FOV is reflected for the largest cases (SR250-2 and SR160) so that it captures one spanwise roughness wavelength Λ = 2 . For the cases where / 1: SR100, SR50, and SR25, the FOV is clipped so that it captures an integer number of spanwise wavelengths, Λ, 2Λ, and 4Λ, respectively.
Figure 10(ii) shows the premultiplied energy spectra of . As expected, the magnitude of Φ is zero for the reference smooth wall case SW-2 in figure 10(a)(ii). Clear, prominent modes in the energy spectra are observed in all SR cases in figure 10(b)(ii)-(d)(ii). These peaks are related to the mean secondary flows and are expected to occur at = 2 , i.e. the spanwise roughness wavelength, except for the case where / > 1. Here, for case SR250-2 ( / = 3.63, figure 10b(ii)), the peak is observed at / ≈ 0.6 ( / ≈ 2). This observation is in line with the finding in Wangsawĳaya et al. (2020); that the secondary flow size is capped by instead of for this case (see figure 12a). The prominent mode is locked at = 2 for cases where / 1. Contours of Φ show a very strong mode at / = 2 for case SR50 ( / = 0.62, figure 10c(ii)) and a much weaker one for case SR25 ( / = 0.32, figure 10d(ii)). Similar to previous observations regarding the strength of mean secondary flows (Wangsawĳaya et al. 2020), the strongest magnitude of energy in occurs at SR50 ( / = 0.62) and it decreases as approaches / 1. The premultiplied energy spectra of and seem to show opposite tendency for the SR50 case: when compared to the rest of the SR cases, the magnitude of Φ exhibits a minimum while the magnitude of Φ is maximum (see figure 10c(i) and 10c(ii)). To further examine this, Φ is integrated across the area enclosing the outer peak (black boxes in figure 10 Integrated energy spectra of and are shown in figure 11 as functions of / (dashed lines show the reference smooth wall case SW-2). The lines in figure 11 suggest a relationship between and : as / approaches 1, and reach a maxima and minima, respectively. As / 1, the rise of is accompanied by a decrease in . In some sense this fits with the conceptual picture that the secondary flows are spanwise-locked large-scale structures. Under this assumption, SR50 ( / = 0.62) presumably is the case where the locking is most complete, since the secondary flows are the strongest and fill the entire wall-normal and spanwise extent of the boundary layer (Wangsawĳaya et al. 2020). If the secondary flows can really be viewed as locked turbulent structures, it seems reasonable to assume that for heterogeneous surfaces that generate secondary flows some of the large-scale structure energy will be transferred from turbulent fluctuations to the dispersive component .  figure 11 and figure 10a(ii)), and the turbulent structures are randomly occurring (completely unlocked), so all energy ends up in the component. It is noted that the cases where / 1 and / 1 in figure 11 (SR25, / = 0.32 and SR250-2, / = 3.63) approach this condition, with the integrated energy in approaching the smooth wall reference case. A possible conclusion from the above analysis is that for / ≈ 1, the turbulent structures are optimally locked or trapped by the surface, and hence energy from is surrendered into (which respectively reach a minima and a maxima at these / ). However, this suggested behaviour is complicated somewhat by the observed meandering behaviour in §3. It is noted in this study, and in that of Wangsawĳaya et al. (2020), that the meandering of the secondary flows increases above that of the naturally occurring turbulent structures when / → 1. Such behaviour is not easily reconcilable with the notion of secondary flows as locked turbulent structures and is perhaps indicative of some additional instability or forcing when secondary flows are locked at particular spanwise wavelengths.

Coexistence between secondary flows and the large-scale structures
Coexistence between the VLSM and secondary flows was hinted at in Zampiron et al. (2020) at larger spanwise wavelengths, where these two features exist at a very different scale in the energy spectrograms. At both limits, when / 1 and when / 1, the secondary flows are confined in certain areas of the surface such that we might expect the LSM/VLSM to exist in a relatively unaltered form for large areas of the flow, especially when we are far from the secondary flows, e.g. far from the roughness transition for the case with , or > for the case where ( figure 12). What follows is an attempt to separate the secondary flows due to spanwise heterogeneity and (presumably) unaltered, naturally occurring LSM/VLSM in the limiting cases: / 1 ( §4.2.1) and / 1 ( §4.2.2). Conditional averaging and POD analysis are conducted for the two largest wavelength cases: SR250-2 ( / = 3.63) and SR160 ( / = 2.28), and the smallest wavelength, SR25 ( / = 0.32). 4.2.1. Limiting case: / 1 Figure 3(b,c) show the detected low-speed structures and the minima of the spines of these structures at an instantaneous velocity field of limiting cases SR250-2 ( / = 3.63) and SR160 ( / = 2.28), respectively, taken from WPPIV measurements approximately at the center of the mean secondary flows ( / ≈ 0.5). Instantaneously, the large-scale structures induced by spanwise heterogeneity meander about a certain spanwise location, which results in -scaled secondary flows in the time-averaged velocity field near the interface between rough and smooth strips (see Wangsawĳaya et al. 2020, figure 11). Here, it is assumed that the low-speed structures related to the secondary flows (upwelling motions) meander about the spanwise location of common flow up ± , where is the spanwise extent of the mean secondary flows. This area is shaded red in figure 3. Far removed from the secondary flows, the flow becomes locally homogeneous (either homogeneously smooth or homogeneously rough). In figure 3(b), areas shaded in blue (closer to the centerline of smooth and rough strips) represent this condition. It is assumed that secondary flows occur in the red-shaded area, while LSM/VLSM occur in the blue-shaded area (these two terms are used here to distinguish between structures that are imposed or locked by the roughness heterogeneity and naturally occurring turbulent structures, respectively). Histograms in figure 5(b,c) show that the secondary flows (red bars) comprise 41% and 74% of all low-speed structures detected across the FOV for case SR250-2 and SR160, respectively (compared to respective areas occupied by the red regions of 37% and 54% of the FOV), and thus LSM/VLSM (blue bars) comprise the rest (59% and 26%).
Similar to the analysis conducted in §3, the conditional average is also calculated at theminima and -maxima of the spines fitted to detected low-speed structures and in the -plane from SPIV measurements, using a different but related condition vector. For the -plane, the average is computed at / = 0.1, based on the condition of and (see §3). Figure 13 shows the conditional average of case SR250-2 (figure 13b,c) compared to the reference smooth wall case SW-2 (figure 13a). The conditional average for the secondary flows ('SF') due to spanwise heterogeneity given in figure 13(b) is computed at the spanwise location of common flow up ( u ) in subplot (i) and (iii). It is computed at the minima and maxima of the detected low-speed structures inside the red-shaded area (figure 3b) in subplot (ii) and (iv). The conditional average for the LSM/VLSM is computed at / = −0.72, close to the centerline of a rough strip ( / = −1). A one-sided leaning tendency is observed in the conditionally averaged secondary flows (figure 13b). However, both secondary flows and LSM/VLSM (figure 13c) have similar shape and size (when scaled by ) to the LSM/VLSM in the reference smooth wall case.
A cursory inspection of figures 13(b) and (c) suggest that the LSM/VLSM are stronger (higher in magnitude) than the secondary flows. This is expected since the secondary flows are assumed to occur above the interface between rough and smooth strips, while the detected LSMs/VLSMs are mostly obtained above rough strips (figure 4a), where the turbulent energy is higher (note that the conditionally averaged in figure 13 is normalised by ∞ ). This observation, although not shown for brevity, also holds for SR160 ( / = 2.28). Comparing figures 13(a) and (b), we observe that the LSM/VLSM of the reference smooth-wall case SW-2 is slightly stronger than the secondary flows of SR250-2 case. However, despite these minor differences, the overarching impression from figure 13 is the striking similarity between the smooth wall LSMs/VLSMs and both the secondary flows and LSMs/VLSMs that occur in the large scale limiting spanwise heterogeneity case ( ). A comparison of the magnitude of meandering between the secondary flows and LSM/VLSM is shown by the blue and red symbols in figure 8(b). Recall that this meandering amplitude is measured from the 'spines' extracted from the conditionally averaged lowspeed structures (figure 7a). This comparison is only possible for the range of spanwise heterogeneous wavelengths (1.35 / 3.63), where the red and blue regions of figure 3 can both be defined. At smaller wavelengths, the secondary flow regions (defined as ± ) occupy the entire spanwise domain and so the LSM/VLSM region cannot be identified. The trend shows thatˆ(normalised by the ℎ /size of the roll modes) of secondary flows increases as / approaches 1, butˆof the LSM/VLSM, whether it is extracted from or fields, remains approximately constant. More importantly, as / becomes large in case SR250-2, we note from figure 8(b) that the meandering amplitude of both the secondary flows and the LSMs/VLSMs seem to converge to the same value, which is close to that recorded for the smooth wall. Again this reconfirms the general underlying similarity between the conditional features presented for the smooth wall and case SR250-2 in figure 13.

Limiting case: /
1 For the smallest / case, SR25 ( / = 0.32), the WPPIV measurement plane is set as close as possible to the centre of the secondary flows at / = 0.18, while the diameter of the secondary flows is approximately 0.32 . As shown in figure 4(c), the secondary flows fill the entire spanwise extent at this wall height (see also red shaded area in figure 3f). A similar conditional average at the minima and maxima of the detected low-speed structures in theplane and at the common flow up in the -plane as that in §3 and §4.2.1 is also computed for SR25 case. Figure 7(f) shows that the conditionally averaged low-speed structures for this case do not seem to show a marked difference to the LSM/VLSM in the reference smooth wall case. The meandering amplitude for this case (figure 8b) is also approximately equal to that of the reference smooth wall case at / = 0.24. These observations for the / 1 case reveal the problem of using spanwise locations to separate secondary flows and LSM/VLSM. This strategy works for / 1 cases because both secondary flows and LSM/VLSM are both -scaled and the secondary flows are confined about the roughness interface, while the rest of the flow approaches local homogeneity (smooth wall or homogeneous rough wall). However, for the other limit where / 1, the secondary flows and LSM/VLSM coexist in different scales. The LSM/VLSM are -scaled, while the secondary flows are scaled by ( ) and aligned according to the roughness strips. For case SR25, specifically, the spanwise scale of the secondary flows is approximately 0.32 ≈ . Hence, to study the coexistence between LSM/VLSM and secondary flows in this limit where / 1, a different method is necessary to separate the two.
We propose 'snapshot' proper orthogonal decomposition (POD) as a possible method to separate LSM/VLSM and secondary flows in the SR25 case. POD for fluid mechanics applications was first introduced by Lumley (1967) and the algorithm used in the present study is the so-called 'snapshot' POD (Sirovich 1987, see also Meyer et al. 2007 for details). In the context of PIV data, each instantaneous velocity field is considered as a 'snapshot' and the fluctuating velocity components of snapshot , = ( , , ), can be written as a linear expansion where is the th POD mode, is the POD coefficient of mode of snapshot , and is the total number of snapshots. In snapshot POD, the number of resolved POD modes is equal to the number of snapshots, which corresponds to 4800 for the spanwise heterogeneous cases in the -plane (1200 for the reference smooth wall case SW-2) and 1200 snapshots in the -plane (600 for SW-2). It is noted that the POD modes are ordered according to their contribution to the total turbulent kinetic energy such that the first mode 1 has the largest fraction of total energy, followed by the second mode 2 , and so forth. Figure 14 shows POD modes of streamwise velocity fluctuation for case SR25 in the -plane. Three modes are selected: mode = 1, 5, and 18, which contribute to 3.3%, 2.2%, and 0.9% of the total kinetic energy, respectively. All three selected modes show a spanwise periodic pattern of low-and high-speed streaks (blue and red filled contours, respectively). Such streaks could be due to either LSM/VLSM or heterogeneity-induced secondary flows. To measure the 'scale' of turbulence in each mode, the Fast Fourier Transform (FFT) is computed for each at a reference wall-normal location / = 0.1 (as close to the wall as the FOV permits, see solid black lines in figure 14a-c). The 1-D power spectral density of at / = 0.1 is defined as where is the th Fourier coefficient, * is its complex conjugate, and is the spanwise wavenumber. Figures 14(d-f) show the 1-D energy spectra premultiplied by of mode 1, 5, and 18, respectively. These figures show that the spanwise periodic pattern observed in  figure 14(a-c) corresponds to a dominant spanwise wavelength , i.e. maximum Φ . Mode 1, for example, has the dominant / ≈ 1.5, while the dominant wavelength for mode 5 and 18 are / ≈ 1 and ≈ 0.64, respectively. Dominant spanwise wavelengths are then computed for all 4800 resolved POD modes and separated into two groups: 'large' scales (dominant / > 0.64, presumably related to LSM/VLSM) and 'small' scales (dominant / 0.64 = 2 for case SR25 which will contain a mix of secondary flows due to spanwise heterogeneity as well as smaller scale non-stationary turbulent features). With this threshold for 'large'/'small' scale separation, the POD modes associated with 'large' and 'small' scales make up 0.6% and 99.4% of all resolved modes, but contribute to 33.7% and 66.3% of the total kinetic energy, respectively. The fluctuating velocity fields are then reconstructed from both 'large' and 'small' scale POD modes in equation 4.7. Figure 15   instantaneous reconstructed only from POD modes whose dominant / > 0.64 ('large' scales), and figure 15(c) is reconstructed only from 'small scales' ( / 0.64). A similar strategy to separate turbulent scales related to LSM/VLSM and the secondary flows is also applied for the fluctuating velocity fields in the -plane (WPPIV data) at / = 0.18. This wall-normal location of the -plane is close to the centre of the secondary flows, which is estimated at / ≈ 0.16, / ≈ 0.5. To obtain the 'scales' of turbulent flows, FFT is once again computed for each in both the -and -directions. The 2-D power spectral density of in the -plane is defined as where is the streamwise wavenumber. The maxima of the premultiplied 2-D energy spectra of each POD mode Φ corresponds to the dominant streamwise and spanwise wavelength ( and ) of each mode. It should be noted that the accuracy of this method to detect dominant and is limited by the streamwise and spanwise extent of the FOV. Similar to the POD modes of in the -plane, in the -plane are also separated into two groups based on the dominant : 'large' scales (dominant / > 0.64) and 'small' scales (dominant / 0.64 = 2 ). No such threshold for scale separation is applied for the dominant . With this threshold for 'large'/'small' scale separation, the POD modes in the -planes associated with 'large' and 'small' scales make up 6.3% and 93.7% of all resolved 1200 modes, but contribute to 32.8% and 67.2% of the total kinetic energy, respectively. Figure 16 illustrates the fluctuating velocity fields reconstructed from both 'large' and 'small' scale POD modes in equation 4.7. The conditional average of turbulent fluctuation is computed at the minima and maxima of the low-speed structures in theplane. The same algorithm to detect 'spines' of the structures and the minima/maxima in  figure 17(b) for the 'small' scales (gray filled contours are / ∞ < −0.03). Due to the decreasing length of the structures detected as the 'small' scales ( figure 16c and figure 17b), only structures whose length is 2 are included in the computation (this criterion for low-speed structure detection is lower than that in §4.2.1). Figure 18 shows the histogram of the -minima of the detected low-speed structures constructed from large (figure 18a) and small scales (figure 18b). The smaller scales exhibit a phase-locking behaviour of the structures, with higher possibility of the spines detected over the common flow up. This phase-locking behaviour is still apparent (to lesser extent) in the larger scales since is used for detection (cf. figure 3f for spine detection without scale separation). With this criterion for low-speed structure detection, 40% of the detected streaks belong to the small scales, and 60% belong to the large scales. Conditional averages of are computed in the -and -planes for both 'large' and 'small' scales. In the -plane, the condition point of ('+' in figure 19i and iii) is at / = 0.1 (as close to the wall as the FOV permits) and at the spanwise locations of common flow up (marked by u , centre of the smooth strips for this case) for consistency with the previous analysis in §3 and §4.2.1 (for 'larger' scales, the resulting conditionally averaged structures are insensitive to the spanwise location of the condition vector). The conditions for the -plane are as follows: < 0 (low-speed streaks) and > 0 or < 0 (low-speed streaks) and < 0. In the -plane, the condition point is at the -minima and -maxima of the spines fitted to the detected low-speed streaks, which corresponds to > 0 and < 0 (see figure 6 for an example). To provide a valid comparison, the same POD and conditions are also applied to the reference smooth wall case SW-2 with appropriate scaling ( instead of ). For the smooth case, the velocity field is also separated into 'large' (POD modes with dominant / > 0.64) and 'small' scales ( / 0.64). In the smooth -plane, the condition point of is at / = 0.1 and spanwise homogeneity is assumed. For the smooth -plane, only structures with length 2 are included and spanwise homogeneity is also assumed. With this criterion for low-speed structure detection, 13% of the detected streaks belong to the small scales, and 87% belong to the large scales. Figure 19(a,b) show the contours of conditionally averaged 'large'-scale for the reference smooth wall case SW-2 and case SR25 ( / = 0.32), respectively. Conditionally averaged in the -plane is shown in subplot (i) and (iii). The -plane (subplot ii and iv) is located at / = 0.24 for SW-2 and / = 0.18 for SR25 (close to the centre of the secondary flows). The contours show the structures leaning to the left and right, similar to those shown in §3 and §4.2.1. It is interesting to note, however, that when only 'large' scales (i.e. scales that are larger than the spanwise heterogeneity) are considered, the structures of SW-2 and SR25 are identical, further suggesting that in the case of spanwise heterogeneity where the roughness / 1, scales that are can be considered as the naturally occurring turbulent structures and they exist in a relatively unchanged form compared to those observed in the reference smooth wall. This is also in line with Townsend's outer layer similarity for rough walls. As / becomes very small, the wall condition approaches large scale homogeneity, and we might expect that beyond the roughness sublayer ( > , see Chan et al. 2018), outer layer similarity should be preserved. Locking of large-scales now would be minimal, and it would only be scales that were close to = 2 that we would perhaps expect to be locked by the spanwise heterogeneity. Figure 20(a,b) show the contours of conditionally averaged 'small'-scale for the reference smooth wall case SW-2 and case SR25 ( / = 0.32), respectively. In the -plane, the structures for both SW-2 and SR25 are capped in the wall-normal direction at / 0.32 ( / 0.32), as suggested by Chan et al. (2018), who observed that the roughness sublayer height is approximately half of the spanwise wavelength of the roughness. However, a clear spanwise periodic pattern is observed in the the SR25 case (figure 20b, subplot i and iii), which is less apparent in the smooth wall reference (figure 20a, subplot i and iii). The wavelength of this spanwise periodic pattern is 2 (which is also the spanwise roughness wavelength Λ), as shown by the dashed lines in figure 20(b)(iii). A slight misalignment is attributed to the condition of , such that structures lean slightly to the left and right. In the -plane, a similar pattern is also observed. The pronounced spanwise periodicity for the SR25 case is largely absent for the smooth wall reference. Furthermore, the streaks for case SR25 appear to be elongated in (approximately 3-4 long, figure 20(b)ii and iv) to a greater extent than those observed for SW-2 (∼ 2 ). This length is similar to the streamwise wavelength associated with the additional energy spectra peak (see Wangsawĳaya et al. 2020, figure 14f), which has been previously associated with meandering of the secondary flows. It is important to note that the conditional averages shown in figure 20 are for , the convecting non-stationary turbulent component. A locked fluctuation such as this is distinct from the stationary secondary flows (which would appear in , as shown in figure 20c). A possible explanation for these elongated streaks would be a meandering behaviour of the secondary flows occurring at the interface between the rough and smooth strips. The pronounced spanwise periodicity exhibited for case SR25 in figure 20 is more difficult to explain, but implies cross-talk between adjacent secondary flows such their meandering is in-phase. The results presented in figures 19 and 20 strongly suggest that the secondary flows and naturally occurring -scaled LSM/VLSM co-exist in the case where / 1. Withscaled features residing close to the wall ( < ) that are locked to the phase of the spanwise heterogeneity, and with superimposed large-scale features that are virtually unchanged from averaged (small-scale supplemented with ) for case SR25 at / = 0.18. Conditions: (i) < 0 and > 0, (ii) < 0 and < 0 at '+', (iii) minima and (iv) maxima of detected low-speed structures (at '+', / ∞ < −0.03) illustrated in figure 17(b) (refer to §3 for the method used to extract the 'spines' of low-speed structures). In (b)(iii) and (iv), dashed lines ( ) show the width of the roughness strips . those occurring over smooth surfaces, exhibiting no spanwise locking or alteration due to the heterogeneity.

Conclusions
We conduct an analysis of secondary flows and perturbed turbulent boundary layers resulting from spanwise varying surface conditions within a range of spanwise half-wavelength 0.32 / 3.63. In Wangsawĳaya et al. (2020), it was suggested that / governs the size and strength of the secondary flows. The latter is maximum for intermediate cases ( / ≈ 1), which suggests two possible scenarios: either (i) that these cases induce the strongest secondary streamwise vortices or (ii) if secondary flows may be considered as spatially locked turbulent structures, that these are more effectively locked in place for these heterogeneous wavelengths. Present results suggest that (ii) is viable. Following this scenario, we might consider the secondary flows (instantaneously) as spanwise-locked large-scale turbulent structures. The 1-D spanwise energy spectra (figure 10 and 11) suggests that there is an interplay between the stationary secondary flows and the turbulent fluctuations, where energy of the first might leech into the latter, and this is also governed by / . In the intermediate cases ( / ≈ 1) where the secondary flows are space filling (hence, effectively locked), the energy deposited into the stationary component and turbulent fluctuations reach maximum and minimum, respectively. This might further suggest that / determines the efficacy of roughness wavelengths in locking the secondary flows/turbulent structures in place.
In addition to being spanwise locked, it was also suggested in Wangsawĳaya et al. (2020) that the secondary flows exhibit a quantifiable streamwise unsteadiness, which was interpreted as a statistical evidence for meandering with a preferred streamwise wavelength when / ≈ 1 (Wangsawĳaya et al. 2020, see figure 15, 18, and 19). In the current study we reveal the strongly meandering structures through conditional averaging of for both SR cases and the reference smooth-wall case. The resulting structures for both of these cases are strongly reminiscent of the streak-vortex instability model proposed in Jeong et al. (1997) In the limits where / 1 and / 1, it is possible to examine the coexistence of secondary flows and the naturally occuring large-scale structures. In the cases where / 1 both the secondary flows and large-scale structures are -scaled. The first are locked about the roughness transition and still carry the imprint of meandering secondary flows, although not as strong as the intermediate cases, while the latter occur farther from the transition and are identical to those observed in the reference smooth wall case (figure 13). In the other limit where / 1, secondary flows and large-scale structures scale on and , respectively. Using a POD-based filter, each velocity field snapshot can be separated into scales > or . The conditional average of of the larger scales show that the structures of turbulence in the limiting case ( / 1) and the reference smooth wall are identical ( figure 19), suggesting that structures with spanwise scales > 2 are unaffected by the heterogeneity. The smaller scales for the spanwise heterogeneous cases, however, exhibit the imprint of secondary flows leeching into , characterised as long meandering spanwise alternating streaks that are locked and aligned with the roughness strips. One outstanding question that remains unanswered in the present study is the cause of the prominent meandering of the turbulent structures, which is only observed when / ≈ 1. This will be an interesting question to address in the future.
Funding. This research is supported by the Australian Research Council Discovery Project (DP160102279) and the Office of Naval Research (BRC N00014-17-1-2307).

Declaration of interests. The authors report no conflict of interest.
Data availability statement. The data that support the findings of this study are available from the corresponding author (D.D.W.). The spine extraction method for both and velocity fields is the same: both are filtered with a box filter of 0.1 × 0.1 size, the gray-coloured contours in figure 21 are / ∞ < −0.03 and / ∞ < −0.03, respectively, and only structures longer than or equal to 3 are kept for the analysis. For comparison between and , we introduce three parameters related to the extracted spines: the length of the spine relative to the streamwise extent of the FOV , the location of the minima/maxima relative to the spine, and the location of the spine relative to the common flow up ( u in figure 21). Figure 22(a,e) shows the histogram of the length of the extracted spines from and velocity fields, respectively. When the field is used for extraction, the spines are likely to extend across the streamwise extent of the FOV ( / = 1). The spines are mostly shorter ( / = 0.5) when is used instead of . This is expected since the stationary component of the secondary flows has an infinite mode in , which is present for but removed for . The histograms of the streamwise location of the minima of the extracted structures relative to the start of the detected structure (see '+' and the definition of in figure 21) from and fields are shown in figure 22(b,f), respectively, while the histograms for the maxima are shown in figure 22(c,g). The histograms illustrate the location (of the minima and maxima) relative to the extracted spines / . Here, / = 0 means that the minima/maxima is located at upstream end of the spine, while / = 1 means that it is located at the downstream end. Figure 22(b,c,f,g) shows that is roughly evenly distributed across 10-90% length of the spines when either or is used for extraction. Lastly, we also examine the spanwise locking of the low-speed structures. We compute the distance between the location of the spines and the location of common flow up (dashed black lines in figure 21). Here, is the -average of all extracted spines (solid black lines in figure 21). Figure 22(d,h) shows the histograms of the calculated distance between the spines and common flow up normalised by when and field are used for extraction, respectively. Here, ( − )/ = 0 is the center of a smooth strip (which coincides with the common flow up) and ( − )/ ± 0.5 is the interface between a smooth strip and adjacent rough strips (figure 1). The histograms show that the extracted spines from are more likely to be locked on the common flow up ( ) compared to those extracted from , which is expected since is a minima at , and hence we are much more likely to detect a minima in ≡ + at this location.
We repeat the computation of the conditionally averaged fluctuating velocity field previously introduced in §3 at the minima and maxima of the spines extracted from field (instead of ). It should be noted that the conditional average is computed for filtered turbulent fluctuation , but the condition points differ between the spines extracted from and field (see '+' in figure 21). Contours of conditionally averaged of case SR50 ( / = 0.62) are shown in figure 23(a,c) for condition points extracted from and figure 23(b,d) from . Both cases show blue-filled contours (low-speed structures) flanked by red-filled contours (highspeed structures), but the strength of flanking high speed events seems stronger and more symmetrically arranged about the low speed streak for (figure 23b,d) than (figure 23a,c). Further, the amplitude of meandering for is only slightly lower than that of . This suggests that the choice of or makes very little difference in the resulting conditionally averaged structures, and explains the very marginal influence of choice of condition vector evident in figure 8(b).