| 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 |