Wolfram Language

NavierStokes Equation

Simulate a fluid flow over a backward-facing step with the NavierStokes equation

Here is the vector-valued velocity field, is the pressure and the identity matrix. and are the density and viscosity, respectively.

Specify a region that models the backward-facing step.

Visualize the region with an inflow profile.

show complete Wolfram Language input

Specify an inflow profile boundary condition on the left edge.

Specify an outflow boundary condition by setting up a pressure value on the right.

Specify no-slip boundary conditions on the remaining walls.

Group the boundary conditions.

Set up the viscous NavierStokes equation.

Replace the density and the viscosity with material parameters and solve the equation on a mesh with specified spacing while interpolating the velocities and with second order and the pressure with first order.

Visualize the resulting velocity field and note the recirculation area behind the step.

Visualize an averaged velocity field as a density plot.

Visualize the resulting pressure distribution.

More details about this model can be found in the documentation.

Related Examples

de es fr ja ko pt-br zh