Thursday, September 11, 2025

Verifying Poiseuille Flow Using OpenFOAM and ParaView - the engineer in me is still alive...

Introduction

In computational fluid dynamics (CFD), verifying the solution of known analytical problems helps build confidence in simulation tools and numerical schemes. One such classical benchmark is Poiseuille flow — a pressure-driven, fully developed laminar flow through a channel.

This blog post shows how I recreated and verified the parabolic velocity profile of Poiseuille flow using OpenFOAM and visualized it using ParaView.

What Is Poiseuille Flow?

Poiseuille flow describes steady, incompressible, laminar flow of a Newtonian fluid in a long, straight channel driven by a pressure gradient. For a 2D rectangular channel, the flow is unidirectional along the channel length and exhibits a parabolic velocity profile in the transverse direction.

Governing Equations

We start with the Navier-Stokes equations simplified under assumptions:

  • Incompressible, steady-state

  • No-slip walls

  • Pressure-driven

  • Fully developed (no dependence on streamwise direction)

For flow in the x-direction, the reduced equation becomes:

μd2udy2=dpdx\mu \frac{d^2 u}{dy^2} = \frac{dp}{dx}

Where:

  • u(y)u(y) is the velocity in x-direction

  • μ\mu is dynamic viscosity

  • dpdx\frac{dp}{dx} is the imposed pressure gradient

Analytical Solution

Solving the second-order ODE gives:

u(y)=12μ(dpdx)y(Hy)u(y) = \frac{1}{2\mu} \left( -\frac{dp}{dx} \right) y(H - y)

Where:

  • HH is the channel height

  • yy varies from 0 (bottom wall) to HH (top wall)

This is a parabola with maximum velocity at the centerline y=H/2y = H/2 and zero velocity at the walls (due to no-slip boundary condition).

CFD Experiment Setup in OpenFOAM

I set up a simple 2D channel geometry using blockMeshDict, and simulated the flow using icoFoam, which is suitable for transient incompressible laminar flows.

📁 Boundary Conditions

  • Inlet: Pressure fixed at 1 unit

  • Outlet: Pressure fixed at 0 unit

  • Walls: No-slip condition (U = (0 0 0))

  • Initial Velocity: (0 0 0) throughout

🧱 Mesh

A rectangular domain:

  • Length = 1 m

  • Height = 0.1 m

  • Depth = very thin (or empty to treat as 2D)

Result: Parabolic Profile in ParaView

Using ParaView, I plotted the x-component of velocity (U_X) along a vertical line from the bottom wall to the top wall at the center of the channel (x = 0.5).

📸 Here's the result:



As expected, the profile is:

  • Zero at both walls (due to no-slip condition)

  • Maximum at the center

  • Symmetric about the mid-height

✅ This matches the theoretical prediction of Poiseuille's parabolic velocity profile.

Key Learnings

  • CFD tools like OpenFOAM can accurately reproduce classical flow profiles

  • Setting appropriate boundary conditions is crucial

  • Post-processing in ParaView enables quantitative verification

  • This benchmark builds confidence before moving to more complex simulations (e.g., turbulence, heat transfer)

Conclusion

Poiseuille flow is more than a textbook example — it's a fundamental test of our CFD setup. Successfully simulating it validates:

  • Solver setup

  • Boundary conditions

  • Mesh quality

  • Visualization pipeline

✅ And as shown, OpenFOAM + ParaView handles it elegantly.

So.... here I am...


No comments: