incompressible package

The pyro solver for incompressible flow. This implements as second-order approximate projection method. The general flow is:

  • create the limited slopes of 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)
  • 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


incompressible.setup module

incompressible.simulation module

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

Bases: simulation_null.NullSimulation


Do runtime visualization


Evolve the incompressible equations through one timestep.


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


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 is called before we being the timestepping loop. For the incompressible 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 (u, v) is then reset to values before this evolve.