Changes between Version 17 and Version 18 of u/erica/GudonovMethod


Ignore:
Timestamp:
02/13/13 15:19:29 (12 years ago)
Author:
Erica Kaminski
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • u/erica/GudonovMethod

    v17 v18  
    993. Next, the program begins the time evolution of the initial condition, by updating each cell on the grid based on the conservation law. timeNow = 0.0, and a do-loop is entered that a) updates the ghost cells with a periodic boundary condition, b) figures out the dt to advance the simulation by considering a stable cfl condition for this scheme, c) computes the fluxes across inter-cell boundaries by solving the local Riemann Problem (F(i) = 0.5*ustar*ustar is flux between ith and ith+1 cell), d) updates the cells along the grid using a conservation formula, and finally e) checks if the final time has been reached - at which point if it has, the code stops and prints out final values, and if not, proceeds through the loop again until either the former is true or the max number of iterations has been reached.
    1010
    11 Note, the program does not explicitly use the time in any subroutine. It is just used in the main body of the program to determine if the end of the iterations (i.e. tfinal satisfied) has been reached. If timenow + dt DNE tfinal, the program reiterates through, setting the BC's to get the ghost cell values, so that a flux can be calculated for each side of each cell, getting the timestep to be used in the update subroutine, calculating the fluxes to be used in the update routine, then updating the mesh. Applying the conservation law to update cells repeats until tfinal has been reached or the max iterations have.
     11Note, the program does not explicitly use the time in any subroutine. It is just used in the main body of the program to determine if the end of the iterations (i.e. tfinal satisfied) has been reached. If timenow + dt DNE tfinal, the program iterates through, setting the BC's to get the ghost cell values, so that a flux can be calculated for each side of each cell, getting the timestep to be used in the update subroutine, calculating the fluxes to be used in the update routine, then updating the mesh. Applying the conservation law to update cells repeats until tfinal has been reached or the max iterations have.