Applying a New Force – Velocity Synchronizing Algorithm to Derive Drag Coefficients of Rigid Vegetation in Oscillatory Flows

Coastal vegetation is effective in dissipating incident wave energy during storm conditions, which offers valuable protection to coastal communities. Determining vegetation drag coefficient (CD) is of great importance to the quantification of vegetation-induced wave dissipation. Recently, a direct measuring approach has been developed to derive vegetation drag coefficient more accurately compared to the conventional calibration approach. However, as this approach requires perfectly in-phase force and velocity signals, there are two difficulties associated with it. The first difficulty is the availability of a suitable force sensor to compose synchronized force–velocity measuring systems. The second difficulty is related to realigning the obtained timeseries of force and velocity data. This technical note develops a new synchronized force–velocity measuring system by using standard force sensors and an acoustic doppler velocimeter (ADV). This system is applied together with an automatic realignment algorithm to ensure in-phase data for CD deviation. The algorithm reduces the phase shift between force–velocity signals from ca. 0.26 s to 0.003 s. Both time-varying and period-averaged CD can be obtained using this method. The derived CD can be used to accurately reproduce the measured maximum total acting force on vegetation (R2 = 0.759), which shows the reliability of the automatic alignment algorithm. The newly-developed synchronized force–velocity measuring system and alignment algorithm are expected to be useful in future experiments on vegetation–wave interactions with various hydrodynamic and vegetation settings.

The main impact of vegetation on incident waves is exerting an additional force on water motion [21,22].This force can be described by the Morison equation, which is composed by drag force (F D ) and inertia force (F M ) [23].For normal field conditions, the drag force is the dominant force, and most relevant for wave energy dissipation.In the Morison equation, F D is proportional to the square of impact velocity on vegetation stems.When the velocity scale is determined, the magnitude of F D varies linearly with vegetation drag coefficients (C D ).In oscillatory (wavy) flows, the C D values have a large range of variations (i.e., 0.1 to 100) [24].The C D values depend on canopy density, hydrodynamic conditions, as well as the morphology of the individual canopy elements.Thus, choosing appropriate C D values are important for accurate simulation of F D , and the resultant wave dampening in many modelling studies [18,[25][26][27][28][29][30].
Currently, there are two methods available in determining C D : the calibration method and the direct measurement method.The calibration method is a convectional method developed in the 1990s [31,32], and has been widely used since [33][34][35].It derives C D by calibrating its values to obtain the best fit between modelled and measured wave height evolution over vegetation fields.The direct measurement method is a new method, which has been developed since the 2010s [36][37][38].This method directly applies the Morrison equation and measured in-phase force and velocity data to determine C D .The main differences between the calibration and the direct measurement method are: (1) the calibration method can only provide period-averaged C D , but the direct measurement method can derive both period-averaged and time-varying C D ; (2) the direct measurement method can eliminate the potential errors often associated with the calibration method, and lead to C D -Re (Reynolds number) relations with better fits, which are desirable for model applications [37].
Since the direct measurement method relies on in-phase force and velocity data, there are two difficulties when applying this method.The first difficulty is the availability of suitable force sensors to assemble synchronized force-velocity measuring systems.The force sensors should be waterproofed and durable in wave flumes, where frequent water logging and splashing occur.Additionally, the sensors should be small enough to fit into wave flumes.The second difficulty associated with this method is the data processing technique required to obtain perfectly aligned force-velocity data for C D derivation [37].The data alignment is critical for the direct measurement method, as there are time lags between original force data and velocity data signals (ca. 0.2 s), which may lead to large errors in the derived C D .These time lags may originate from small misalignments between force sensors and velocity measurement [37].They may also be induced by intrinsic time shifts in instrument recordings.The maximum wave energy dissipation occurs at the peak wave orbital velocity in phase with the peak drag force when C D values matter the most.Thus, in order to obtain accurate C D values, it is important to minimize the time lags.Previous studies firstly set an intrinsic time lag between the force and velocity data, and then started iterations to reduce the time lag.Note that this intrinsic time lag varies with different instrument set-ups.This intrinsic time lag needs to be carefully tuned to obtain in-phase data.It is, however, preferable to have an automatic algorithm that can provide generic solutions to the alignment problem.
In this technical note, we have developed (1) a synchronized force-velocity measuring system by using standardized force sensors that can easily fit in wave flumes; (2) and an automatic alignment algorithm to obtain in-phase force-velocity data for C D derivation.The new force-velocity measuring systems are applied in a flume at four locations in a mimicked mangrove canopy, which were tested with various simulated wave conditions.The automatic alignment algorithm was then applied to reduce the time lags between force-velocity signals.The processed data were subsequently used to derive both time-varying and period-averaged C D .To evaluate the accuracy of the derived C D (and also the alignment algorithm), we used the derived C D to reproduce the total acting force on mimicked vegetation, and compared it with the measurements.
The rest of the technical note is organized as follows: Section 2 introduces the automatic alignment algorithm and the set-up of the synchronized force-velocity measuring system in the wave flume at the Fluid Mechanics Laboratory at Sun Yat-sen University, Zhuhai Campus.Section 3 demonstrates the original and processed force-velocity data, as well as the reproduced force data results.Section 4 discusses the current limitations and provides an outlook for future applications of this method.Finally, Section 5 provides conclusions of the current note.

The Direct Measuring Method for C D Derivation
The force acting on a single stem can be expressed by Morison equation [23] as where F is the total acting force on vegetation which can be obtained by force measurement.F D is drag force, and F M is inertia force.ρ is the density of the fluid.C D and C M are the drag and inertia coefficients, respectively.h v is the height of vegetation in water, and b v is the diameter of circular cylinder.U is the depth-averaged flow velocity.When linear wave theory is applied, the U varies as a function of sine: where U w is the amplitude of horizontal wave orbital velocity.Following linear wave theory, U w can be expressed as where H is wave height, T is wave period, k is wave number, h is water depth, and Z 0 is the vertical position of the considered point, which is 0 at the still wave level, and −h at the sea bed.Equation (3) was used to estimate U w when the velocity measurement is unavailable.C M is often assumed to be equal to 2 for cylinders (e.g., [39]).To derive the time-varying C D , we can apply the following equation: where F M can be derived based on ∂U ∂t using the timeseries of velocity data, and other parameters (i.e., ρ, b v , h v , C M ) in F M are known.Thus, time-varying C D can be obtained readily when in-phase force and velocity data is obtained.
Period-averaged C D is relevant to vegetation-induced wave dissipation.It was not computed as the temporal mean of the time-varying C D .Time-varying C D has great variability over one wave period [37].Specifically, its value is infinite when the velocity is close to zero.However, those C D values are not relevant for vegetation-induced wave energy dissipation, as dissipation is highest at the velocity peaks.Thus, C D values at high velocity matter the most.To obtain relevant period-averaged C D values, the direct measurement method applies the technique of quantifying the power and work done by the acting force (ε) [37].The time-varying power of F D and F M is evaluated as follows: The work done by the total acting force (F) over a wave period (T) is If we substitute F with Equation ( 1), then we obtain W D and W M is the work done by F D and F M over a full period, respectively.As U is a sine function (Equation ( 2)), the work done by F M over a full wave period (i.e., second term on the right) is zero.Thus, the work done by F is equal to the work done by F D : Finally, the period-averaged C D can be derived based on the above equation: The in-phase time series data of total force (F) and velocity (U) can be used directly in Equation ( 10) to drive period-averaged C D values.As W is proportional to U 3 (Equation ( 9)), the integration of FU over a period is largely contributed to by the moments with relatively high velocity, and to a very limited extent, by the moments with low velocity.Thus, deriving period-averaged C D via the technique of quantifying ε can automatically assign large weight to the moments with high velocities in a wave period, resulting in most relevant C D values for wave dissipation analysis.To check the validity of the direct measuring method, we used the derived period-averaged C D values to reproduce the total acting forcing (F rep ) using Equation ( 1), and compare it with the actual measurement.Additionally, another reproduced total force F rep ' is included by assuming C D = 1.It is used as a reference for the F rep .

Synchronized Force-Velocity Measuring System
In-phase force-velocity data are critical to the direct measurement method.To obtain in-phase data, a synchronized force-velocity measuring system was developed, which was composed by a force sensor and an acoustic doppler velocimeter (ADV) (Figure 1a,d).Four measuring systems were deployed in the wave flume at Fluid Mechanics Laboratory at Sun Yat-sen University, Zhuhai Campus (Figure 1a).The wave flume is 20 m long, 0.8 m wide, and 0.6 m deep.A series of capacitance-type wave gauges were installed to monitor wave height changes in the wave flume.The mimicked vegetation canopy was 8 m long, and it was constructed by PVC pipes.The pipes were 0.2 m tall and their diameter was 0.02 m.The mimicked vegetation canopy was built following a stagger pattern with a density of 139 stems/m 2 .It was built on top of a false bottom in order to elevate the canopy so that the force sensors can be mounted underneath it.The mimicked vegetation canopy was submerged in water (water depth = 0.25 m), and it was subjected to various wave conditions.The tested wave height varied from 0.03 to 0.09 m, and the tested wave period varied from 0.6 to 1.2 s.A space-averaged C D can be obtained by taking the mean C D values of the four measuring spots in each test.
The force sensors selected were model M140 built by Utilcell, Spain (Figure 1b).As the size of this sensors is small, they can be installed at multiple locations in one flume test.The reading of the sensor is in "gram", which can be easily translated into "Newton" by multiplying the acceleration of gravity.The minimum division of the sensor is 3 × 10 −3 N, and the maximum measuring load is 30 N. In the current experiment, the measuring frequency of the force sensors is set as 20 Hz.These sensors were chosen also because they are robust and can be easily waterproofed by sealing the cable connection point with glue.Furthermore, the sensor is small (15 cm × 4 cm × 2.5 cm), and can be easily fitted in the flume (Figure 1b).To prevent the sensor being affected by any force acting on itself, an aluminum case was put around the sensor.
For each force sensor, a mimicked vegetation stem (PVC pipe) was firmly screwed to it, so that the force acting on a vegetation stem can be detected (Figure 1b).The PVC pipes that were attached to the force sensor were not different from other pipes in the mimicked vegetation canopy.After the sensor was attached to a PVC pipe, it measured the total acting force on the pipe.For the same force, the reading is constant, regardless of the location of the acting force.This is desirable for our current experiment, in which wave-induced forces acted over the full length of the pipe.Additionally, the sensors can detect the force in both the following and the opposing direction as the wave propagation, which is ideal to measure the force generated by oscillatory flows.
Water 2018, 10, x FOR PEER REVIEW 5 of 18 the reading is constant, regardless of the location of the acting force.This is desirable for our current experiment, in which wave-induced forces acted over the full length of the pipe.Additionally, the sensors can detect the force in both the following and the opposing direction as the wave propagation, which is ideal to measure the force generated by oscillatory flows.As a first test of the force sensors, we put known weights on one of the sensors attached with PVC pipes.This sensor was held horizontally in this test.The obtained readings were subsequently compared to the known weights.Different weights were put at three different positions on the pipe, i.e., bottom, middle, and tip.The generated forces were in both positive and negative directions.The comparison between the readings and the weights is listed in Table 1.It is clear that for the force measurement in both directions, the relative errors of the sensors are within 1%, compared to the known weights.This first test shows that the force sensors can provide precise measurements.
For the velocity measurement, we used four ADVs.They were deployed at the same crosssection as the force sensors to obtain roughly synchronized signals.The cases wave0312 (3 cm wave height and 1.2 s wave period) and wave0709 (7 cm wave height and 0.9 s wave period) were selected to conduct velocity profile measurements in order to obtain information on velocity structure and depth-averaged in-canopy velocity.The profile was obtained by manually adjusting the vertical measuring location of the ADVs in repeated sequences.For most cases, the velocity measurement was taken at half of the water depth, which was a representative value of the depth-averaged incanopy velocity.The accuracy of this treatment is acceptable when the submergence ratio (i.e., h/hv = 1.25) is small [24,37] As a first test of the force sensors, we put known weights on one of the sensors attached with PVC pipes.This sensor was held horizontally in this test.The obtained readings were subsequently compared to the known weights.Different weights were put at three different positions on the pipe, i.e., bottom, middle, and tip.The generated forces were in both positive and negative directions.The comparison between the readings and the weights is listed in Table 1.It is clear that for the force measurement in both directions, the relative errors of the sensors are within 1%, compared to the known weights.This first test shows that the force sensors can provide precise measurements.
For the velocity measurement, we used four ADVs.They were deployed at the same cross-section as the force sensors to obtain roughly synchronized signals.The cases wave0312 (3 cm wave height and 1.2 s wave period) and wave0709 (7 cm wave height and 0.9 s wave period) were selected to conduct velocity profile measurements in order to obtain information on velocity structure and depth-averaged in-canopy velocity.The profile was obtained by manually adjusting the vertical measuring location of the ADVs in repeated sequences.For most cases, the velocity measurement was taken at half of the water depth, which was a representative value of the depth-averaged in-canopy velocity.The accuracy of this treatment is acceptable when the submergence ratio (i.e., h/h v = 1.25) is small [24,37], and it can significantly reduce the labor involved.Two of the ADVs were made by Nortek (Vectrino see http://www.nortekusa.com/usa/products/acoustic-doppler-velocimeters/vectrino-1), and the other two were made by SonTek (MicroADV, see https://www.sontek.com/argonaut-adv).These four ADVs are common instruments in fluid mechanics labs.Their basis measurement technology is coherent Doppler processing.They measure 3D water velocity of a small cylinder (i.e., within 1 cm 3 ) that is a few centimeters away from measuring probes in the water.They can measure at frequencies as high as 64 Hz, which are desirable for the direct measuring method.In our experiment, the ADV data acquisition followed their respective user manuals.The measuring frequency was set as 40 Hz in order to accommodate the measuring frequency of the force sensor (i.e., 20 Hz).The obtained data are filtered through a low-pass filter to remove high frequency spikes following a similar method described in Strom and Papanicolaou [40].a,b,c The 1st, 2nd, and 3rd time readings were taking when the weights were put at the bottom, middle, and tip of the testing pipe, respectively.

Automatic Alignment Algorithm
Although the force and velocity measurements were deployed at the same cross-section of the wave flume, it did not ensure perfectly in-phase data.In fact, small time lags commonly existed between the obtained original force and velocity time series.These time lags were induced by small misalignments between force and velocity measurement, and/or by intrinsic delays of these electronic devices.To reduce the time-lag between velocity and force measurement, the original force and velocity time series should be realigned.
According to the Morison equation [23], velocity (U) and drag force (F D ) should be in phase, which can be used to evaluate the time-lag between velocity and force measurement.A flow chart for the data realignment is shown in Figure 2. The inputs are the timeseries of force (F) and velocity (U).As we can assume that C M = 2 [39], the inertia force can be calculated based on the velocity.Then, the drag force (F D ) can be computed by subtracting inertia force (F M ) from the total force (F).Subsequently, we can determine the phase shift (∆t) between the velocity and drag force peaks.Lastly, this phase shift (∆t) will be recorded and used to adjust the velocity timeseries, aiming to obtain more in-phase velocity and force data.The obtained new velocity and force data will be used as input in the same loop.This loop continues 30 times, and we chose the minimum phase shift (∆t) and the resultant velocity and force timeseries as outputs for C D derivation.The automatic alignment algorithm is provided in the Appendix A as a MATLAB script.To verify the 30 loop count criterion, a sensitivity analysis is conducted by changing the loop count to 10, 20, 30, and 50.The resulting phase shifts with those loop counts are subsequently compared.

Velocity Profiles in the Vegetation Canopy
Figure 3 shows the velocity profiles were measured at location 3 in case wave0312 (3 cm wave height and 1.2 s wave period) and wave0709 (7 cm wave height and 0.9 s wave period).For the rest of the tested cases, velocity was measured at the half water depth as a proxy of depth-averaged incanopy velocity.Figure 3a shows that in the case wave0312, the velocity profiles are rather uniform in the vertical direction.The depth-averaged in-canopy velocity amplitude is 0.052 m/s, whereas Uw measured at the half water depth is 0.049 m/s.The difference between these two is small.The velocity profiles in wave0709 have greater vertical gradient, i.e., higher velocity at the top and lower velocity near the bottom.Overall, the difference between Uw measured at the half water depth (0.106 m/s) and the amplitude of depth-averaged in-canopy velocity (0.115 m/s) is small.Therefore, it is acceptable to use Uw measured at the half water depth as a representative value of the depth-averaged in-canopy velocity.

Velocity Profiles in the Vegetation Canopy
Figure 3 shows the velocity profiles were measured at location 3 in case wave0312 (3 cm wave height and 1.2 s wave period) and wave0709 (7 cm wave height and 0.9 s wave period).For the rest of the tested cases, velocity was measured at the half water depth as a proxy of depth-averaged in-canopy velocity.Figure 3a shows that in the case wave0312, the velocity profiles are rather uniform in the vertical direction.The depth-averaged in-canopy velocity amplitude is 0.052 m/s, whereas U w measured at the half water depth is 0.049 m/s.The difference between these two is small.The velocity profiles in wave0709 have greater vertical gradient, i.e., higher velocity at the top and lower velocity near the bottom.Overall, the difference between U w measured at the half water depth (0.106 m/s) and the amplitude of depth-averaged in-canopy velocity (0.115 m/s) is small.Therefore, it is acceptable to use U w measured at the half water depth as a representative value of the depth-averaged in-canopy velocity.

Wave Height and Wave Orbital Velocity in the Mimicked Vegetation Canopy
Reductions of wave height (H) and magnitude of wave orbital velocity (U w ) through mimicked vegetation canopy can be observed in Figure 4.The wave height reduces continuously from the canopy front to the end.The final wave height reduction rate was 55% (Figure 4a).The shown wave orbital velocity is obtained by ADV measurement at location 1-3.The ADV measurement at location 4 failed during the experiment.The shown U w is obtained by using Equation (3) based on an average wave height between x = 6-8 m in Figure 4a.With the reduced wave height, the magnitude of wave orbital velocity also reduces from 0.155 m/s to 0.095 m/s from the beginning to the end of the canopy.The reduced wave orbital velocity leads to variations in acting force on vegetation stem as well as in vegetation drag coefficient (C D ), which are shown in the following sections.

Wave Height and Wave Orbital Velocity in the Mimicked Vegetation Canopy
Reductions of wave height (H) and magnitude of wave orbital velocity (UW) through mimicked vegetation canopy can be observed in Figure 4.The wave height reduces continuously from the canopy front to the end.The final wave height reduction rate was 55% (Figure 4a).The shown wave orbital velocity is obtained by ADV measurement at location 1-3.The ADV measurement at location 4 failed during the experiment.The shown UW is obtained by using Equation (3) based on an average wave height between x = 6-8 m in Figure 4a.With the reduced wave height, the magnitude of wave orbital velocity also reduces from 0.155 m/s to 0.095 m/s from the beginning to the end of the canopy.The reduced wave orbital velocity leads to variations in acting force on vegetation stem as well as in vegetation drag coefficient (CD), which are shown in the following sections.

Data Alignment and Time-Varying CD
The total acting force (F) and velocity measured at four locations in the wave flume are shown in Figure 5. Waves reach these four locations at different moments.The velocity data at the last measurement point were missing due to the failure of the ADV measurement.It is clear that the acting force (F) and velocity reduce as waves pass through mimicked vegetation canopy.It is also apparent

Data Alignment and Time-Varying C D
The total acting force (F) and velocity measured at four locations in the wave flume are shown in Figure 5. Waves reach these four locations at different moments.The velocity data at the last measurement point were missing due to the failure of the ADV measurement.It is clear that the acting force (F) and velocity reduce as waves pass through mimicked vegetation canopy.It is also apparent that there are time lags in synchronized force-velocity measurements at all locations.However, it should be noted that these seeming time lags (i.e., time shifts between F and U) are not the real time lags (i.e., time shifts between F D and U), which lead to errors in C D .
Water 2018, 10, x FOR PEER REVIEW 9 of 18 that there are time lags in synchronized force-velocity measurements at all locations.However, it should be noted that these seeming time lags (i.e., time shifts between F and U) are not the real time lags (i.e., time shifts between FD and U), which lead to errors in CD.Following the previous study [37], we only tracked the first 2-3 full wave periods after the startup, but before waves reached the back end of the flume, to avoid possible influence of wave reflection.Figure 5e shows the force and velocity data of the chosen first two wave periods after the start-up.Based on the original data and Equation (1), both FD and FM can be estimated as shown in Figure 5e.However, it should be noted that as the total force and velocity data are not in phase.The derived FD and FM are the first estimation.The derived peaks of the FD are even higher than the total force, which is not possible.This result highlights the necessity of obtaining in-phase data.Judging from the peaks between U and estimated FD peaks, the time lag between those two signals is 0.26 s.
In order to eliminate the time lags between these signals, the realignment algorithm was applied to obtain synchronized velocity and force data (Figure 6a-d).It is clear that after the realignment procedure, the time lag between U and FD is largely reduced (Figure 6a,b), but it cannot be completely eliminated, as small shifts in signal peaks and troughs still exist.Based on the phase shifts of the two peaks and two troughs (as indicated by the red double arrow lines), the time shift of the realigned U and FD is significantly reduced to 0.003 s, which is only 1% of the original time shift before the realignment.Note that this optimized time shift is the mean shift of the tested two wave periods (i.e., Following the previous study [37], we only tracked the first 2-3 full wave periods after the start-up, but before waves reached the back end of the flume, to avoid possible influence of wave reflection.Figure 5e shows the force and velocity data of the chosen first two wave periods after the start-up.Based on the original data and Equation (1), both F D and F M can be estimated as shown in Figure 5e.However, it should be noted that as the total force and velocity data are not in phase.The derived F D and F M are the first estimation.The derived peaks of the F D are even higher than the total force, which is not possible.This result highlights the necessity of obtaining in-phase data.Judging from the peaks between U and estimated F D peaks, the time lag between those two signals is 0.26 s.
In order to eliminate the time lags between these signals, the realignment algorithm was applied to obtain synchronized velocity and force data (Figure 6a-d).It is clear that after the realignment procedure, the time lag between U and F D is largely reduced (Figure 6a,b), but it cannot be completely eliminated, as small shifts in signal peaks and troughs still exist.Based on the phase shifts of the two peaks and two troughs (as indicated by the red double arrow lines), the time shift of the realigned U and F D is significantly reduced to 0.003 s, which is only 1% of the original time shift before the realignment.Note that this optimized time shift is the mean shift of the tested two wave periods (i.e., shifts of two peaks and two troughs).Apart from the reduced time shift, the magnitude of F D is also reduced to be lower than the total force (F), which is in line with the original Morison equation.It is noted that the peak drag force before alignment is about twice as large as the peak drag force after the alignment.Thus, if the original F timeseries were used, the derived drag coefficient would be considerably overestimated.
Water 2018, 10, x FOR PEER REVIEW 10 of 18 shifts of two peaks and two troughs).Apart from the reduced time shift, the magnitude of FD is also reduced to be lower than the total force (F), which is in line with the original Morison equation.It is noted that the peak drag force before alignment is about twice as large as the peak drag force after the alignment.Thus, if the original F timeseries were used, the derived drag coefficient would be considerably overestimated.Based on the synchronized velocity and force data and Equation ( 4), the time-varying CD can be derived (Figure 6e).The time-varying CD values vary periodically with the changing velocity signals.
The values are small when the velocity is large, but they reach to infinity when the velocity is close to zero.The reason for the unrealistically large CD values is because the FD are divided by very small velocity values in Equation ( 4).These unrealistically large CD values are not useful in modelling wave dissipation by vegetation, since they are associated with period with very low velocity when the energy dissipation is very limited.
To verify the loop count criterion applied in the realignment algorithm, a sensitivity analysis of the loop is conducted (Figure 7).It is clear that with the increase of loops, the phase shifts can be sufficiently reduced.When 30 loop count is applied, the phase shifts can be reduced to minimum, i.e., 0.003 s for the case 1 and almost zero for the case 2. If the number of loops is increased to 50, the time shifts cannot be further reduced.Thus, the results of sensitivity analysis indicate that applying 30 loop count in the realignment algorithm is a reasonable criterion.Based on the synchronized velocity and force data and Equation ( 4), the time-varying C D can be derived (Figure 6e).The time-varying C D values vary periodically with the changing velocity signals.
The values are small when the velocity is large, but they reach to infinity when the velocity is close to zero.The reason for the unrealistically large C D values is because the F D are divided by very small velocity values in Equation ( 4).These unrealistically large C D values are not useful in modelling wave dissipation by vegetation, since they are associated with period with very low velocity when the energy dissipation is very limited.
To verify the loop count criterion applied in the realignment algorithm, a sensitivity analysis of the loop is conducted (Figure 7).It is clear that with the increase of loops, the phase shifts can be sufficiently reduced.When 30 loop count is applied, the phase shifts can be reduced to minimum, i.e., 0.003 s for the case 1 and almost zero for the case 2. If the number of loops is increased to 50, the time shifts cannot be further reduced.Thus, the results of sensitivity analysis indicate that applying 30 loop count in the realignment algorithm is a reasonable criterion.Sensitivity analysis of the number of loops used in the realignment algorithm.Case 1 is the case wave0712 with 7 cm wave height and 1.2 s wave period, and case 2 is the case wave0512 with 5 cm wave height and 1.2 s wave period.

Deriving Period-Averaged CD
Based on the realigned force-velocity data, we can also derive period-averaged CD by quantifying the power and work done, FD and FM.It is clear that the time-varying power of FD is always positive, and its magnitude varies in phase with the velocity magnitude (Figure 8).For ideal sinusoidal velocity signals, PD at the velocity peaks should be equal to the troughs.However, in our test case (and in real field conditions), the wave orbital velocity is asymmetrical: higher in the positive direction and lower in the negative direction.Thus, PD is larger near the wave peaks and smaller near the wave trough.The difference between peaks and troughs are much more apparent in PD compared to the difference in velocity.It is because that PD is to the third power of velocity.Small asymmetry in velocity will be greatly magnified in PD.The variation of PM is different from that of the PD.It is clear that PM varies between positive and negative values.The zero-crossings in PM occur when velocity is zero or when velocity is at its maximum in both directions, i.e., when FM is zero in Equation (5).Note that there are small fluctuations at the peaks of the PD.These fluctuations may be induced by the small phase shifts between the FD and U timeseries.Velocity (m/s) . Sensitivity analysis of the number of loops used in the realignment algorithm.Case 1 is the case wave0712 with 7 cm wave height and 1.2 s wave period, and case 2 is the case wave0512 with 5 cm wave height and 1.2 s wave period.

Deriving Period-Averaged C D
Based on the realigned force-velocity data, we can also derive period-averaged C D by quantifying the power and work done, F D and F M .It is clear that the time-varying power of F D is always positive, and its magnitude varies in phase with the velocity magnitude (Figure 8).For ideal sinusoidal velocity signals, P D at the velocity peaks should be equal to the troughs.However, in our test case (and in real field conditions), the wave orbital velocity is asymmetrical: higher in the positive direction and lower in the negative direction.Thus, P D is larger near the wave peaks and smaller near the wave trough.The difference between peaks and troughs are much more apparent in P D compared to the difference in velocity.It is because that P D is to the third power of velocity.Small asymmetry in velocity will be greatly magnified in P D .The variation of P M is different from that of the P D .It is clear that P M varies between positive and negative values.The zero-crossings in P M occur when velocity is zero or when velocity is at its maximum in both directions, i.e., when F M is zero in Equation (5).Note that there are small fluctuations at the peaks of the P D .These fluctuations may be induced by the small phase shifts between the F D and U timeseries.Sensitivity analysis of the number of loops used in the realignment algorithm.Case 1 is the case wave0712 with 7 cm wave height and 1.2 s wave period, and case 2 is the case wave0512 with 5 cm wave height and 1.2 s wave period.

Deriving Period-Averaged CD
Based on the realigned force-velocity data, we can also derive period-averaged CD by quantifying the power and work done, FD and FM.It is clear that the time-varying power of FD is always positive, and its magnitude varies in phase with the velocity magnitude (Figure 8).For ideal sinusoidal velocity signals, PD at the velocity peaks should be equal to the troughs.However, in our test case (and in real field conditions), the wave orbital velocity is asymmetrical: higher in the positive direction and lower in the negative direction.Thus, PD is larger near the wave peaks and smaller near the wave trough.The difference between peaks and troughs are much more apparent in PD compared to the difference in velocity.It is because that PD is to the third power of velocity.Small asymmetry in velocity will be greatly magnified in PD.The variation of PM is different from that of the PD.It is clear that PM varies between positive and negative values.The zero-crossings in PM occur when velocity is zero or when velocity is at its maximum in both directions, i.e., when FM is zero in Equation (5).Note that there are small fluctuations at the peaks of the PD.These fluctuations may be induced by the small phase shifts between the FD and U timeseries.By integrating P D and P W over one wave period, we can obtain the work done by drag force (W D ) and inertia force (W M ) as shown in Equation (8).The averaged W D and W M over the two periods in Figure 8 is 2.0 × 10 −3 J and −2.0 × 10 −4 J, respectively.In case of ideal sinusoidal velocity signals, W M should be exactly zero.Due to the asymmetric wave velocity, the W M is not zero, but the magnitude of W M is fairly small, i.e., one tenth of the W D .Since the magnitude of W M is considerably small compared to W D , the assumption that W M can be ignored in the deriving period-averaged C D (in Equation ( 8)) is still valid, and the period-averaged C D in the shown case is derived as 3.25.
Following the same method, period-averaged C D at three functional measuring locations of all the tested cases are listed in Table 2.It shows that relatively large deviations in C D values exist among different measuring locations.The C D values generally increase from locations from 1 to 3. Previous studies have shown that C D values increase with the reduced velocity (i.e., Reynolds number) [24,37].The obtained increase of C D values may be related to the reduction of wave orbital velocity from the front to the end of the vegetation canopy, as shown in Figure 4b Thus, the spatial variation in C D values is in-line with previous studies.Additionally, it is noted that the cases with larger wave height and wave period (i.e., higher wave orbital velocity) generally lead to smaller spatially averaged C D , which is also in agreement with previous studies [24,37].In order to test the derived period-averaged C D , we used the derived values to reproduce the total force from the velocity signals using Equation (1).The reproduced total force (F rep ) is subsequently compared with the measured actual total force (Figure 9).The reproduced total force (F rep ') using C D = 1 is also included as reference.It is clear that F rep is in good agreement with the measured force over the shown two wave periods, although small differences exist between them.Notably, the measured maximum force is well captured in F rep near x = 0.5 π, which is important as the maximum force is critical not only for energy dissipation but also for assessing the stem strength to wave loading.As a comparison, the difference between F rep ' and the measurement is large, which shows the validity of using period-averaged C D to reproduce the total force.

Figure 9.
Comparison between reproduced total acting force and measured total force.The red solid line is the measured total force; The black dash line is quantified by using derived period-averaged CD in Equation (1) (i.e., Frep); The blue dash line is quantified by using CD = 1 in Equation (1) for reference (i.e., Frep').The shown test case is wave0712, with 7 cm wave height and 1.2 s wave period.
Figure 10 compares the maximum Frep and maximum measured total force obtained at all three functional measuring locations in all test cases.In general, the reproduced maximum force is well inline with the measurement, as most of the data points are fairly close to the 1:1 reference line.The R 2 value is 0.759 for data of all three functional measuring locations in all test cases.This result indicates the CD deriving procedure is valid, and the intrinsic errors associated with this procedure are acceptable.

Advantages of the Current Measuring System and Alignment Algorithm
Our results have shown that large spatial variations can exist in the wave particle velocity and CD (Figure 5 and Table 2).Thus, it is important to have synchronized force-velocity measurement at  Comparison between reproduced total acting force and measured total force.The red solid line is the measured total force; The black dash line is quantified by using derived period-averaged C D in Equation (1) (i.e., F rep ); The blue dash line is quantified by using C D = 1 in Equation (1) for reference (i.e., F rep ').The shown test case is wave0712, with 7 cm wave height and 1.2 s wave period.
Figure 10 compares the maximum F rep and maximum measured total force obtained at all three functional measuring locations in all test cases.In general, the reproduced maximum force is well in-line with the measurement, as most of the data points are fairly close to the 1:1 reference line.The R 2 value is 0.759 for data of all three functional measuring locations in all test cases.This result indicates the C D deriving procedure is valid, and the intrinsic errors associated with this procedure are acceptable.

Figure 9.
Comparison between reproduced total acting force and measured total force.The red solid line is the measured total force; The black dash line is quantified by using derived period-averaged CD in Equation (1) (i.e., Frep); The blue dash line is quantified by using CD = 1 in Equation (1) for reference (i.e., Frep').The shown test case is wave0712, with 7 cm wave height and 1.2 s wave period.
Figure 10 compares the maximum Frep and maximum measured total force obtained at all three functional measuring locations in all test cases.In general, the reproduced maximum force is well inline with the measurement, as most of the data points are fairly close to the 1:1 reference line.The R 2 value is 0.759 for data of all three functional measuring locations in all test cases.This result indicates the CD deriving procedure is valid, and the intrinsic errors associated with this procedure are acceptable.

Advantages of the Current Measuring System and Alignment Algorithm
Our results have shown that large spatial variations can exist in the wave particle velocity and CD (Figure 5 and Table 2).Thus, it is important to have synchronized force-velocity measurement at

Advantages of the Current Measuring System and Alignment Algorithm
Our results have shown that large spatial variations can exist in the wave particle velocity and C D (Figure 5 and Table 2).Thus, it is important to have synchronized force-velocity measurement at multiple locations by a number of force-velocity measuring systems.The selected standard force sensors are small enough to be installed at multiple locations in wave flumes.Additionally, these sensors are designed with built-in tapped holes, which facilitate testing various vegetation mimics, e.g., rigid cylinders, flexible stripes, and real vegetation stems.
Our results further show that the realignment process is important to derive both time-varying and period-averaged C D values (Figures 6 and 7).In our experiment, we aligned the instruments as good as possible (please see Figure 1d of the manuscript), but it is inevitable to have small misalignment to cause the delay.The main source causing the delay may be the inherent difference in instruments' speed of recording and receiving data, as the force and velocity measurements have their separate data acquisition systems.Thus, the automatic synchronizing algorithm is necessary and valuable in the current study.By using this algorithm, the time shift between two signals can be reduced to 0.003 s, which is only 1% of the original time shift before the realignment.The obtained time shifts are believed to be acceptable when comparing to normal wave periods (1-2 s) tested in our lab flume.The time shifts are merely 0.3% to the tested wave period.
The overall good performance between maximum measured force and reproduced force shows the reliability of this alignment algorithm.Importantly, this algorithm can automatically process the force and velocity data.No manual tuning is needed.Hence, it provides a generic solution to the alignment problems in deriving C D .Furthermore, this algorithm can run very efficiently, which is desirable when processing large data sets from multiple measuring locations.Lastly, this alignment algorithm is applied to process the velocity data from ADVs, but it is worth noticing that this algorithm is also applicable for other velocity measuring technologies, e.g., EMF (electromagnetic flow manufacture meter) and PIV (particle image velocimetry) [41][42][43].

Current Limitations and Future Applications
It is noted that the time shifts after the realignment are non-zero, but they are significantly reduced.To further reduce the time shifts, high frequency force and velocity measurements (e.g., >100 Hz) are required to obtain finite time steps for the realignment algorithm.However, it is perhaps not possible to completely eliminate the time shifts for all the tested cases, especially when multiple wave periods are included in the analysis, as the realignment procedure needs to account for time shifts at multiple peaks.
The velocity measurement in the current experiment was conducted by ADV measurement, which is a conventional method in flume experiments.The main limitation of the ADV measurement is that it is a point measurement.To obtain vertical velocity profile, it is required to manually adjust the ADV-measuring locations and repeat the same test conditions for each measuring location.This process is very time-consuming.Thus, we only conducted the velocity profile measurement for two cases, whereas for other cases, the velocity data is taken at the half water depth, which roughly equaled to the mean in-canopy velocity (Figure 3).The same practice is also done in previous study [37].However, it is possible that the small deviation between the point velocity and depth-averaged in-canopy velocity can lead to errors in the derived C D values.This may partly explain the difference between the maximum measured force and the reproduced force.In order to improve the velocity measuring accuracy and reduce the labor involved, PIV system can be applied in future experiments.The PIV system can provide detailed velocity information of velocity field [41,42].By applying such a system, it is also possible to obtain the relative velocity between water motion and the motion of flexible vegetation stems.Thus, the developed technics in the current study can be further applied in flexible vegetation canopies, e.g., saltmarshes and seagrasses, which is interesting to both coastal engineers and ecologists.

Conclusions
This technical note provides a practical set-up to derive both time-varying and period-averaged vegetation drag coefficients (C D ) following the direct measuring method [36][37][38].Different from previous studies, standard force sensors are applied to compose four synchronized force-velocity measuring systems in the current experiment.These standard force sensors are robust and suitable for flume applications.The composed force-velocity measuring systems can provide synchronized force-velocity measurement.Although one of the ADV instruments failed, the other three ADVs functioned well during the experiment.Importantly, an automatic algorithm was developed to realign the obtained force and velocity signals for direct C D deviation.This algorithm is expected to be able to accommodate a variety of velocity measuring techniques, providing possibilities to extend current application range.The developed force-velocity measuring systems and the automatic realignment algorithm may assist future experiments on vegetation-wave interactions for better understanding and prediction of vegetation-induced wave dissipation.

Figure 1 .
Figure 1.(a) Flume experiment set-up.The numbers 1-4 indicate the locations of the in-phase forcevelocity measurement; (b) A force sensor connected to a PVC pipe; (c) Mimicked vegetation canopy constructed by PVC pipes; (d) Instrument deployments in the flume without mimicked vegetation."WG"stands for wave gauge, "ADV" stands for acoustic doppler velocimeter, and "FS" stands for force sensor.The dashed line indicates the ADV and force sensor are placed at the same cross-section to ensure in-phase measurements.

Figure 1 .
Figure 1.(a) Flume experiment set-up.The numbers 1-4 indicate the locations of the in-phase force-velocity measurement; (b) A force sensor connected to a PVC pipe; (c) Mimicked vegetation canopy constructed by PVC pipes; (d) Instrument deployments in the flume without mimicked vegetation."WG" stands for wave gauge, "ADV" stands for acoustic doppler velocimeter, and "FS" stands for force sensor.The dashed line indicates the ADV and force sensor are placed at the same cross-section to ensure in-phase measurements.

Figure 2 .
Figure 2. Flow chart to realign velocity and force data signals.The algorithm is provided in the Appendix A as a MATLAB script.

Figure 2 .
Figure 2. Flow chart to realign velocity and force data signals.The algorithm is provided in the Appendix A as a MATLAB script.

Figure 3 .
Figure3.(a) Measured velocity profile for case wave0312 with 3 cm wave height and 1.2 s wave period, U min is the highest wave orbital velocity in negative direction (oppose to wave propagation), U max is the highest wave orbital velocity in positive direction (same as wave propagation), and U w is the amplitude of wave orbital velocity; (b) Measured velocity profile for case wave0709 with 7 cm wave height and 0.9 s wave period.

Water 2018 , 18 Figure 3 .
Figure 3. (a) Measured velocity profile for case wave0312 with 3 cm wave height and 1.2 s wave period, Umin is the highest wave orbital velocity in negative direction (oppose to wave propagation), Umax is the highest wave orbital velocity in positive direction (same as wave propagation), and Uw is the amplitude of wave orbital velocity; (b) Measured velocity profile for case wave0709 with 7 cm wave height and 0.9 s wave period.

Figure 4 .
Figure 4. (a) Spatial variations of wave height (H) through the vegetation canopy (i.e., x = 0-8 m) indicated as green bars; (b) Spatial variations of the magnitude of wave orbital velocity (UW) through the vegetation canopy.The first 3 UW data points (x = 0-6 m) are obtained from ADV measurement, whereas the last data point at x = 7 m is obtained by using Equation (3) based on an average wave height between x = 6 m and 8 m in panel (a).The shown test case is wave0712 with 7 cm wave height and 1.2 s wave period.

Figure 4 .
Figure 4. (a) Spatial variations of wave height (H) through the vegetation canopy (i.e., x = 0-8 m) indicated as green bars; (b) Spatial variations of the magnitude of wave orbital velocity (U w ) through the vegetation canopy.The first 3 U w data points (x = 0-6 m) are obtained from ADV measurement, whereas the last data point at x = 7 m is obtained by using Equation (3) based on an average wave height between x = 6 m and 8 m in panel (a).The shown test case is wave0712 with 7 cm wave height and 1.2 s wave period.

Figure 5 .
Figure5.(a-d) Raw velocity and total force data measured at four locations(1)(2)(3)(4) in the order of the wave propagation in the mimicked vegetation canopy; (e) The shaded area in panel (c) is blown up in panel (e) for detailed analysis, where inertia force and drag force were derived based on nonsynchronized data.The time shift (∆t) between the FD and U is 0.26 s.The shown test case is wave0712 with 7 cm wave height and 1.2 s wave period.The velocity data in panel (d) is not included, due to the ADV measurement failure at location 4.

Figure 5 .
Figure5.(a-d) Raw velocity and total force data measured at four locations(1)(2)(3)(4) in the order of the wave propagation in the mimicked vegetation canopy; (e) The shaded area in panel (c) is blown up in panel (e) for detailed analysis, where inertia force and drag force were derived based on non-synchronized data.The time shift (∆t) between the F D and U is 0.26 s.The shown test case is wave0712 with 7 cm wave height and 1.2 s wave period.The velocity data in panel (d) is not included, due to the ADV measurement failure at location 4.

Figure 6 .
Figure 6.(a-d) Time-varying U, FD, FM, and F data over two wave periods.The gray lines are before realignment, and the red ones are after realignment.The vertical double-arrowed lines in panel (a) and (b) indicate the synchronization status before and after the realignment; (e) Time-varying CD derived based on realigned U and FD data.The shown test case is wave0712 with 7 cm wave height and 1.2 s wave period.

Figure 6 .
Figure 6.(a-d) Time-varying U, F D , F M , and F data over two wave periods.The gray lines are before realignment, and the red ones are after realignment.The vertical double-arrowed lines in panel (a) and (b) indicate the synchronization status before and after the realignment; (e) Time-varying C D derived based on realigned U and F D data.The shown test case is wave0712 with 7 cm wave height and 1.2 s wave period.

Figure 7 .
Figure 7. Sensitivity analysis of the number of loops used in the realignment algorithm.Case 1 is the case wave0712 with 7 cm wave height and 1.2 s wave period, and case 2 is the case wave0512 with 5 cm wave height and 1.2 s wave period.

Figure 8 .
Figure 8. Time-varying U, PD, and PM over two wave periods.The shown test case is wave0712, with 7 cm wave height and 1.2 s wave period.The averaged work done by drag force (WD) and inertia force (WM) over the shown two periods is 2.0 × 10 and −2.0 × 10 , respectively.The derived period-averaged CD is 3.25.

Water 2018 , 18 Figure 7 .
Figure 7. Sensitivity analysis of the number of loops used in the realignment algorithm.Case 1 is the case wave0712 with 7 cm wave height and 1.2 s wave period, and case 2 is the case wave0512 with 5 cm wave height and 1.2 s wave period.

Figure 8 .Figure 8 .
Figure 8. Time-varying U, PD, and PM over two wave periods.The shown test case is wave0712, with 7 cm wave height and 1.2 s wave period.The averaged work done by drag force (WD) and inertia force (WM) over the shown two periods is 2.0 × 10 and −2.0 × 10 , respectively.The derived period-averaged CD is 3.25.

Figure 10 .
Figure 10.Comparison between the maximum reproduced total acting force (Frep) and the measured maximum total force at three functional measuring locations in all the tested cases.

Figure 9 .
Figure 9.Comparison between reproduced total acting force and measured total force.The red solid line is the measured total force; The black dash line is quantified by using derived period-averaged C D in Equation (1) (i.e., F rep ); The blue dash line is quantified by using C D = 1 in Equation (1) for reference (i.e., F rep ').The shown test case is wave0712, with 7 cm wave height and 1.2 s wave period.

Figure 10 .
Figure 10.Comparison between the maximum reproduced total acting force (Frep) and the measured maximum total force at three functional measuring locations in all the tested cases.

Figure 10 .
Figure 10.Comparison between the maximum reproduced total acting force (F rep ) and the measured maximum total force at three functional measuring locations in all the tested cases.

Table 1 .
Comparison between known weights and force sensor reading.

Table 2 .
Period-averaged C D in all the tested cases.