wiki:SweepScheme

Version 2 (modified by Jonathan, 8 years ago) ( diff )

Sweep Scheme

1D - Constant Reconstruction

The sweep scheme explicitly outlines the dependencies in the various parts of the stencil update. The simplest case is 1D hydro with constant reconstruction

  • In the following graph, data comes in at time t as q.
  • Then a half source update is applied to get beforestep.
  • This is then converted to primitive form w, which is used to construct left and right interface states qRx & qLx.
  • qRx & qLx are used to calculate the final x flux f2x used in the update from beforestep to w3.
  • Then a final half source step as applied to w3 to get afterstep. GraphViz image

1D - Piecewise Linear Reconstruction

*We can then make the solver more complicated (and accurate) by switching to 1st order reconstruction (error is 2nd order).

  • Now the process from going from w to qRx and qLx involves calculating limiters limiter_x that depends on pressure pT and the velocity in w, that then get smoothed in x to arrive at the final limiter limiter_ppm.
  • This limiter, along with the eigen system req_eigens are used to calculate limited slopes dqx.
  • These limited slopes combined with the initial w and the eigensystem, can be used via characterstic tracing to arrive at time centered & face centered interface states qRx and qLx.
  • These are then used to calculate the final fluxes as before GraphViz image

2D - Constant Reconstruction

We can also look at the more simple constant reconstruction to see how the Corner Transport Upwind part of the scheme works.

  • Now in addition to calculating y interface states qLy and qRy, we calculate predictor fluxes fx and fy.
  • These are then used to update the post CTU orthogonal interface states q2Lx, q2Rx, q2Ly, and q2Ry.
GraphViz image

2D MHD - Constant Reconstruction

The addition of MHD and the fact that the CT scheme uses face centered magnetic fields, makes things complicated quickly.

  • The incoming face centered B fields aux are now needed in addition to just q
  • The cell centered predictor electric field ez_bar as well as the face centered predictor electric field in fx and fy are all used to calculate the predictor corner electric field ez.
  • This is then used to update the initial face centered magnetic fields aux, to time centered - face centered magnetic fields A2x and A2y
  • We also now need a time centered cell centered version of the fluid variables w2 to calculate the time centered cell centered electric field ez2_bar
  • This time centered cell centered electric field ez2_bar is then used along with the electric fields in the final fluxes f2x and f2y to calculate time centered corner electric field e2z
  • e2z is then used to perform the final update of the face centered magnetic fields from their initial values aux to their final values A3x and A3y
  • For a description of why the additional source terms Sx and Sy are needed, please see http://www.sciencedirect.com/science/article/pii/S0021999107005669 GraphViz image

3D MHD - with diffusion, h viscosity, ppm reconstruction

This shows just about every stencil piece.

  • Note the 3rd order PPM reconstruction now involes qex, qey, and qez in addition to dqx, dqy, and dqz.
  • Also note the cornerdiv is used along with the initial post-source values beforestep to add additional diffusion to the PPM scheme where the flow converges

*ctfx, ctfy, and ctfz are additional source terms needed in 3D MHD CTU+CT similar to Sx, Sy, and Sz *Also note the terms responsible for HViscosity in the upper right etax, etay, and etaz as well as eta2x, eta2y, and eta2z. Going from the first set to the second set involves the H-shape stencil

GraphViz image

Almost forgot momentum conserving self-gravity

GraphViz image
Note: See TracWiki for help on using the wiki.