shallow_water_1d_test


shallow_water_1d_test, a MATLAB program which calls shallow_water_1d to simulate a system governed by the shallow water equations in 1D.

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Related Data and Programs:

shallow_water_1d, a MATLAB program which simulates the evolution of a 1D fluid governed by the time-dependent shallow water equations.

Source Code:

A simple dataset was created by the command

        [ h_array, uh_array, x, t ] = shallow_water_1d ( 41, 100, 1.0, 0.2, 9.8 )
      
This was then animated by the command
        shallow_water_1d_animation ( h_array, uh_array, x, t )
      
and the resulting JPG files were turned into QuickTime movies.

An internal switch was modified so that the code used periodic boundary conditions. In this case, we can expect momentum conservation. The dataset was created by the command

        [ h_array, uh_array, x, t ] = shallow_water_1d ( 41, 100, 1.0, 0.2, 9.8 )
      
This was then animated by the command
        shallow_water_1d_animation ( h_array, uh_array, x, t )
      
and the resulting JPG files were turned into QuickTime movies.


Last modified on 19 March 2019.