Home / Insights

CFD series · Part 1 of 6

What CFD Is, and When It Is Worth Paying For

Contents
  1. What CFD is
  2. The six steps of a CFD study
  3. A flow solver you can watch
  4. Does the little solver get it right?
  5. Where CFD pays in a process company
  6. Where a hand calculation or a test is better
  7. Five questions before paying for CFD
  8. What to ask anyone who sells you a CFD study
  9. The series
  10. Key points
  11. References

Sooner or later a CFD picture lands on a process engineer's desk: a tank full of rainbow colours, arrows swirling round an impeller, a pipe glowing red at the elbow. Sometimes it comes with a quote for a study. The questions are always the same. What is this, how much should I believe it, and was it worth paying for?

This six-part series answers those questions for engineers at small and mid-sized companies who buy, commission or read CFD rather than write solvers. This first part explains what CFD actually does, lets you run a real flow solver in the page, and sets out where CFD earns its cost in a process plant and where a hand calculation or a test is the better buy.

What CFD is

Computational fluid dynamics (CFD) is the solution of the equations of fluid flow by computer, on a model of the space the fluid occupies. The equations are not new. They are the conservation laws every process engineer learned: mass, momentum and energy, written for every point in the fluid instead of for a whole vessel.

For a liquid of constant density, conservation of mass says that what flows into any small region must flow out:

\[\nabla \cdot \mathbf{u} = 0\]

Conservation of momentum, the Navier–Stokes equation, is Newton's second law for a small parcel of fluid. The parcel accelerates because of pressure differences, viscous friction and gravity:

\[\rho \left( \frac{\partial \mathbf{u}}{\partial t} + \mathbf{u} \cdot \nabla \mathbf{u} \right) = -\nabla p + \mu \nabla^{2} \mathbf{u} + \rho \mathbf{g}\]

And conservation of energy carries heat with the flow and conducts it through the fluid:

\[\rho\, c_p \left( \frac{\partial T}{\partial t} + \mathbf{u} \cdot \nabla T \right) = k \nabla^{2} T + \dot{q}\]

Here \(\mathbf{u}\) is the velocity, \(p\) the pressure, \(T\) the temperature, \(\rho\), \(\mu\), \(c_p\) and \(k\) the density, viscosity, heat capacity and thermal conductivity, and \(\dot{q}\) any heat released, by a reaction for example. Apart from a few textbook cases, nobody can solve these equations on paper for a real geometry. CFD solves them approximately, by brute force.

The six steps of a CFD study

1. Geometrythe fluid space2. Meshsmall cells3. Physicsequations, models4. Boundariesinlets, walls5. Solveto convergence6. Checkand reportNot converged, or the answer fails a check: refine the mesh or the models and solve again
Figure 1. The six steps of a CFD study. The loop back from the check is normal, not a failure: most studies go round it more than once.
  1. Geometry. The space the fluid occupies, taken from drawings or a 3D model: the inside of the tank, not the steel. Small details that do not affect the flow, such as bolt heads, are left out; details that do, such as baffles and nozzles, must stay in.
  2. Mesh. That space is divided into small cells, from tens of thousands for a simple 2D case to tens of millions for a large 3D one. The equations are solved as a balance on every cell. Cells must be small where the flow changes quickly, near walls and in shear layers. Part 3 shows how much the answer can depend on this step.
  3. Physics. Which equations and models: steady or changing with time, heat transfer or not, and above all how turbulence is represented. Almost every flow in a plant is turbulent, and the eddies are far too small to resolve, so a turbulence model stands in for them. Part 4 explains the common ones.
  4. Boundary conditions. What happens at the edges: flow or pressure at each inlet and outlet, wall temperatures or heat fluxes, the speed of a rotating impeller. A CFD answer is only as good as these numbers, and they come from the process engineer, not the CFD analyst.
  5. Solve. The solver iterates until the balances close on every cell and the results stop changing. That is called convergence, and it is checked with the residuals (the imbalance left in the equations) and with the quantities of interest themselves.
  6. Check and report. Does the answer agree with a hand calculation, a correlation, plant data or a test? Does it change when the mesh is refined? Part 5 shows how to run these checks.

What comes out is a field: the velocity, pressure, temperature and, if asked for, concentration at every cell. From the field come the numbers an engineer actually wants: a pressure drop, a heat transfer coefficient, a blend time, a force on a baffle, the temperature of the hottest spot. Part 2 shows how to read the pictures that are made from the field and what each kind hides.

A flow solver you can watch

The best way to see what a solver does is to watch one. Figure 2 runs the lattice Boltzmann method, a CFD method that suits a web page because every grid point does the same simple update. Instead of solving the Navier–Stokes equation directly, it tracks packets of fluid streaming between neighbouring grid points and colliding at each one. Summed at each grid point, the packets give the density and velocity there, and at low speeds these obey the same mass and momentum balances as the Navier–Stokes equation. Most commercial and open-source CFD codes, such as Ansys Fluent, Simcenter STAR-CCM+ and OpenFOAM, use the finite volume method instead, but the steps of Figure 1 are the same.

The flow past an object is governed by one number, the Reynolds number: the ratio of the fluid's inertia to its viscous friction, based on the object's size \(d\) and the approach speed \(U\):

\[Re = \frac{\rho\, U\, d}{\mu}\]

At low Reynolds numbers the liquid creeps round the object and closes up behind it. As the Reynolds number rises, two vortices form in the wake and stay there. Above about 47 for a cylinder, the wake becomes unstable: it swings from side to side and sheds vortices of alternating spin, a pattern called the von Kármán vortex street. The shedding frequency \(f\) is described by the Strouhal number:

\[St = \frac{f\, d}{U}\]

Figure 2 is a real flow solver running in your browser: the lattice Boltzmann method on a grid of 26,000 points, solving the flow past an object in a channel continuously while you watch. It starts with the flow switched on around a cylinder. Watch the wake grow, then, above a Reynolds number of about 47, start to swing from side to side and shed vortices. The figure tours the four shapes on its own, staying on each until its wake has developed; pick a shape, change the Reynolds number, or compare all four at once.

Wake forming
Object in the flow
Colour by
Flow stateStarting
Water past a 10 mm rod10 mm/s
Shedding, Strouhal number–
Drag coefficient–
Time steps solved0

A cylinder at a Reynolds number of 100. The flow has just been switched on: watch the wake grow behind the cylinder, then start to swing.

Figure 2. A live lattice Boltzmann simulation (D2Q9 lattice, two-relaxation-time collision) of two-dimensional flow past an object in a channel 100 grid points high and 260 long. The object is 12 points across, so it blocks 12% of the channel; the walls are frictionless, the inlet speed is fixed and the outlet is open. The Reynolds number is based on the object's size across the flow (the chord for the airfoil, set at 8° to the flow); it stops at 160 because this grid cannot resolve faster flows. "Compare all" runs four smaller channels, 208 by 80 points. The Strouhal number and drag coefficient are measured live from the force on the object; the blockage makes both a little higher than for an object in open water. The motion is shown at the solver's own pace, not in real time.

Does the little solver get it right?

A picture that moves the right way is not proof. The test is a number that has been measured. For a circular cylinder at a Reynolds number of 100, careful wind tunnel and water channel experiments give a Strouhal number of 0.164 (Williamson, 1988). The same solver code as in Figure 2 was run outside the browser, on the browser's grid, on a finer one and in a channel twice as high, for 200 times the time the flow takes to pass the cylinder, and the shedding frequency was read from the spectrum of the side-to-side force on it over the second half of each run:

GridBlockageSt, as measuredSt, gap-speed correctedAgainst experimentDrag coefficient
12 points across, channel 8 d high12.5%0.1820.160−2.9%1.54
20 points across, channel 8 d high12.5%0.1820.160−2.8%1.57
12 points across, channel 16 d high6.25%0.1730.162−1.4%1.48
0.100.120.140.160.180.20406080100120140160180Nosheddingbelow 47Experiments (Williamson 1988)This solver, as measuredin a blocked channelGap-speed correctionExtrapolated to no blockageRe 40: steadyStrouhal number St = f d / UReynolds number
Figure 3. The solver's Strouhal number at a Reynolds number of 100 against the experimental curve of Williamson (1988), with the three grids of the table side by side. The open circles are the values as measured in the channel; the filled circles are corrected for the blockage by using the speed through the gaps beside the cylinder; the diamond is the value extrapolated to no blockage from the two channel heights. At a Reynolds number of 40 the solver's wake stays steady, as the experiments say it should.

As measured, the solver's frequency is too high: 0.182 against 0.164. That is not a bug in the method but a difference in the problem. The simulated cylinder sits in a channel it blocks by 12.5%, and the liquid squeezing through the gaps beside it speeds up and sheds faster than in open water. Using the speed through the gaps as the reference, a common and simple blockage correction, brings the value to 0.160, 2.8% below the experiment: the simple correction slightly over-corrects. In a channel twice as high, blocked only 6.25%, the measured value is already lower, 0.173. A better comparison uses the two channel heights: extrapolating the measured values to zero blockage gives 0.163, within 0.6% of the experiment. The 12-point and 20-point grids give the same frequency, so the frequency no longer depends on the grid. At a Reynolds number of 40, below the onset of shedding, the solver's wake settles and stays steady, as it should: its side-force coefficient swings by only 0.001, against 0.37 at 100 on the same grid. The drag coefficients in the table are higher than the 1.33 computed for a cylinder in open flow (Posdziech and Grundmann, 2007), mostly because of the blockage: extrapolated to zero blockage the solver gives about 1.41. The drag also still changes by 2% between the two grids, while the frequency does not.

That is the whole of CFD practice in miniature. A believable result came from a known method, a fine enough grid, a run long enough to settle, and a comparison with measurements that made the difference between the simulated and the real problem plain. Remove any one of them and the result is only a picture.

Two limits are worth stating. The demonstration is two-dimensional and laminar. Real flows past a cylinder become three-dimensional above a Reynolds number of about 190, and the flows in a plant are far beyond that: water at 2 m/s past a 25 mm thermowell is at a Reynolds number of about 50,000, with a turbulent wake. Solving those flows needs a turbulence model and a 3D mesh, which is what the rest of this series is about. The Strouhal number itself still matters there: the thermowell standard ASME PTC 19.3 TW uses it to check that the shedding frequency stays clear of the thermowell's natural frequency.

Where CFD pays in a process company

CFD is worth paying for when three things are true together: the geometry or the flow is too unusual for a correlation, a decision with real money on it depends on the answer, and the inputs are known well enough for the answer to mean something. The jobs where that tends to happen in a small process plant:

JobWhat CFD answersA hand calculation is usually enough when
Mixing and blendingDead zones, blend time and solids suspension in a tank with odd internals, a non-standard impeller or a thick liquid; whether a feed point short-circuits to the outletThe tank is standard (baffled, one standard impeller, thin liquid) and power and blend time correlations apply, as in the agitator article
Heat transferHot spots, local wall temperatures and the coefficient in a jacket, coil or exchanger the correlations do not cover; cooling of a reactor if agitation stopsThe duty and coefficients come from standard geometry, as in the reactor jacket article
Pressure drop and flow sharingHow flow splits between the branches of a manifold, distributor or sparger; the loss through a one-off fitting or an inlet deviceThe line is straight pipe and standard fittings, as in the line sizing article
TroubleshootingWhy one tube erodes, one nozzle vibrates or one product batch runs hot, when the plant shows the symptom but not the causePlant measurements already point to the cause
Scale-upWhether local conditions (shear, mixing time, temperature spread) stay the same from pilot to commercial sizeThe process is not sensitive to local conditions, or the classical scale-up rules hold
Safety and ventilationGas dispersion in a building, fume extraction, the spread of a releaseA specialist consequence model is the accepted method; these studies are usually bought from specialists

Where a hand calculation or a test is better

CFD is the wrong tool more often than the brochures suggest.

  • When a good correlation exists. Straight pipe, standard fittings, shell-and-tube exchangers and baffled tanks with standard impellers have correlations fitted to thousands of measurements. A CFD study of them costs more and is usually no more accurate.
  • When the inputs are unknown. If the viscosity of a slurry, the kinetics of a reaction or the actual feed rate is a guess, a detailed simulation turns that guess into a detailed wrong answer. Measure the property first.
  • When the physics is beyond the models. Boiling, foaming, slurries near settling, crystallization, polymer melts and fast reactions can all be simulated, but the models carry large uncertainties and need validation data. A pilot test often gives the answer faster and with more confidence.
  • When the answer is needed today. A screening estimate in an afternoon beats a perfect simulation in three weeks if the decision is being made on Friday.
  • When the result cannot be checked. A CFD answer that nothing can confirm should carry little weight in a decision.

Five questions before paying for CFD

QuestionIf yesIf no
1. Is there a correlation or standard method for this geometry and flow?Start with it; use CFD only if the result is marginalCFD is a candidate
2. Will the answer change a decision worth several times the cost of the study?CFD is a candidateStop: the study cannot pay for itself
3. Are the fluid properties and boundary conditions known?CFD is a candidateMeasure them first, or the study rests on a guess
4. Is the physics within what models handle well (single-phase, turbulent, heat transfer)?CFD is a candidatePlan validation data, or test instead
5. Can the result be checked against a hand calculation, plant data or a test?Go ahead, and write the check into the scopeAdd a check, or treat the result as indicative only

A study that passes all five is likely to be worth its cost. One that fails question 2 or 3 almost never is. Part 6 puts numbers on the cost side and compares buying software, using cloud CFD, outsourcing to a consultant and building the skill in-house.

What to ask anyone who sells you a CFD study

  • What exactly is the question, and which number in the report answers it?
  • How large was the mesh, and does the answer change when the mesh is refined? (Part 3)
  • Which turbulence model was used, and why that one? (Part 4)
  • How was convergence judged?
  • Where did each boundary condition come from?
  • What was the result compared against, and how close was it? (Part 5)

A good analyst answers all six without hesitation, and the answers belong in the report.

The series

PartTopicThe question it answers
Part 1What CFD is, and when it is worth paying forShould we use CFD for this at all?
Part 2How to read a CFD result: contours, vectors and streamlinesWhat is this colourful picture actually telling me, and what does it hide?
Part 3The mesh: why the same problem gives different answersIs the answer a property of the flow or of the mesh?
Part 4Turbulence models in plain languageWhich model was used, and how far off can it be?
Part 5Can you trust it? Checking CFD against hand calculationsDoes it agree with the equations I already trust?
Part 6Buy, outsource or build: what CFD costs a small companyWhich way of getting CFD pays for itself?

A note on two earlier articles. The 3D models in the reactor jacket and agitator articles show velocity and temperature fields drawn in the style of a CFD plot, but they are schematic, not solved. Solved versions of both will follow in Chmltech Online Journal papers that use the methods of this series.

Key points

  • CFD solves the conservation equations for mass, momentum and energy on a mesh of small cells. It needs a geometry, a mesh, physics models, boundary conditions and a converged solution, and its answer must be checked.
  • The output is a field of velocity, pressure and temperature, from which come the numbers that matter: pressure drop, heat transfer, blend time, forces, hot spots.
  • Even a small solver can match experiment, here a Strouhal number within 0.6% of experiment once the blockage is accounted for, but only when the simulated problem and the real one are compared with care.
  • CFD pays when the geometry is unusual, the decision is worth much more than the study, and the inputs are known. Otherwise a correlation, a measurement or a pilot test is the better buy.
  • Before paying for a study, ask for the mesh check, the turbulence model, the convergence test, the source of every boundary condition and the comparison with something trusted.

References

  • Williamson, C.H.K. (1988). Defining a universal and continuous Strouhal–Reynolds number relationship for the laminar vortex shedding of a circular cylinder. Physics of Fluids, 31(10), 2742–2744.
  • Williamson, C.H.K. (1996). Vortex dynamics in the cylinder wake. Annual Review of Fluid Mechanics, 28, 477–539.
  • Posdziech, O. and Grundmann, R. (2007). A systematic approach to the numerical calculation of fundamental quantities of the two-dimensional flow over a circular cylinder. Journal of Fluids and Structures, 23(3), 479–499.
  • Provansal, M., Mathis, C. and Boyer, L. (1987). Bénard–von Kármán instability: transient and forced regimes. Journal of Fluid Mechanics, 182, 1–22.
  • Krüger, T., Kusumaatmaja, H., Kuzmin, A., Shardt, O., Silva, G. and Viggen, E.M. (2017). The Lattice Boltzmann Method: Principles and Practice. Springer.
  • ASME PTC 19.3 TW-2016. Thermowells. American Society of Mechanical Engineers.

Test what you have read

Free Process / ChemEng practice exams

Interactive exams with an explanation for every answer. No sign-up.

Keep reading

Related articles

All 214 articles

Ready to find your next improvement?

Book a strategy call. We will talk through your goals, pain points and where AI, systems or process work can make the biggest difference.