pyro.advection_fv4 package

The pyro fourth-order accurate advection solver. This implements a the method of McCorquodale and Colella (2011), with 4th order accurate spatial reconstruction together with 4th order Runge-Kutta time integration.

Subpackages

Submodules

pyro.advection_fv4.fluxes module

pyro.advection_fv4.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 fourth-order Godunov method to construct the interface states, using Runge-Kutta integration. Since this is 4th-order, we need to be aware of the difference between a face-average and face-center for the fluxes.

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_dataFV 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 averaged over the x and y faces

pyro.advection_fv4.interface module

pyro.advection_fv4.interface.states(a, ng, idir)[source]

Predict the cell-centered state to the edges in one-dimension using the reconstructed, limited slopes. We use a fourth-order Godunov method.

Our convention here is that:

al[i,j] will be \(al_{i-1/2,j}\),

al[i+1,j] will be \(al_{i+1/2,j}\).

Parameters:
andarray

The cell-centered state.

ngint

The number of ghost cells

idirint

Are we predicting to the edges in the x-direction (1) or y-direction (2)?

Returns:
outndarray, ndarray

The state predicted to the left and right edges.

pyro.advection_fv4.interface.states_nolimit(a, qx, qy, ng, idir)[source]

Predict the cell-centered state to the edges in one-dimension using the reconstructed slopes (and without slope limiting). We use a fourth-order Godunov method.

Our convention here is that:

al[i,j] will be \(al_{i-1/2,j}\),

al[i+1,j] will be \(al_{i+1/2,j}\).

Parameters:
andarray

The cell-centered state.

ngint

The number of ghost cells

idirint

Are we predicting to the edges in the x-direction (1) or y-direction (2)?

Returns:
outndarray, ndarray

The state predicted to the left and right edges.

pyro.advection_fv4.simulation module

class pyro.advection_fv4.simulation.Simulation(solver_name, problem_name, rp, timers=None, data_class=<class 'pyro.mesh.patch.CellCenterData2d'>)[source]

Bases: Simulation

initialize()[source]

Initialize the grid and variables for advection and set the initial conditions for the chosen problem.

substep(myd)[source]

take a single substep in the RK timestepping starting with the conservative state defined as part of myd