from pathlib import Path
import panel as pn
import numpy as np
from IPython.display import display
import coastal_dynamics as cd
3b: Wave asymmetry and skewness
Introduction
This notebook is one of the three notebooks for this week. It deals with wave shape, which is very important for sediment transport (as we will see in later chapters). When talking about wave shape, we can distinguish between wave skewness and wave asymmetry (Section 5.3 of the Coastal Dynamics Open Textbook). We will investigate these topics in this notebook.
Theory
Wave asymmetry and skewness can be demonstrated by using a second-order wave with surface elevation \(\eta\) that consists of a first harmonic \(\eta_1\) and a second harmonic \(\eta_2\)
\[\begin{equation} \tag{1} \eta = a_1 cos(wt-kx-\phi_1) + a_2 cos(2(wt-kx)-\phi_2) \end{equation}\]
Compare this equation to Equation 5.21 in the book; as you can see Equation 1 uses \(a_1\) and \(a_2\) for the amplitudes of the two harmonics (instead of \(\hat{\eta}_1\) and \(\hat{\eta}_2\)). Also, we have added the phases \(\phi_1\) and \(\phi_2\) of the components to Equation 1. For \(\phi_1=\phi_2=0\), you will recognize a second-order Stokes wave. A phase difference between the wave components influences the shape of the combined wave. In Chapter 9 (Section 9.7.2), we will see that phase shift of the second harmonic with respect to the first harmonic is \(\phi_{2-1}=\phi_2-2\phi_1\).
Note that for demonstration purposes, we have assumed that the first and second harmonic travel at the same speed, and, thus, that we have a permanent wave form. How can you see from Equation 1 that the second harmonic travels at the same speed as the first harmonic?
Structure
This notebook consists of two parts: 1. Investigate the wave shape of skewed and asymmetric waves using a primary and secondary harmonic. This part includes six numeric questions. 2. Investigate the effect of wave skewness and asymmetry on wave-averaged quantities, including sediment transport. This part includes three multiple-selection questions
Import libraries that we use for our analysis
Let’s first import the libraries that we use for our analysis by running the next cell.
import sys
sys.path.append('../')
from modules import mod_3b, mod_css
pn.extension(raw_css=mod_css.custom_css(font_size="12px"))questions = cd.read_questions(Path("../hashed_questions/3b_wave_asymmetry_and_skewness_hashed.json"))
question_industry = cd.QuestionIndustry(questions)
cd.UseAnswersApp("Q3b").serve()Part 1: Asymmetry and skewness for second-order wave
By running the next cell you will get an interactive graph displaying the surface elevation according to Equation 1. The phase on the horizontal axis is the phase \(S=\omega t - k x\) of the primary harmonic. The graph requires input for the amplitudes and phases of each component. Herewith, you can investigate the impact of the amplitudes and the phases on the wave shape (asymmetry and skewness).
mod_3b.second_order_waves()Figures 5.13 and 5.16
We will now use the interactive graph to reproduce Figures 5.13 and 5.16 of the book.
Figure 5.13
First have a look at Figure 5.13 of the book. Which amplitudes and phases of wave component \(\eta_1\) and \(\eta_2\) will reproduce Figure 5.13? Use both Equation 1 and the interactive graph to find the answers. Note that in the book the y-axis is scaled with (i.e., divided by) the amplitude of the first harmonic component. In the interactive plot, you should stick to \(a_1 = 1\) to have the same values on the y-axis.
Figure 5.16
Now do the same for Figure 5.16.
Questions
When you have determined the ampitudes and phases for both figures using the interactive graph, you can verify your findings in a few numeric questions (for this, run the cell below).
q = [
"Q3b-second_order_wave_5.13-eta1",
"Q3b-second_order_wave_5.13-eta2",
"Q3b-second_order_wave_5.13-phi2",
"Q3b-second_order_wave_5.16-eta1",
"Q3b-second_order_wave_5.16-eta2",
"Q3b-second_order_wave_5.16-phi2"
]
question_industry.serve(q)Figure 5.15
We are now going to reproduce the total surface elevation as shown in Figure 5.15 (the solid lines). First, we will do the left panel, which has x/L on the horizontal axis, and then the right panel, which has t/T on the horizontal axis. Again we will not scale with \(a_1\), but use \(a_1 = 1\).
Left panel of Figure 5.15
Can you reproduce the solid line in the left panel of Figure 5.15? Assume t = 0 s and rewrite Equation 1, such that the surface elevation is a function of x/L. Now fill in this equation in the code cell below and run the cell to plot your answer and the correct answer. Note that in the code cell, the input values are already given. How do these compare to the values you found above and why?
input_values = {
"x_L": np.linspace(-0.1, 1.1, 100),
"eta1": 1,
"eta2": 0.2,
"phi1": 0,
"phi2": -0.5,
}
xL, eta1, eta2, phi1, phi2 = input_values.values()
# Replace None by your formula for eta
def formula_student_x_L(xL, eta1, eta2, phi1, phi2):
eta = None # This function is called function 1 in the check of the plot
return eta
output, figure = mod_3b.check_second_order_waves_x_L(input_values, [formula_student_x_L])
print(output)
display(figure)Your function is:
Function 1 is incorrect.
Right panel of Figure 5.15
Can you now code the equation to reproduce the solid line in the right panel of Figure 5.15? This requires that you rewrite Equation 1, such that the surface elevation becomes a function of t/T and assume that we are at the location of point A in the left plot. You can type your equation in the code cell below to check your outcome.
Now consider the following question: What are the most striking differences between the left and the right panel of Figure 5.15?
input_values = {
"t_T": np.linspace(-0.1, 1.1, 100),
"eta1": 1,
"eta2": 0.2,
"phi1": 0,
"phi2": -0.5,
}
tT, eta1, eta2, phi1, phi2 = input_values.values()
# Replace None by your formula for eta
def formula_student_t_T(tT, eta1, eta2, phi1, phi2):
eta = None # This function is called function 1 in the check of the plot
return eta
output, figure = mod_3b.check_second_order_waves_t_T(input_values, [formula_student_t_T])
print(output)
display(figure)Your function is:
Function 1 is incorrect.
Part 2: Effect skewness & asymmetry on sediment transport
Figures 5.14 and 5.17
Later in this course, we will consider how the wave shape influences sediment transport. A common assumption is that sediment transport is proportional to higher powers of the orbital velocity signal. As a first step, let us consider what higher powers of the surface elevation look like. Remember that under a progressive wave (like we see in the nearshore), velocity and surface elevation are in phase. Here we compare \(\eta\) with \(\eta^3\), while varying the phase of the second harmonic component, as in Figure 5.14 and 5.17.
What to do with the interactive graph?
- Run the code cell below to obtain an interactive graph (and some questions).
- We have already filled in the first harmonic component, so you can leave these values untouched. You can see the results of the first harmonic component alone in the left panel. Verify that this figure is identical to the panel for sinusoidal waves in Figure 5.14.
- Now choose the amplitude and phase of the second harmonic for skewed waves.
- Compare the middle panel with the panel for skewed waves in either Figure 5.14 or 5.17. If you have chosen the amplitude and phase of the second harmonic correctly, the figures are identical.
- Now choose the amplitude and phase of the second harmonic for asymmetric waves.
- Compare the right panel with the panel for asymmetric waves in either Figure 5.14 or 5.17. If you have chosen the amplitude and phase of the second harmonic correctly, the figures are identical.
Reflection
Study the figures to see how the peaks and shape of \(\eta\) and \(\eta^3\) vary between the panels. What is the influence on the phase-averaged value of \(\eta^3\) when the amplitudes and phases of the wave components change? And as a final thought provoking question on this section: what may be the implications for the corresponding time-varying transport signal and the wave-averaged (or net or time-averaged) transport at a certain location? Verify your ideas using the questions below the graph.
mod_3b.asymmetric()q = [
"Q3b-third_moment_left",
"Q3b-third_moment_middle",
"Q3b-third_moment_right"
]
question_industry.serve(q)The end
You have reached the end of this Notebook 3b. You can continue with this week’s last notebook, which is Notebook 3c on radiation stresses and wave forces.