next up previous contents
Next: Computation scheme Up: A Practical Example: One-Dimensional Previous: Initial condition

Time and space discretization and variable arrangement

We divide the one dimensional space of our simulation into 1000 uniform grid points. The total length of the simulation region is 10.0, so the \(\Delta x=0.01\). For time, we adopt a uniform time step for simplicity. Considering the CFL condition, we choose t=0.004, since a typical velocity should be much smaller than 10.0. Of course, we can not be sure that this is right, but we can later check the result to see whether the time step is sufficient. If not, we change the step.