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.


Wednesday, September 10, 2025

The engineer in me is still thriving - verifying the no-slip boundary condition of Fluid Mechanics using OpenFOAM and ParaView...

 


Here i am doing proper CFD post-processing to experimentally verify the no-slip boundary condition using ParaView and the OpenFOAM elbow case. Let’s now interpret the screenshot from a CFD physics point of view.

Setup Summary

  • Case: OpenFOAM elbow (steady incompressible internal flow)

  • Tool: ParaView

  • Filter: Plot Over Line

  • Quantity: U_Magnitude (velocity magnitude)

  • X-axis: arc_length along the line (from one point inside the fluid to the wall)

  • Output: Velocity profile graph

What the Plot Shows

The graph on the right side shows:

  • X-axis: Distance along the probing line (arc_length)

  • Y-axis: Velocity magnitude (U_Magnitude)

The curve rises from a lower value, reaches a plateau around ~1.0, and then drops sharply to near 0 at the right end of the line.

CFD Interpretation of the Image

1. Velocity Profile Inside the Fluid

  • The flat region (plateau around ~1.0) in the middle of the curve indicates uniform flow in the bulk of the fluid (away from walls).

  • This is expected in fully developed or near-uniform flow in a pipe elbow.

2. Sharp Drop in Velocity Near the Wall

  • On both ends (especially the right), the velocity drops rapidly to nearly 0.

  • This is exactly what we expect from the no-slip boundary condition:

    Velocity must be zero at the wall due to the viscous adhesion of the fluid.

This confirms that my line probe passed from:

  • Inside the fluid,

  • Through the boundary layer,

  • Up to the wall.

The no-slip condition is numerically satisfied in simulation.

3. Boundary Layer Visualization

  • The sharp decline in the graph represents the boundary layer — the thin region near the wall where velocity transitions from free-stream to 0.๐Ÿ”น 

4. Numerical Observations

  • The velocity doesn't drop instantly to zero, but over a few sample points — this is due to:

    • Finite resolution of the mesh,

    • Interpolation used in Plot Over Line,

    • Numerical diffusion (small artificial smearing due to discretization).

This is normal and expected in CFD.

CFD Physics Conclusion

Observation CFD Interpretation
Velocity ~0 at wall ✔ No-slip boundary condition is respected
Plateau in middle ✔ Uniform flow in the bulk
Sharp gradient near wall ✔ Boundary layer captured
Small non-zero near-wall velocity Acceptable due to mesh + numerical limits

Thursday, September 4, 2025

From Software to Simulations: My Journey into Fluid Mechanics and the Navier-Stokes Theorem in Plain English...

As a software engineer, I’m used to breaking complex systems into components — loops, states, memory, and flow.

But when I stepped into the world of fluid mechanics, I found something just as elegant: the Navier-Stokes theorem, the core of Computational Fluid Dynamics (CFD).

Here’s how I made sense of this “fluid algorithm” using the tools I already know — abstraction, flow logic, and interpretation.

Software Meets Physics

I began to see fluid particles as objects in motion, and the forces acting on them as functions that change their velocity over time.

Like in physics engines or game loops, the core question remains:
What makes a particle move the way it does?

Breaking Down the Navier-Stokes Equation

Here’s the Navier-Stokes equation, often feared for its complexity, but actually a beautiful balance of terms:

In Plain English:

Mass per unit volume×(Local acceleration+Convective acceleration)=\text{Mass per unit volume} \times (\text{Local acceleration} + \text{Convective acceleration}) = Pressure per unit volume+ฮผ×Laplacian of velocity+Weight per unit volume-\text{Pressure per unit volume} + \mu \times \text{Laplacian of velocity} + \text{Weight per unit volume}


Term-by-Term Interpretation

Term Meaning
๐ŸงŠ Mass per unit volume Represents how much inertia the fluid has
Local acceleration How fast the velocity is changing at a point
๐Ÿงญ Convective acceleration How fluid carries velocity changes through space
๐Ÿ’จ − Pressure per unit volume Push from surrounding particles (inward force)
๐ŸŒ€ ฮผ × Laplacian of velocity Viscous spreading — like internal friction
๐ŸŒ Weight per unit volume Gravity or other body forces acting on fluid


Thinking Like a Programmer

Imagine you’re writing a simulator. For each fluid particle:

mass_density = ...
acceleration = local_acceleration + convective_acceleration

net_force = -pressure_gradient + viscosity_diffusion + body_force

acceleration = net_force / mass_density

It’s just Newton’s law applied to a fluid, per unit volume, using partial derivatives.

What I Learned

  • Fluid motion is a dynamic balance of pressure, viscosity, and momentum.

  • The Navier-Stokes equation is an algorithm for nature’s fluid engine.

  • My software mindset helped me break it down, understand it, and even simulate it.

Conclusion

If you're coming from a programming or systems background, don't fear the math.
Look for the patterns, forces, and balances — the equation is just a logic tree waiting to be read.

For the engineering students, do you remember the free body diagrams used to solve engineering mechanics problems?

The Navier-Stoke theorem is just like that - only the logic of balance is applied to an infinitesimal small grid within a fluid.

"Yatha pinde tatha brahmande"- a Sanskrit phrase from the Yajurveda that means "As is the microcosm, so is the macrocosm," or "As the individual, so the universe" is...

Does not it sound like Calculus?

Enjoy...



Monday, September 1, 2025

In the search of WHY Computational Fluid Dynamics....

I am of the opinion that when we plan to delve into a subject, we must have a clear cut purpose - why we are doing it. This is what I say - first What - then Why - and then only How.

Purpose of learning a subject is essential to fall in love with the subject.

So here we go...

My exploration continues.

Why We Need CFD (Computational Fluid Dynamics)

We need CFD because the governing equations of fluid motion — such as the Navier-Stokes equations — are continuous, nonlinear partial differential equations (PDEs) that describe how fluid velocity, pressure, temperature, and density evolve over time and space.

These equations are derived based on:

- Conservation of mass (Continuity equation)

- Conservation of momentum (Newton’s second law → Navier-Stokes equations)

- Conservation of energy (First law of thermodynamics)

The Core Challenge...

These governing equations are defined in a continuous domain — meaning:

They assume infinitely small control volumes,

Variables like velocity and pressure change smoothly and continuously,

Solutions require solving PDEs over an infinite number of points in space and time.

But this is not possible to compute directly on a computer because:

GComputers can only work with discrete data — finite points and numbers.

How CFD Helps...

CFD bridges the gap by:

Discretizing the continuous equations into a finite form (e.g., using finite volume, finite difference, or finite element methods),

Breaking the domain into small control volumes or grid cells (called meshing),

Approximating the continuous functions and derivatives using numerical methods,

Solving the resulting algebraic equations using iterative solvers.

We need CFD because the fundamental equations governing fluid flow, like the Navier-Stokes equations, are defined in continuous form and cannot be solved analytically for most real-world problems. CFD allows us to discretize these equations, making them solvable using numerical methods on computers.

CFD exists because real fluids follow continuous laws, but computers need discrete data. CFD translates the language of calculus into the language of algorithms.


Friday, August 29, 2025

With a large percentage of AI projects being abandoned, can we say AI is another bubble?

 A large percentage of AI projects are abandoned before reaching full deployment, with failure rates consistently reported between 42% and 95% depending on the context and definition. The most reliable recent figures suggest that 42% of companies scrapped most of their AI initiatives in 2025, while on average, 46% of AI proof-of-concepts are abandoned before reaching production. For generative AI projects, failure rates may be even higher, sometimes reported at 95%.

Key AI Project Abandonment Statistics

  • General AI Projects: 42% of companies abandoned most AI initiatives in 2025—up from 17% in 2024.

  • Proof of Concepts: 46% of AI proof-of-concepts (POCs) are typically abandoned before production.

  • Enterprise Scale: 70–90% of enterprise AI initiatives fail to scale into recurring operations.

  • Generative AI: Up to 95% of business attempts to integrate generative AI reportedly fail.

Is AI in a bubble?

Many experts, data, and market leaders believe the current state of artificial intelligence resembles a classic investment bubble, although there is debate about whether it will crash or evolve into lasting transformation. Extreme valuations, massive venture capital inflows, hype-driven investment behavior, and a high rate of abandoned projects all display warning signs reminiscent of the dot-com bubble era.

Evidence AI Is in a Bubble

  • Major economists and tech CEOs (including Sam Altman of OpenAI) openly say the sector is exhibiting bubble-like traits: funding surpassing fundamentals, valuations detached from business results, and FOMO driving reckless investment.

  • MIT studies show 95% of generative AI business integrations fail, with only a handful of projects delivering meaningful ROI.

  • Hundreds of AI startups achieve “unicorn” status ($1 billion+) despite having no mature products or profits.

  • AI company stock prices now trade at higher price-to-earnings ratios than during the dot-com bubble, said to be “even more unrealistic” than in 2000.

  • Investors poured record-breaking sums into AI startups in 2025, often for companies with limited operational history.

The evidence strongly supports labeling the AI sector as a bubble in 2025, with many similarities to previous tech bubbles—though the ultimate impact will depend on how the industry adapts and matures.

Thursday, August 21, 2025

Surya Siddhanta - The father of modern Trigonometry - my clarion call for the Hindus of Universe - wake up and reclaim your true position in the New World Order...

Come ON... The Hindus of Bharat and the Universe - wake up from the slumber and do justice to your brilliant forefathers...

The TIME is NOW...

No more dilly dally...

No more confusion...

Wake up and reclaim WhoYouAre...

Watch...

The Surya Siddhanta, an ancient Indian astronomical text, is recognized for containing the roots of modern trigonometry. It introduced essential trigonometric functions such as sine (jya), cosine (kojya), and inverse sine (otkram-jya), and is acknowledged for presenting some of the earliest and most accurate trigonometric tables—centuries before similar advancements in Greece or elsewhere.

While Greek mathematician Hipparchus is often called the "father of trigonometry" for compiling early trigonometric tables, modern scholarship suggests that the Surya Siddhanta’s methods predate and outperform those early tables. The text is attributed to Mayasura, and some researchers refer to him as the "father of trigonometry" due to his foundational contributions in defining and applying trigonometric functions within the Surya Siddhanta. The sine tables in Surya Siddhanta, with intervals as fine as 3.75°, were more accurate and comprehensive than those of Hipparchus or Ptolemy, and its methods deeply influenced later Islamic and European mathematics.

The Surya Siddhanta is not just the root of Indian trigonometry, but a reference point for the discipline globally, and Mayasura (author of Surya Siddhanta) is increasingly credited as a true pioneer of trigonometry rather than Hipparchus alone.

Read... O my Hindus of Bharat - we have lost many centuries to mimic the western civilization... No more dilly dally please...

Wake up...

Read... Read...

Sunday, August 17, 2025

What Could Have Been: The Saga of Semiconductor Limited (SCL)...An untold chapter in India's technology dreams...

In the heart of Mohali, far from the global buzz of Silicon Valley, stood a dream.

A dream wrapped in silicon wafers, precision instruments, and the quiet hum of clean rooms — Semiconductor Limited (SCL). It was India's early moonshot into semiconductor self-reliance. Long before "Make in India" and PLI schemes became the rallying cry, SCL was born with a vision to place India on the global semiconductor map.

But this is a story of what could have been.

๐Ÿงช The Spark of a Revolution

Founded in the late 1970s and operational by early 1980s, SCL was tasked with designing and fabricating integrated circuits — the very foundation of modern electronics. Unlike most public sector units, SCL wasn’t building dams, laying tracks, or manufacturing steel.

It was building brains — the digital brains of modern machines.

At a time when countries like South Korea and Taiwan were just beginning to formulate their semiconductor strategy, India already had a working fab. Engineers trained abroad came home. Chip design, VLSI, and fabrication—terms alien to most Indians then—were common language within the SCL campus.

There was hope. There was talent. There was purpose.

๐Ÿ”ฅ The Tragedy: A Fire in the Cleanroom

Then came February 1989 — a date etched in the memory of Indian technologists.

A mysterious fire broke out inside the Class 100 clean room of SCL.

A place that must be cleaner than an operating theatre — where even a speck of dust can ruin a chip — was suddenly engulfed in flames. Equipment worth crores, research worth years, and hope worth a generation was reduced to ashes.

Till date, no conclusive public report explains what happened.

Some said it was an accident. Some whispered sabotage. Others claimed it was negligence.

The timing was eerie. India was just beginning to open up. Global semiconductor giants were eyeing cheap labor and new markets. Was SCL’s rise a threat to someone?

The conspiracy theories remain — but the fire was real.

๐Ÿงฉ The Aftermath: From Dream to Dormancy

After the fire, the project was nationalized under ISRO.

SCL was revived, but its ambition was clipped. It was reoriented to focus on strategic defense and space electronics, making rad-hard chips for satellites and missiles — no longer for the mass market. The dream of a consumer-grade semiconductor ecosystem faded.

Meanwhile, in those same decades:

  • Taiwan built TSMC
  • South Korea backed Samsung
  • China built SMIC
  • India? Had SCL.

๐ŸŒฑ Seeds Never Watered

What if the fire never happened?

What if SCL had received consistent funding and global partnerships?

Would India today be a chip superpower, exporting logic and memory chips, leading 5G infrastructure, or even building advanced GPUs?

The talent was there. The vision was there. But perhaps, the political will wasn't.

We still build great software. We still run backend for the world. But the chip that powers it? It's made elsewhere.

๐Ÿ›  The Present Echoes

Today, in 2025, the government is trying again — with PLI schemes, DLI initiatives, and a push for fabs in Gujarat and Karnataka. Global players like Micron, Foxconn, and AMD are talking about investing in India.

But buried beneath the headlines is the ghost of SCL, whispering:

“We tried. You ignored.”

๐ŸŒ Final Thoughts: History as a Lesson

India's semiconductor saga did not start in 2022.
It began with SCL in the 1980s.

We were not late to the race.
We were there at the starting line.
We just stopped running.

Today, as India dreams of semiconductor glory once again, may we remember SCL — not as a failure, but as a pioneer that laid the first stone, suffered in silence, and warned us of what happens when we forget to protect our dreams.

Because dreams, like wafers, are delicate.
They burn easily.
But their ashes still carry charge.