ppmpy.advection module

ppmpy.advection module#

a simple linear advection solver for testing

advection(nx, u, C, *, num_periods=1, init_cond=None)[source]#

Evolve the linear advection equation using nx zones, a velocity u, and a CFL number C. You need to provide a function to compute the initial conditions, init_cond(g), where g is a FVGrid object

sine(g)[source]#

A sine wave initial condition (shifted so a > 0 everywhere)

states(grid, a, u, dt)[source]#

Compute the left and right interface states via PPM reconstruction and tracing under the profile

tophat(g)[source]#

Simple tophat initial conditions