pyro.advection_rk package#
The pyro method-of-lines advection solver. This uses a piecewise linear reconstruction in space together with a Runge-Kutta integration for time.
Subpackages#
Submodules#
pyro.advection_rk.fluxes module#
- pyro.advection_rk.fluxes.fluxes(my_data, rp)[source]#
Construct the fluxes through the interfaces for the linear advection equation:
\[a_t + u a_x + v a_y = 0\]We use a second-order (piecewise linear) Godunov method to construct the interface states, using Runge-Kutta integration. These are one-dimensional predictions to the interface, relying on the coupling in transverse directions through the intermediate stages of the Runge-Kutta integrator.
In the pure advection case, there is no Riemann problem we need to solve – we just simply do upwinding. So there is only one ‘state’ at each interface, and the zone the information comes from depends on the sign of the velocity.
Our convection is that the fluxes are going to be defined on the left edge of the computational zones:
| | | | | | | | -+------+------+------+------+------+------+-- | i-1 | i | i+1 | a_l,i a_r,i a_l,i+1
a_r,i and a_l,i+1 are computed using the information in zone i,j.
- Parameters:
- my_dataCellCenterData2d object
The data object containing the grid and advective scalar that we are advecting.
- rpRuntimeParameters object
The runtime parameters for the simulation
- Returns:
- outndarray, ndarray
The fluxes on the x- and y-interfaces
pyro.advection_rk.simulation module#
- class pyro.advection_rk.simulation.Simulation(solver_name, problem_name, problem_func, rp, *, problem_finalize_func=None, problem_source_func=None, timers=None, data_class=<class 'pyro.mesh.patch.CellCenterData2d'>)[source]#
Bases:
Simulation
- evolve()[source]#
Evolve the linear advection equation through one timestep. We only consider the “density” variable in the CellCenterData2d object that is part of the Simulation.