pyro.incompressible_viscous.problems package

Submodules

pyro.incompressible_viscous.problems.cavity module

Initialize the lid-driven cavity problem. Run on a unit square with the top wall moving to the right with unit velocity, driving the flow. The other three walls are no-slip boundary conditions. The initial velocity of the fluid is zero.

Since the length and velocity scales are both 1, the Reynolds number is 1/viscosity.

References: https://doi.org/10.1007/978-3-319-91494-7_8 https://www.fluid.tuwien.ac.at/HendrikKuhlmann?action=AttachFile&do=get&target=LidDrivenCavity.pdf

pyro.incompressible_viscous.problems.cavity.finalize()[source]

print out any information to the user at the end of the run

pyro.incompressible_viscous.problems.cavity.init_data(my_data, rp)[source]

initialize the lid-driven cavity

pyro.incompressible_viscous.problems.converge module

Initialize a smooth incompressible+viscous convergence test. Here, the velocities are initialized as

\[ \begin{align}\begin{aligned}u(x,y) = 1 - 2 \cos(2 \pi x) \sin(2 \pi y)\\v(x,y) = 1 + 2 \sin(2 \pi x) \cos(2 \pi y)\end{aligned}\end{align} \]

and the exact solution at some later time t, for some viscosity nu, is

\[ \begin{align}\begin{aligned}u(x,y,t) = 1 - 2 \cos(2 \pi (x - t)) \sin(2 \pi (y - t)) e^{-8 \pi^2 \nu t}\\v(x,y,t) = 1 + 2 \sin(2 \pi (x - t)) \cos(2 \pi (y - t)) e^{-8 \pi^2 \nu t}\\p(x,y,t) = - (\cos(4 \pi (x - t)) + \cos(4 \pi (y - t))) e^{-16 \pi^2 \nu t}\end{aligned}\end{align} \]

The numerical solution can be compared to the exact solution to measure the convergence rate of the algorithm.

pyro.incompressible_viscous.problems.converge.finalize()[source]

print out any information to the user at the end of the run

pyro.incompressible_viscous.problems.converge.init_data(my_data, rp)[source]

initialize the incompressible viscous converge problem

pyro.incompressible_viscous.problems.plot_cavity module

pyro.incompressible_viscous.problems.plot_cavity.get_args()[source]
pyro.incompressible_viscous.problems.plot_cavity.makeplot(plotfile_name, outfile, Reynolds, streamline_density)[source]

plot the velocity magnitude and streamlines

pyro.incompressible_viscous.problems.shear module

Initialize the doubly periodic shear layer (see, for example, Martin and Colella, 2000, JCP, 163, 271). This is run in a unit square domain, with periodic boundary conditions on all sides. Here, the initial velocity is:

              / tanh(rho_s (y-0.25))   if y <= 0.5
u(x,y,t=0) = <
              \ tanh(rho_s (0.75-y))   if y > 0.5

v(x,y,t=0) = delta_s sin(2 pi x)
pyro.incompressible_viscous.problems.shear.finalize()[source]

print out any information to the user at the end of the run

pyro.incompressible_viscous.problems.shear.init_data(my_data, rp)[source]

initialize the incompressible shear problem