Navier-Stokes Flow Visualization Back
Fluid Mechanics / CFD

Navier-Stokes Flow Visualization

Real-time 2D incompressible CFD in your browser. Adjust Reynolds number and flow type to visualize velocity fields, vorticity, and streamlines instantly.

Presets
Parameters
Statistics
Results
Max velocity
0.00
U_lid
Max vorticity
0.0
Steps
0
Re (actual)
100
Sim
LowMidHigh
Initializing...
Theory & Key Formulas

$\frac{\partial \mathbf{u}}{\partial t}+ (\mathbf{u}\cdot\nabla)\mathbf{u}= -\nabla p + \frac{1}{Re}\nabla^2\mathbf{u}$
$\nabla \cdot \mathbf{u} = 0$
Vorticity: $\omega = \partial v/\partial x - \partial u/\partial y$

What is Navier-Stokes Flow?

🙋
What exactly is the Reynolds number? I see it's the main slider in the simulator.
🎓
Basically, it's a single number that tells you if a flow is smooth and orderly (low Re) or chaotic and turbulent (high Re). It's the ratio of inertial forces to viscous forces. In practice, if you slide it to a low value like 10 here, the fluid is very "sticky" and smooth. Slide it to 1000, and you'll see much more complex, swirly patterns.
🙋
Wait, really? So the "vorticity" and "streamlines" views are showing me different things about the same flow?
🎓
Exactly! Streamlines show you the paths a tiny particle would follow—they never cross. Vorticity, on the other hand, is a measure of local rotation. Try switching the visualization type while the simulation runs. You'll see the smooth lines of flow in one view, and in the vorticity view, bright spots show you where the fluid is spinning, like little whirlpools.
🙋
This simulator shows a box with a moving lid. Is that a common case, or just a simple example?
🎓
It's a classic benchmark in CFD called the "lid-driven cavity." It seems simple, but it contains all the complex physics of the Navier-Stokes equations! For instance, change the Reynolds number and watch the primary vortex in the center. At low Re, it's centered. As you increase Re, smaller vortices appear in the bottom corners. This simple box is used to test and validate supercomputers for fluid simulation.

Physical Model & Key Equations

The core model is the incompressible Navier-Stokes equations. The first equation (momentum conservation) says that changes in fluid velocity are due to pressure gradients, viscous diffusion, and the fluid's own inertia. The second (continuity) enforces that the fluid is incompressible—its density doesn't change, so the flow has no sources or sinks.

$$ \frac{\partial \mathbf{u}}{\partial t}+ (\mathbf{u}\cdot\nabla)\mathbf{u}= -\nabla p + \frac{1}{Re}\nabla^2\mathbf{u}, \quad \nabla \cdot \mathbf{u}= 0 $$

Here, $\mathbf{u}$ is the velocity vector, $p$ is pressure, $t$ is time, and $Re$ is the Reynolds number. The term $(\mathbf{u}\cdot\nabla)\mathbf{u}$ is the tricky non-linear part that causes turbulence.

Vorticity is a derived quantity that is incredibly useful for visualizing rotation. It's mathematically defined as the curl of the velocity field. In 2D, it simplifies to this scalar equation, telling us how much a tiny fluid element is spinning around an axis pointing out of the screen.

$$ \omega = \frac{\partial v}{\partial x}- \frac{\partial u}{\partial y} $$

$\omega$ is the vorticity. $u$ and $v$ are the x and y components of velocity. Positive vorticity (red/yellow in the sim) means counter-clockwise rotation; negative (blue) means clockwise.

Frequently Asked Questions

Re is the ratio of inertial forces to viscous forces. When Re is small, viscosity dominates and the flow remains laminar and stable. Increasing Re strengthens inertial forces, causing the flow to become turbulent, and you can observe the generation and growth of vortices.
The simulation switches to a representative flow field (e.g., cavity flow, channel flow, flow around a cylinder). Since boundary conditions and obstacles change, the vortex generation patterns and velocity distributions vary, allowing comparative learning of different flow phenomena.
The velocity field displays the flow velocity vectors at each point using colors and arrows. The vorticity field visualizes the rotational strength of the flow (presence and location of vortices). Regions with high vorticity are shown in darker colors, enabling intuitive understanding of vortex centers and separation zones.
If Re is too high or the time step is too coarse, numerical instability occurs. Lower Re or reset by reloading the browser. Additionally, extremely fine grids can cause high computational load and slow performance.

Real-World Applications

Aerodynamic Design: Every car, airplane, and wind turbine blade is designed using CFD solvers based on these equations. Engineers run thousands of simulations, varying shapes and flow conditions (like the Reynolds number slider) to minimize drag and maximize lift or efficiency before building a single physical prototype.

Weather & Climate Forecasting: Global climate models and your local weather forecast solve a form of the Navier-Stokes equations on a planetary scale. They simulate the flow of the atmosphere and oceans, where phenomena like hurricanes are massive, complex vortex structures similar to what you see forming in the cavity at high Re.

Biomedical Engineering: Modeling blood flow in arteries, airflow in lungs, or the movement of medical devices through the body relies on these equations. For instance, simulating flow in an aneurysm at different Reynolds numbers helps doctors assess rupture risk.

Industrial Process Design: From mixing chemicals in a tank to designing the ventilation for a clean room, understanding how fluids move is critical. The lid-driven cavity flow itself is a simplified model for studying mixing in stirred tanks, where the "lid" is like a rotating impeller.

Common Misunderstandings and Points to Note

When you start using this simulator, there are a few points you should be careful about. First, don't misunderstand that "the colormap values directly represent physical pressure." What's displayed here is "vorticity," representing the "strength of rotation" in the fluid. Pressure is a different quantity and is not visualized in this tool. For example, areas where blue and red are adjacent behind an obstacle indicate opposing vortices competing with each other.

Next, avoid changing parameters too extremely. Especially if you suddenly set the Reynolds number (Re) to a very large value like 10,000, the calculation can become unstable, leading to grid-like noise (numerical oscillations) or divergence. In practical CFD as well, you don't start by calculating the final condition immediately; you gradually increase from a low Re, checking for solution convergence. For instance, if you want to observe behavior at Re=10,000 for a lid-driven cavity, try increasing it step by step: 1000 → 3000 → 5000….

Finally, don't think that "2D results directly represent 3D phenomena." This tool is for educational purposes, to help you understand the essence of phenomena. Real flows are three-dimensional. For example, even in a lid-driven cavity flow, complex vortex structures (like Taylor-Görtler vortices) form on the side walls in 3D where there is depth. While 2D simulation is low-cost and useful for understanding phenomena, keep in mind that 3D analysis is essential for actual design.