Question 10.9: FREE VIBRATION OF AN ELASTIC STRING Consider an elastic stri...
FREE VIBRATION OF AN ELASTIC STRING
Consider an elastic string of length L=2 with \alpha=1, fixed at both ends. Suppose the string is subject to an initial displacement f(x)=5 \sin (\pi x / 2) and zero initial velocity, g(x)=0. Using h=0.4=k, find the displacement u(x, t) of the string for 0 \leq x \leq L and 0 \leq t \leq 2. All parameters are in consistent physical units. The exact solution is given by
u(x, t)=5 \sin \frac{\pi x}{2} \cos \frac{\pi t}{2}
Learn more on how do we answer questions.
We first calculate \tilde{r}=(k \alpha / h)^{2}=1. To find the values of u at the j=1 level (t=0.4), we apply Equation 10.40.
u_{i, 1}=(1-\tilde{r}) u_{i, 0}+\frac{1}{2} \tilde{r}\left(u_{i-1,0}+u_{i+1,0}\right)+k g_i (10.40)
But since g_{i}=0 and \tilde{r}=1, Equation 10.40 simplifies to
u_{i, 1}=\frac{1}{2}\left(u_{i-1,0}+u_{i+1,0}\right), \quad i=1,2,3,4
so that
u_{11}=\frac{1}{2}\left(u_{00}+u_{20}\right), \quad u_{21}=\frac{1}{2}\left(u_{10}+u_{30}\right), \quad u_{31}=\frac{1}{2}\left(u_{20}+u_{40}\right), \quad u_{41}=\frac{1}{2}\left(u_{30}+u_{50}\right)
This way, the estimates at all four interior mesh points along j=1 are determined. For higher time level, we use 10.38 which simplifies to
u_{i, j+1}=-u_{i, j-1}+u_{i-1, j}+u_{i+1, j}, \quad i, j=1,2,3,4 (10.41)
To find the four estimates on the j=2 level, for example, we fix j=1 in Equation 10.41, vary i=1,2,3,4, and use the boundary values, as well as those obtained previously on the j=1 level. As a result, we find u_{12}, u_{22}, u_{32}, and u_{42}. Continuing in this manner, estimates at all desired mesh points will be calculated; see Figure 10.16. These results can be readily verified by executing the user-defined function Wave1DFD.
>> t = 0:0.4:2; x = 0:0.4:2;
>> u0 = 5.*sin(pi*x/2); ut0 = zeros(length(x),1);
>> u = Wave1DFD(t,x,u0,ut0,1)
u =
0 −2.9389 −4.7553 −4.7553 −2.9389 0
0 −2.3776 −3.8471 −3.8471 −2.3776 0
0 −0.9082 −1.4695 −1.4695 −0.9082 0
0 0.9082 1.4695 1.4695 0.9082 0
0 2.3776 3.8471 3.8471 2.3776 0
0 2.9389 4.7553 4.7553 2.9389 0
We can also use Wave1DFD to plot the variations of u versus x for fixed values of time. For plotting purposes, we will use a smaller increment of 0.1 for x, and only plot the displacement curves for t=0,0.3,0.6,0.9. Note that the increments h and k are constrained by the condition (k \alpha / h)^{2} \leq 1.
>> t = 0:0.3:0.9; x = 0:0.1:2;
>> u0 = 5.*sin(pi*x/2); ut0 = zeros(length(x),1);
>> u = Wave1DFD(t,x,u0,ut0,1); plot(x,u) % Figure 10.17

