Changes between Version 37 and Version 38 of u/erica/GudonovMethodEuler
- Timestamp:
- 05/06/13 14:32:19 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
u/erica/GudonovMethodEuler
v37 v38 74 74 === Constraining the time step === 75 75 76 The time-step, is constrained by the CFL condition, which uses the max wave speed on the grid. The constraint used in the God. code here allows any given wave on the grid to travel a full delta_x in a time-step. In allowing this, we achieve a more efficient time-marching scheme, but with the assumption that wave interactions do not lead to wave accelerations. The CFL condition is given by:76 The time-step, is constrained by the CFL condition, which uses the max wave speed on the grid. The constraint used in the God. code here allows any given wave on the grid to travel a full delta_x in a time-step. In allowing this, we achieve a more efficient time-marching scheme, but with the assumption that wave interactions do not lead to wave accelerations. The CFL condition, rearranged for dt, is given by: 77 77 78 {{{#!Latex78 dt = CFL*dx/smax 79 79 80 CFL = smax/(dx/dt) 80 Where CFL is a coefficient that ranges from 0<CFL<1. A CFL close to 1, produces the largest time step, but it should be used cautiously during times when errors can be produced, for which a smaller time step should be used. In the God. code described here, the CFL was reduced by 80% for the first 5 time steps of the code. 81 81 82 }}} 82 === Boundary Conditions === 83 84 Transmissive boundaries were set up for the current code. These boundary conditions (BC's) theoretically do not produce waves at the boundary, and so allow waves to travel right through them. 83 85 84 86 == The code ==