pyro.incompressible_viscous package

The pyro solver for incompressible and viscous flow. This implements a 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

  • Solve for U in a (decoupled) parabolic solve including viscosity term

  • project the final velocity to enforce the divergence constraint.

The projections are done using multigrid

Subpackages

Submodules

pyro.incompressible_viscous.BC module

Solver-specific boundary conditions. Here, in particular, we implement a “moving-lid” option, i.e. fixed tangential velocity at a wall.

pyro.incompressible_viscous.BC.user(bc_name, bc_edge, variable, ccdata)[source]

A moving lid boundary. This fixes the tangent velocity at the boundary to 1, and the y-velocity to 0.

Parameters:
bc_name{‘moving_lid’}

The descriptive name for the boundary condition – this allows for pyro to have multiple types of user-supplied boundary conditions. For this module, it needs to be ‘moving_lid’.

bc_edge{‘ylb’, ‘yrb’, ‘xlb’, ‘xrb}

The boundary to update: ylb = lower y; yrb = upper y. xlb = left x; xrb = right x

ccdataCellCenterData2d object

The data object

pyro.incompressible_viscous.simulation module

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

Bases: Simulation

define_other_bc()[source]

Used to set up user-defined BC’s (see e.g. incompressible_viscous)

do_other_update_velocity(U_MAC, U_INT)[source]

Solve for U in a (decoupled) parabolic solve including viscosity term

evolve()[source]

Solve is all the same steps as the incompressible solver, but including a source term for the viscosity in the interface prediction, and changing the velocity update method to a double parabolic solve.

initialize()[source]

Initialization of the data is the same as the incompressible solver, but we define user BC, and provide the viscosity as an auxiliary variable.

other_source_term()[source]

This is the viscous term nu L U

write_extras(f)[source]

Output simulation-specific data to the h5py file f