Changes between Version 3 and Version 4 of CodeExplanation/SourceTerms


Ignore:
Timestamp:
01/03/12 19:24:52 (13 years ago)
Author:
Jonathan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • CodeExplanation/SourceTerms

    v3 v4  
    44* Reconstruct left and right states (wr,wl)
    55* Add gradphi to normal velocity components at interface states
    6 * wr(i)+=phi(i)-phi(i-1)
    7 * wl(i)+=phi(i)-phi(i-1)
    8 * Add other source terms using the reconstructed left and right states wl+=s(wl)
    9 * wr+=s(wr)
     6 * wr(i)+=phi(i)-phi(i-1)
     7 * wl(i)+=phi(i)-phi(i-1)
     8* Add other source terms using the reconstructed left and right states
     9 * wl+=s(wl)
     10 * wr+=s(wr)
    1011* get fluxes
    1112* calculate cell centered time centered values of density, momentum, and energy using original values and fluxes
     
    2930
    3031
     32== 2D CTU ==
    3133
     34 * First 4 steps are identical as in 1D but now for both directinos
     35 * Next calculate cell centered emf using initial values - and integrate to corner (upwind or otherwise) and update the interface magnetic field using CT
     36 * Update interface states with transverse flux gradients
     37 * Add source terms from transverse flux gradients
     38 * '''Add source terms for self gravity arising from x2-flux gradient  ''' ie at left interface state...
     39  * [[latex($v^y_{i+1/2,j} -= \frac{\Delta t}{2} \frac{\phi_{i,j+1}-\phi_{i,j-1}}{2 \Delta x}$)]]
     40  * [[latex($E_{i+1/2,j} -= \frac{\Delta t}{2} \left [ ( \rho v )_{i,j+1/2} \frac{\phi_{i,j+1}-\phi_{i,j}}{2\Delta x} + ( \rho v )_{i,j-1/2} \frac{\phi_{i,j}-\phi_{i,j-1}}{2\Delta x} \right ]$)]]
     41* calculate cell centered time centered values of density, momentum, and energy using original values and fluxes
     42* Update time centered momentum with gravo-source terms using original density and phi (no energy source term) pdV work done in fluxes??? - not sure what is going on here???  and calculate the time centered cell centered pressure
    3243
     44* Calculate new fluxes from corrected interface states
    3345
    34 
     46* For a static potential update the momentum using the time centered density and the energy using the mass fluxes times grad phi at the cell edges
    3547
    3648