Changes between Version 77 and Version 78 of u/erica/GudonovMethodEuler
- Timestamp:
- 05/08/13 11:56:45 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
u/erica/GudonovMethodEuler
v77 v78 111 111 === Program Structure === 112 112 113 Here is an outline for the order in which the different routines are called in the program, and what they do. The Arabic numerals give the order of operations in the main program and time iteration parts of the program, and the lower case Roman numerals give the order of operations in the subroutine "Get Fluxes", which loops through the cells on the grid. The 2nd set of Roman numerals should actually read: iv, v, vi, but trac is getting confused. 114 113 115 1. Call init -- Sets up initial conditions. This subroutine (SR) loops through i=1,mx and checks whether the cell center ((i-0.5)*dx) is to left or right of discontinuity (x0), and then assigns appropriate value to that cell. (All initial conditions for the tests in Toro consist of a left and right state separated by a discontinuity. 114 116 2. Call output -- begins the output file -- records the following info - position, density, velocity, pressure, and time and timestep. This output file is named output.out. … … 121 123 ii. Call CFLcond -- Computes timestep using cfl coeff and max speed, where the max speed is also computed in this SR. 122 124 iii. Call !GetFluxes -- This SR sets up the local Riemann Problem (LRP) and solves it exactly to get rho(x/t), u(x/t), P(x/t) at x/t = 0 (see above explanation of sampling routine). This is the most complicated structure of the program. A schematic of the loop is as follows: 123 [[Image(LoopSR.png, 35%)]]125 [[Image(LoopSR.png, 50%)]] 124 126 i. Call Update -- Updates cells using flux computed in previous step 125 127 i. Call Output -- Write quantities to file