Black FridayUpgrade your career this Black Friday. Get up to ₹60,000 Scholarship on IIT programsUp to ₹60K Black Friday Scholarship52 seats leftOffer ends Fri, 27 Nov, 11:59 pm IST.

Black Friday Scholarship – IIT Jammu & IIT Roorkee

The best Black Friday deal isn't a gadget. It's your next career move.

Get up to ₹60,000 Black Friday Scholarship on our PG programs with IIT Jammu and iHUB DivyaSampark, IIT Roorkee. IIT certification, 12 live sessions with IIT faculty and 100% placement assistance.

Only 52 seats left. Offer ends Fri, 27 Nov, 11:59 pm IST

3,905 engineers placed since 2019 · 1,276 hiring companies

By submitting you agree to our Terms and Privacy Policy.

Your free demo class is requested

Browse courses

Fundamentals of CFD Explained: Equations, Mesh and Solver, Worked by Hand

The five ideas behind every CFD simulation: the Navier-Stokes equations, the finite volume method, discretisation schemes, turbulence models and the checks that prove a result. With a five-cell calculation you can verify by hand, a grid-convergence (GCI) study and the 2026 software picture.

Fundamentals of CFD Explained: Equations, Mesh and Solver, Worked by Hand

The fundamentals of CFD (computational fluid dynamics) come down to five ideas: the conservation equations that describe a flow, a mesh that chops the flow region into small cells, a discretisation scheme that turns the equations into algebra on those cells, a solver that iterates to an answer, and checks that prove the answer is right. This guide explains each one and then works through a real calculation on five cells, so you can see where a CFD result comes from and how it can go wrong.

In short

  • CFD solves conservation of mass, momentum and energy (the Navier-Stokes equations) on a mesh of cells. Most commercial codes, including Ansys Fluent and OpenFOAM, use the finite volume method.
  • In our worked 1D example, central differencing on 5 cells overshoots to 1.99 where the true value can never exceed 1. The cause is a cell Péclet number of 4, above the limit of 2.
  • Mesh matters in a measurable way: halving the cell size cut the error of the central scheme by 4× (order 2) and the upwind scheme by only about 2×.
  • Resolving every eddy (DNS) needs about grid points: 3.2 × 1013 at . That is why industry runs turbulence models.
  • Current tools (checked 20 Nov 2026): Ansys 2026 R1 extends Fluent's GPU solver; OpenFOAM v2606 (June 2026) and OpenFOAM 14 (14 July 2026) are the latest free releases.

Courses: compare all Skill-Lync CFD courses, from short courses in ANSYS Fluent, OpenFOAM, CONVERGE and ANSA meshing to the PG Program in CFD, with fees, duration, projects and placement data in one table.

What is CFD?

Computational fluid dynamics is the use of numerical methods and computers to solve the equations of fluid flow. Instead of testing a prototype in a wind tunnel, you split the space around or inside the object into millions of small cells and calculate velocity, pressure and temperature in every cell. The output is a full 3D picture of the flow.

That picture is what makes CFD useful. A wind-tunnel test gives you forces and a few pressure taps; a simulation gives you every value everywhere, so you can see why a duct loses pressure or where a battery pack runs hot. The price is that the simulation is only as good as the equations, mesh and settings behind it, which is what the rest of this guide is about.

Engineers use CFD in aerospace (drag, lift, engine intakes), automotive (external aerodynamics, underhood cooling, combustion), energy (wind turbines, heat exchangers, HVAC) and biomedical work (blood flow in stents, inhalers, ventilators). The real-world applications post in this series goes through each one.

What equations does CFD solve?

CFD solves three conservation laws written for a moving fluid: mass is conserved (the continuity equation), momentum is conserved (Newton's second law for a fluid, the Navier-Stokes equations) and energy is conserved. Turbulence, species and other physics add extra transport equations of the same shape.

For an incompressible fluid with constant viscosity, the first two read:

Read the momentum equation term by term. On the left is mass times acceleration: the change of velocity in time, plus the change you see because the fluid carries itself along (convection). On the right are the forces: the pressure gradient pushes fluid from high to low pressure, viscosity smooths out velocity differences (diffusion), and gravity acts on the mass.

Every quantity a solver carries, whether it is velocity, temperature or a pollutant's concentration , follows the same pattern, called the general transport equation:

Rate of change plus convection equals diffusion (with diffusivity ) plus a source. If you understand how a code handles this one equation, you understand most of CFD. Chapter 5 of the free Fluid Mechanics book derives the Navier-Stokes equations, and conservation vs non-conservation forms explains how CFD codes write them.

How does a CFD solver turn equations into numbers?

A solver cannot work with derivatives directly, so it converts them into algebra. In the finite volume method, used by Fluent, STAR-CCM+ and OpenFOAM, the domain is split into cells and the transport equation is integrated over each cell. What flows in through a cell's faces, minus what flows out, must balance whatever is stored or generated inside.

Three finite-volume cells W, P and E in a row; cell P has face w on the left and face e on the right, one cell width delta x apart; flux enters through w and leaves through e, and the face flux is convection plus diffusion
A finite-volume cell P between neighbours W and E. The solver writes one balance like this for every cell, then solves them all together. Drawn with code.

The balance only uses values at cell centres (W, P, E), but fluxes are needed at the faces (w, e). How you estimate a face value from the centres is the discretisation scheme, and it is the single biggest source of numerical error a beginner controls. Two classic choices:

  • Central differencing (CDS): the face value is the average of the two neighbours. Second-order accurate, so the error falls with the square of the cell size.
  • First-order upwind (UDS): the face value is taken from the cell the flow comes from. Robust and always bounded, but only first-order accurate, and it smears sharp gradients (numerical diffusion).

Production codes use blends and higher-order upwind schemes (second-order upwind, QUICK, bounded central) that try to get the accuracy of the first with the stability of the second. Discretization methods in CFD compares the finite difference, finite volume and finite element approaches.

Worked example: a five-cell CFD calculation you can check by hand

Take the simplest problem that has both convection and diffusion: steady flow along a 1 m pipe that carries a property (think of it as a dye concentration). at the inlet and at the outlet. Density kg/m³, diffusivity kg/(m·s), and we use 5 cells, so m. This problem has an exact solution, which is why it is the standard test for a scheme.

Write the balance for an interior cell P. With the convective strength and diffusive conductance :

With central differencing, and . Collect terms and every cell gets the same form:

Case 1, slow flow (u = 0.1 m/s). , . Both coefficients are positive (, ) and both schemes land within 0.01 of the exact answer in every cell (largest error 0.0073 for central, 0.0095 for upwind).

Case 2, fast flow (u = 2 m/s). Now , , so

That negative is the problem. The equation now says : a higher value downstream pushes down, which is not physical. The ratio that decides this is the cell Péclet number, convection over diffusion across one cell:

Central differencing stays bounded only while . Upwind uses and : always positive, always bounded. Solving the five equations (the script is in our run folder) gives:

φ at the five cell centres, u = 2 m/s, cell Péclet number 4 (computed 20 Nov 2026)
x (m)ExactCentralUpwind
0.11.0001.0081.000
0.31.0000.9590.998
0.51.0001.1070.987
0.70.9980.6640.934
0.90.8651.9920.667
Plot of phi along the 1 m domain at u = 2 m/s on 5 cells: the exact solution stays at 1 and drops sharply near the outlet; central differencing oscillates and overshoots to 1.99 in the last cell; upwind stays smooth but gives 0.67 where the exact value is 0.86
Same equations, same mesh, two schemes. Central oscillates (unphysical values above 1); upwind is smooth but smeared. Drawn with code from the solved values.

Two lessons carry straight over to a real 3D simulation:

  1. Wiggles mean the mesh is too coarse for the scheme. To keep central differencing bounded here you need m, so at least 10 cells; 20 is comfortable. In a 3D case the same thing shows up as checkerboard patterns or temperatures above the hottest boundary.
  2. A smooth answer is not a correct answer. Upwind looked well behaved and was 23% low in the last cell (0.667 against 0.865). Numerical diffusion is invisible unless you refine the mesh and watch the result move.

What is the Reynolds number, and why does it decide your CFD set-up?

The Reynolds number compares inertia with viscosity. In a pipe, flow is laminar below about 2,300 and turbulent above about 4,000. It decides whether you need a turbulence model, how fine the mesh near walls must be and how hard the case will be to converge. Work it out before you open the software.

Three examples with properties at 20 °C (air m²/s, water m²/s):

Reynolds numbers, computed 20 Nov 2026 from Engineering ToolBox property tables
CaseReRegime
Car, 4.5 m long, 100 km/h in air8.3 millionTurbulent
Water, 25 mm pipe, 1 m/s24,913Turbulent
Water, 2 mm micro-channel, 0.1 m/s199Laminar

Almost everything engineers design sits in the turbulent column. Turbulence contains eddies from the size of the object down to the Kolmogorov scale, where viscosity finally dissipates them. Resolving all of them, called direct numerical simulation (DNS), needs roughly grid points in 3D: about 109 at and 3.2 × 1013 at . For scale, the free Ansys Student licence allows 1 million fluid cells.

So practical CFD models turbulence instead of resolving it. The Reynolds law of similarity shows why a scale model in a wind tunnel must match the full-size Reynolds number.

Which turbulence model should a beginner use?

Start with a RANS model: k-omega SST for flows with walls, separation or heat transfer, or realizable k-epsilon for free shear flows and quick internal-flow estimates. RANS solves for the time-averaged flow and models every eddy, so it runs on a laptop. Move to LES only when you need the unsteady structures themselves.

The three levels of turbulence modelling
ApproachWhat it resolvesTypical use
RANS (k-epsilon, k-omega SST, Spalart-Allmaras)Only the average flow; all eddies modelledIndustry default: drag, pressure drop, cooling
LES (large eddy simulation)Large eddies resolved, small ones modelledNoise, mixing, combustion, unsteady wakes
DNSEvery eddy down to the Kolmogorov scaleResearch at modest Re

Whichever model you pick sets the mesh you need at the wall. Wall-resolved models want the first cell at ; wall functions want it at roughly 30 or above. The y+ calculator gives the first cell height for your speed and length, and near-wall treatment and y+ estimation explains the choice. For the models themselves, read the introduction to RANS turbulence models.

How do you know a CFD result is correct?

You check it in three layers. Convergence: residuals have dropped and the quantities you care about, such as drag or outlet temperature, have stopped changing. Verification: the answer no longer depends on the mesh. Validation: the answer matches a hand calculation or experiment for a case like yours. A colourful contour plot proves none of these.

NASA's verification and validation tutorial puts the distinction this way: verification checks that the code and the simulation solve the model correctly; validation checks that the model represents the real flow. You can verify a wrong model perfectly, which is why both are needed.

Worked example: a grid-convergence study with the GCI

The standard way to report mesh error is the Grid Convergence Index (GCI), from the procedure Celik and co-authors published in the ASME Journal of Fluids Engineering in 2008. Run three meshes with a constant refinement ratio , work out the observed order of accuracy , then the error band on the fine mesh:

Here are the fine, medium and coarse results. Apply it to our fast-flow problem (u = 2 m/s), using the mean value of along the pipe as the result, on 20, 40 and 80 cells () with central differencing:

  • , ,
  • : the scheme's formal second order, so the meshes are in the asymptotic range
  • Relative change fine vs medium = 0.2465%, so

Because this problem has an exact answer (0.950000), we can check the method: the real error on the fine mesh is 0.082%, inside the 0.103% band. Repeat the study with upwind and the observed order comes out at 0.58 instead of 1. That mismatch is the warning sign: the meshes are not yet fine enough for the error to behave predictably, and the band (1.18%) is correspondingly wide.

Log-log plot of error in the mean of phi against cell size from 0.05 m to 0.003 m: central differencing follows slope 2, from 0.0125 at 20 cells to 0.0000488 at 320 cells; upwind falls more slowly, from 0.0167 to 0.0015
Order of accuracy you can see: each halving of the cell size cuts the central-scheme error by 4×, the upwind error by roughly 2×. Computed and drawn with code.

In a real project the result would be a drag coefficient or a pressure drop, and you would not know the exact answer, which is exactly why the GCI exists. The convergence criteria post covers residual targets, and the mesh quality calculator checks skewness and aspect ratio before you run.

What is the Courant number in CFD?

The Courant number is how many cells the flow crosses in one time step. Explicit solvers need to stay stable; implicit solvers tolerate larger values, but you still need small steps to capture fast unsteady flow. It ties your time step to your smallest cell.

Worked example: a transient run with 10 m/s flow and a smallest cell of 1 mm. For , ms, so one second of flow time takes 10,000 time steps. Halve the cell size and the step count doubles, on top of the extra cells. This is why transient cases cost so much more than steady ones. The Courant number and stability post goes deeper.

Which CFD software should you learn in 2026?

Learn one commercial GUI code and one open-source code. Ansys Fluent and Simcenter STAR-CCM+ are the two codes in the top skills on AmbitionBox's CFD engineer profile (captured 16 Nov 2026), and Fluent has a free student licence (1 million cells). OpenFOAM is free, open source and shows you what the solver actually does.

  • Ansys Fluent: Ansys has been part of Synopsys since the acquisition closed on 17 July 2025. The 2026 R1 release extends Fluent's native GPU solver, adding volume of fluid with energy for multiphase heat transfer and full turbulence model support including LES. The free Ansys Student licence is limited to 1 million cells/nodes for fluid physics.
  • OpenFOAM: two maintained lines. OpenCFD (a Keysight affiliate) released OpenFOAM v2606 in June 2026; the OpenFOAM Foundation released OpenFOAM 14 on 14 July 2026. Both are free.
  • Simcenter STAR-CCM+: Siemens' code, asked for in several automotive CFD listings on Naukri (aftertreatment, spray, thermal). Its 2606 release added multi-GPU support for the PhysicsAI add-on.
  • SolidWorks Flow Simulation: an add-in to the CAD tool, a gentle first step for design engineers. Start with CFD simulation using SolidWorks.

The tools change every release; the fundamentals in this guide do not. An engineer who can explain why a scheme oscillated, or why a result moved by 3% on a finer mesh, picks up a new GUI in a week. AI surrogate models are now appearing in design loops too, and they need the same checks; see AI surrogate models vs CFD solvers.

How do you start learning CFD as a mechanical engineering student?

Revise fluid mechanics and heat transfer first, then write a small solver yourself (the 1D problem above takes about 40 lines of Python or MATLAB), then learn one GUI code on two or three classic validation cases: a pipe, a backward-facing step and flow over a cylinder. Finish with one project you can explain end to end.

  1. Fluid mechanics and maths: conservation laws, boundary layers, partial derivatives. The free Fluid Mechanics book covers the theory.
  2. Write a solver: 1D convection-diffusion, then 2D heat conduction. Skill-Lync's Introduction to CFD using MATLAB and OpenFOAM starts exactly here.
  3. Learn the workflow in a GUI code: geometry clean-up, meshing, boundary conditions, solver settings, post-processing. Introduction to GUI based CFD using ANSYS Fluent follows this path.
  4. Validate: compare your pipe pressure drop with a friction-factor correlation (the pipe flow calculator gives the hand answer) and your cylinder drag with published data.
  5. Build a portfolio project and be ready to defend your mesh study in an interview. The CFD interview questions post lists what gets asked.

On jobs: in Skill-Lync's placement records, CFD roles account for 240 placements, with a median starting offer of ₹3.5 LPA (25th to 75th percentile ₹2.8 to 4.5 LPA). That is based on 3,711 Skill-Lync placement records up to 7 Nov 2026 (data snapshot of 15 Nov 2026). It is a self-selected sample of our learners, mostly 2021-23 starting offers, so treat it as a starting point; the CFD engineer salary in India post has the full breakdown. For a structured route with mentor-reviewed projects, see the Post Graduate Program in Computational Fluid Dynamics, or book a free counselling call to check which course fits your background.

This guide is part 1 of our Fundamentals of CFD series. The other parts: the CFD simulation workflow, key steps in setting up a CFD simulation, CFD boundary conditions explained, advanced meshing techniques, real-world applications of CFD and the career path of a CFD engineer. Prefer video? Skill-Lync's free Fundamentals of CFD course on YouTube covers the same ground.

Frequently asked questions

Is CFD hard to learn for a mechanical engineer?

The software is learnable in weeks; the judgement takes longer. If you are comfortable with fluid mechanics, heat transfer and basic partial differential equations, you can run a correct pipe-flow case within a month. Knowing when a result is wrong, through mesh studies, y+ checks and validation, is the skill that takes a year of projects.

Which method do most CFD codes use: FVM, FEM or FDM?

Most general-purpose CFD codes use the finite volume method, including Ansys Fluent, Simcenter STAR-CCM+ and OpenFOAM. FVM conserves mass, momentum and energy exactly over every cell, which suits fluid flow. The finite element method is common in structural codes and some multiphysics tools; finite differences appear mainly in research codes on structured grids.

What is a good residual value for convergence in CFD?

Fluent's long-standing default stops when the globally scaled residuals fall to 10⁻³ for flow equations and 10⁻⁶ for energy, and a drop of three orders of magnitude is another common rule. Ansys's own guide warns there is no universal metric, so also watch the quantities you report and check that net mass and heat flows balance.

Can I learn CFD on a laptop?

Yes. Every example in this guide runs in seconds, and the free Ansys Student licence handles up to 1 million cells, enough for 2D cases and simple 3D ones on an ordinary laptop. OpenFOAM is free with no cell limit. Large 3D industrial cases need workstations or clusters, which employers provide.

Why does my CFD solution oscillate or diverge?

The usual causes are a mesh too coarse for the scheme (cell Péclet number above 2 with central differencing, as in the worked example), poor-quality cells with high skewness, a time step with a Courant number far above what the solver tolerates, or boundary conditions that over-constrain the flow. Start with first-order schemes, then switch to second order.

Sources and further reading

Want this on your résumé?

Talk to a counsellor.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.