|
1.2
Sept 4, 2015 18:03:23 GMT
Post by matthorr on Sept 4, 2015 18:03:23 GMT
GIVEN: There is a simple MATLAB program (wave1.m on next page which uses exactwave.m). This program calculates solutions to the linear convection wave equation using simple backwards differencing in time and space and compares them to the exact solution.
REQUIRED: Run the code for a series of different number of timesteps (96, 48, 24 and 12) for the mesh of fixed size (number of points). Include the resulting plots and any comments about what you have learned.
(Please let me know if you are having any difficulties accessing MATLAB. If you are not familiar with MATLAB you might want to take advantage of this opportunity to learn some basics. Research and commercial CFD codes are generally written in compiled languages (C, C++ or Fortran); however, prototyping and classwork is best done in an environment like MATLAB or with python that encourages exploration and allows easy visualization.)
|
|
|
1.2
Sept 9, 2015 14:52:20 GMT
Post by matthorr on Sept 9, 2015 14:52:20 GMT
The plots show the results for varying timesteps \(\Delta t\). Since the spatial step \(\Delta x\) and wave speed \(a\) are constant, the CFL number is solely dependent on \(\Delta t\). In the first two plots, the CFL \(<\) 1, meaning the wave is propagating faster than the solution (i.e. the wave is out ahead of the time of the solution). The time marching solution shows the wave dissipating with the magnitude of the higher frequency more damped than the lower frequency. The third plot (CFL = 1) shows the wave propagating at the same speed as the solution, so the calculated solution matches the exact (i.e. the time marching solution is computed exactly where the wave is in space at each time step). The fourth plot (CFL \(>\) 1) shows the solution propagating in time faster than the wave speed (i.e. the solution is out ahead of the wave). In this case, the information (the wave) has not reached the point in time where the solution is being computed, and therefor, it is unstable and diverges from the exact solution. HW1_2.pdf (240.79 KB)
|
|