
Please help with part c. Give me a matlab code please.
compressible, so that ∇2ϕ=0. If the flow is mensional, we can also define a function ψ(x,z). a. (10) Determine the general streamfunction for the flow under a surface gravity wave, of the form η=acos(kx−ωt). b. (5) Simplify the expression for (i) shallow-water waves and (ii) deep-water waves. c. (10) Using your favorite computational package, plot BOTH the waveform and the streamlines (lines of constant ψ ) underneath (1) a shallow-water wave and (2) a deepwater wave, at the instant t=0.25T (where T is the wave period). For consistency, use λ=5 m and a=0.03 m. To find the streamlines, use the general, unsimplified streamfunction that you found in (a), not the simplified ones from (b). You can use the dispersion relation and other known properties of waves to solve for the (circular) frequency ω. For the shallow-water wave use H=0.1 m; for the deep-water wave use H=2m. (For consistency, take the (unbounded) domain to be 10 m long and plot a minimum of 30 streamlines. Use a coordinate system where z= 0 at the unperturbed free surface. You do not have to plot any specific value of ψ; using a function like contour 0 in MATLAB is fine). Mark the direction of the streamlines if your computed plot doesn't show them. (Don't worry about covering up the streamlines that appear above the free surface, but make sure you include the waveform on the surface). For a good check, you can plot the velocity vectors on top of the streamlines using quiver() or similar-this is not required but is a good way to check that you are getting the right streamlines. d. (5) Comment on any differences you observe between the two streamline patterns. (Hint: zoom in on the domain bounded by 0m<x<10m and −0.1m<z<0.6m and compare the vertical vs. horizontal components of the water velocity near the surface).