wiki:u/johannjc/scratchpad24

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

Tighter coupling of source terms with Corner Transport Upwind Scheme

1D wave equation with source term ==

Exact integral finite volume solution to this problem is

Where

  • is the volume average of over cell at time
  • is the time and area averaged flux at the boundary between cell and cell
  • is the time and volume averaged source term over cell

In Riemann methods, in 1D, we can write

where is the time averaged area average of on the left side of the interface and is the Riemann solver for

Now the trick is how to calculate

Method of Characteristics

If we operator split the source term from the hyperbolic term, and if the hyperbolic term is trivial

where is a constant and via the method of characteristics

which gives

and

and the integral for becomes

Source term contribution

For the source term contribution to the time averaged interface state, things are a little tricky. Imaging a constant source term

Then the contribution to and the time averaged value for would be

Now if we include the solution from characteristic tracing in our source term calculation, the first term just gives us the same spatial integration, however the second term is a double integral.

There are lots of ways to reduce this double integral into a single (or finite number) of source evaluations using any combination of midpoint rules or trapezoid rules. Ideally we would like to use our already calculated spatial integral which we can do by using the trapezoid rule on the outer integral and exchanging the source evaluation with the integral average. This gives

where

Summary of 1D

  1. Spatial reconstruction and averaging of solution over domain to get interface states
  2. Application of source term to interface states over (or estimate source terms using cell centers)
  3. Calculate Fluxes from interface states
  4. Update Cells using those fluxes
  5. Calculate source term using time averaged cell center
  6. Update final states using source term for

CTU

Corner Transport Upwind attempts to modify predictor interface states with transverse flux corrections.

  1. Spatial reconstruction and averaging of solution over domain to get interface states
  2. Application of source term to interface states over (or estimate source terms using cell centers)
  3. Calculate Fluxes from interface states
  4. Update interface states with transverse fluxes
  5. Calculate new Fluxes
  6. Update Cells using those fluxes
  7. Calculate source term using time averaged cell center
  8. Update final states using source term for

Variant for source terms involving force fields (ie gradients)

If the source terms can be directionally split, then the above algorithm can be modified as follows

  1. Spatial reconstruction and averaging of solution over domain to get interface states
  2. Application of parallel source term to interface states over (or estimate source terms using cell center)
  3. Calculate Fluxes from interface states
  4. Update interface states with transverse fluxes
  5. Apply perpendicular source terms to interface states over (or estimate source terms using cell center)
  6. Calculate new Fluxes
  7. Update Cells using those fluxes
  8. Calculate source term using time averaged cell center
  9. Update final states using source term for

Variant for Self Gravity

Same first 7 steps

  1. Use conservative formalism for momentum transport (see https://astrobear.pas.rochester.edu/trac/blog/johannjc10222013) to calculate momentum fluxes associated with self-gravity
  2. Apply momentum fluxes from s-g to cells
  3. Use mass fluxes to calculate energy flux
  4. Make it second order by updating fluxes with new potential following elliptic solve.

Variant for Cylindrical Geometry

Most geometric source terms can be removed by adjusting the underlying algorithm and fluxes appropriately. See Skinner & Ostriker 2010 - This has yet to be done for AstroBEAR

PPM details

In more general terms, we can write

and we can estimate

Now and we can also add and subtract so that

This expansion motivates the characteristic tracing equation used for PPM.

Note: See TracWiki for help on using the wiki.