wiki:CodeExplanation/SourceTerms

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

Source terms in AstroBEAR. All source terms are currently handled in a strang split way. That is - each hydro advance step is bracketed by two source steps of a half time step. Out of curiosity I browsed the athena source code to see how their CTU implementation handles source terms (since I couldn't find it in their CTU paper)

1D CTU Reconstruct left and right states (wr,wl) Add gradphi to normal velocity components at interface states wr(i)+=phi(i)-phi(i-1) wl(i)+=phi(i)-phi(i-1) Add other source terms using the reconstructed left and right states wl+=s(wl) wr+=s(wr) get fluxes calculate cell centered time centered values of density and pressure using fluxes update cell centered time centered values with source terms just as for interface states (using original cell centered values for density etc)



Note: See TracWiki for help on using the wiki.