lm_atm package

The pyro solver for low Mach number atmospheric flow. This implements as second-order approximate projection method. The general flow is:

  • create the limited slopes of rho, u and v (in both directions)
  • get the advective velocities through a piecewise linear Godunov method
  • enforce the divergence constraint on the velocities through a projection (the MAC projection)
  • predict rho to edges and do the conservative update
  • recompute the interface states using the new advective velocity
  • update U in time to get the provisional velocity field
  • project the final velocity to enforce the divergence constraint.

The projections are done using multigrid

Submodules

lm_atm.setup module

lm_atm.simulation module

class lm_atm.simulation.Basestate(ny, ng=0)[source]

Bases: object

jp(shift, buf=0)[source]
v(buf=0)[source]
v2d(buf=0)[source]
v2dp(shift, buf=0)[source]
class lm_atm.simulation.Simulation(solver_name, problem_name, rp, timers=None)[source]

Bases: simulation_null.NullSimulation

dovis()[source]

Do runtime visualization

evolve()[source]

Evolve the low Mach system through one timestep.

initialize()[source]

Initialize the grid and variables for low Mach atmospheric flow and set the initial conditions for the chosen problem.

make_prime(a, a0)[source]
method_compute_timestep()[source]

The timestep() function computes the advective timestep (CFL) constraint. The CFL constraint says that information cannot propagate further than one zone per timestep.

We use the driver.cfl parameter to control what fraction of the CFL step we actually take.

preevolve()[source]

preevolve is called before we being the timestepping loop. For the low Mach solver, this does an initial projection on the velocity field and then goes through the full evolution to get the value of phi. The fluid state (rho, u, v) is then reset to values before this evolve.

read_extras(f)[source]

read in any simulation-specific data from an h5py file object f

write_extras(f)[source]

Output simulation-specific data to the h5py file f