Lesson 7.3Lesson 7.3 · Ventilation & Airflow
CFD Basics for Buildings
What CFD actually solves, how meshing and boundary conditions work - and how easily a beautiful result can be wrong
CFD produces the most persuasive images in all of simulation - and they are the easiest to get quietly, confidently wrong.
A CFD result looks like truth: a smooth, colourful field of air sweeping through a room, arrows curling into elegant vortices. It is deeply convincing - and that is exactly the danger. Behind the picture sit a mesh, a set of boundary conditions and a turbulence model, any of which can be wrong while the image stays beautiful.
This lesson opens the black box. You do not need to derive the equations, but you do need to understand what CFD solves, what you must tell it, and how to tell a converged, mesh-independent result from a plausible-looking fiction. Respect for CFD begins with knowing how it fools people.
The prettier the CFD image, the harder you should interrogate the mesh, boundaries and residuals behind it.
What CFD solves: conservation, cell by cell
At its heart CFD enforces three conservation laws in every cell of the domain: mass (air is neither created nor destroyed), momentum (Newton's second law applied to a fluid - the Navier-Stokes equations), and energy (heat is conserved, which lets it solve temperature alongside flow). You do not solve these by hand; the point is to understand what they express. The momentum equations say that the air in each cell accelerates because of pressure differences, viscous friction, and buoyancy forces - which is why CFD can capture a warm plume rising or a jet bending around a corner.
These equations have no general analytical solution, so CFD solves them numerically: it approximates the smooth reality with a large set of algebraic equations, one set per cell, and iterates until they balance. The consequence is fundamental and worth internalising - CFD is always an approximation. It is not the fluid; it is a discretised, iteratively-solved model of the fluid, and every step in setting it up - how finely you dice the space, what you specify at the edges, how you model turbulence, when you decide it has 'converged' - introduces a choice that can help or harm the answer. The elegance of the output hides how many judgement calls produced it.
Navier-Stokes = conservation of mass + momentum + energy, per cell. CFD approximates it; it is never the fluid itself.
Meshing and boundary conditions: garbage in, garbage out
The first big choice is the mesh - dicing the space into cells. Where the flow changes fast (near walls, around openings, in a jet) you need fine cells; in the calm core you can use coarser ones. Too coarse and the mesh smears out the very features you care about; too fine and the run takes forever. The professional discipline is a grid-independence study: refine the mesh, re-run, and check the answer stops changing. If your result shifts every time you refine, you are reading mesh artefacts, not physics. Near-wall regions get special treatment (fine layers or 'wall functions') because that is where friction and heat exchange happen.
The second big choice is boundary conditions - what you tell the solver about every edge of the domain. An inlet needs a velocity and temperature (and turbulence values); an outlet typically a pressure; walls get a no-slip condition (air velocity is zero at the surface) and either a fixed temperature or an adiabatic 'no heat flow' assumption. These inputs are the problem you are solving. Get the inlet velocity wrong, assume a wall is adiabatic when it is a hot west facade, or place the outlet where no air actually leaves, and the solver will faithfully compute a beautiful, wrong answer. The old computing adage is nowhere truer than in CFD: garbage in, garbage out. Most bad building-CFD results trace not to the solver but to careless boundary conditions.
Turbulence models and convergence
Real building airflow is turbulent - chaotic, swirling at every scale. Resolving every eddy directly (DNS) is far beyond practical computing for a room, so building CFD uses turbulence models that approximate turbulence's average effect. The everyday workhorse is RANS (Reynolds-Averaged Navier-Stokes), typically with a k-epsilon or k-omega model; it is affordable and gives sensible time-averaged fields, but it is a model of turbulence, not the real thing, and it struggles with separation, strong buoyancy and fine jet behaviour. More detailed LES (Large Eddy Simulation) resolves the big eddies and is more faithful, but costs far more. Choosing a turbulence model is choosing a set of approximations, and different models can give visibly different answers to the same room - a fact CFD's confident images conveniently hide.
Then comes convergence. Because CFD iterates, you must decide when the solution has settled. The tool tracks residuals - a measure of how badly the conservation equations are still out of balance - and you watch them fall over iterations. A converged run has residuals that drop by several orders of magnitude and then flatten low; the monitored quantities (a velocity, a temperature) stop drifting. A run whose residuals plateau high, or whose values are still wandering, is not converged - and its pretty field is meaningless. This is one of the most common ways beginners fool themselves: they stop the solver too early, or accept a non-converged result because the picture already looks plausible.
The practical workflow and the tools
Knowing the pieces, here is how a building CFD study actually runs, start to finish. You define the domain - a single room for an indoor study, or the building plus a generous box of surrounding air for an outdoor wind study. You generate the mesh, refining near walls and openings. You set boundary conditions from real data - for outdoor work the inlet is a wind profile that increases with height, taken from the site's wind rose; for indoor work it is the supply or window conditions. You choose a turbulence model (RANS k-epsilon for most design work). You solve, watching residuals. Then you post-process: velocity fields, temperature fields, and derived comfort metrics. Skipping or rushing any step is where errors enter.
The tool landscape spans free to expensive. OpenFOAM is the free, open-source, industrial-strength engine - immensely capable but with a steep, text-file-driven learning curve. Butterfly, part of the free Ladybug Tools suite, drives OpenFOAM from Grasshopper with a visual interface, and is the most accessible on-ramp for designers who already model in Rhino. On the commercial side, Autodesk CFD, Ansys Fluent and SimScale (cloud-based) are faster to set up and better supported, at a price. A crucial caution cuts across all of them: the software does not protect you from a bad model. A polished commercial tool will mesh, solve and render a wrong boundary condition just as beautifully as a free one. The value is never in the button; it is in the setup discipline and the sceptical reading - which is exactly why this lesson spends more words on convergence and boundary conditions than on any menu.
Free (OpenFOAM/Butterfly) or paid (Fluent/SimScale) - the tool never rescues a bad boundary condition.
Reading a field - and CFD's honest limits
When a run is converged and mesh-independent, you read the velocity field for the story: where air moves fast (a jet, a draught risk if it hits an occupant above ~0.8 m/s in cooling), where it stagnates (dead zones, stale air, poor mixing), and where it recirculates. A temperature field shows stratification - warm air pooling high, cool air low - and whether the occupied zone actually gets conditioned air. You are looking for patterns and relative differences between design options, not precise absolute numbers at a point.
And here is the honesty this whole module insists on. CFD's limits are real and easy to forget: results depend on the mesh, the boundary conditions and the turbulence model, all uncertain; a steady-state run captures one condition, not the messy variability of a real day; and the smooth, authoritative image invites far more confidence than the underlying assumptions justify. Treat CFD as an insight tool - it reveals how air behaves and why one option beats another - not as a precise predictor of the velocity at coordinate (x, y, z). Use it comparatively, validate it against a simpler check or measurement where you can, sanity-test every result against physical intuition, and never let a beautiful picture override common sense. A CFD study you cannot defend on its mesh, boundaries and convergence is decoration, not evidence. The most experienced modellers are, tellingly, the most sceptical of their own results - they cross-check a CFD field against a hand calculation, a simpler airflow-network run, or a measured value whenever one is available, precisely because they know how convincingly the method can lie.
Navier-Stokes equations
The momentum-conservation equations governing fluid flow
CFD solves these (plus mass and energy) numerically over a mesh; there is no general analytical solution, so every result is an approximation.
RANS turbulence models (k-epsilon)
Reynolds-Averaged approximations of turbulence's average effect
The affordable workhorse for building CFD; models rather than resolves turbulence and struggles with separation and strong buoyancy. LES is more faithful but far costlier.
Grid-independence study
Refining the mesh until the answer stops changing
The basic professional discipline; a result that shifts with every refinement is reading mesh artefacts, not physics.
Residuals / convergence
Measure of how far the conservation equations are still out of balance
Must fall several orders of magnitude and flatten; a high plateau means the run is not converged and the field is meaningless.
OpenFOAM / Butterfly
Free CFD engine and its Grasshopper front-end
Accessible route to indoor and outdoor building CFD; results are only as good as the user's mesh, boundaries and convergence discipline.
Workshop - run and interrogate a simple room CFD
The goal is not a polished result but the habit of interrogation. You will set up the simplest possible naturally-ventilated room and practise the checks that separate a trustworthy field from a pretty fiction. If you cannot run software, do steps 1-2 and 5 as a paper critique of a published CFD image.
Free: Rhino/Grasshopper with Ladybug Tools Butterfly driving OpenFOAM; or a published CFD figure to critique on paper. No paid software required.
Goal: build the mesh/boundary/convergence critique reflex on a simple case Inputs: Rhino + Grasshopper with Ladybug Tools/Butterfly and OpenFOAM (all free), or a published building-CFD image to critique Time: ~90 minutes (or ~30 for the paper critique)
- 1Model a single rectangular room with one inlet window and one outlet on the opposite wall. Write down, explicitly, every boundary condition you will set: inlet velocity and temperature, outlet pressure, wall no-slip and wall temperature or adiabatic.
- 2Mesh it and run once. Then refine the mesh and run again (a grid-independence check). Compare a monitored value - say average air speed in the occupied zone. Did it change materially? Note what that tells you about trusting the first run.
- 3Watch the residuals during the solve. Record how many orders of magnitude they fall and whether they flatten. Deliberately stop one run early and observe how a non-converged field can still look plausible.
- 4Read the converged velocity field: mark the fast jet, the recirculation loop and any stagnant occupied-zone pocket. State in one sentence what the room's airflow story is.
- 5Interrogate it: change one boundary condition (e.g. inlet temperature) and note how much the field shifts. Write three sentences on where this result could be wrong and how you would sanity-check it against physical intuition or a simpler calculation.
You’ll walk away with
A short critique of your own (or a published) CFD run covering mesh independence, boundary conditions, convergence and one sensitivity - plus a one-line airflow story. The critique, not the colourful image, is the deliverable.
Three altitudes on the same idea
Read the band that fits you — or all three.
Commission CFD with a specific question and demand to see the assumptions, not just the pretty picture. Before you trust a consultant's colourful lobby study, ask what the mesh independence, boundary conditions and convergence were. A CFD image without those is unaccountable. Used well, CFD justifies a design move - a stack outlet, a courtyard, a facade opening - in a way clients and reviewers find compelling.
CFD speaks your language: draught, stuffiness, stratification, whether conditioned air reaches people. A converged velocity field can show that a diffuser layout leaves a meeting table in stagnant air, or that a supply jet blows across a workstation at draught speed. But insist the study models the real occupied condition - the wrong boundary temperatures make the field convincing and useless.
Learning to critique a CFD result matters more than learning to run one. Anyone can press solve; the skill that gets hired is asking 'was this mesh-independent? did the residuals converge? what turbulence model, and does the answer survive changing it?' Start free with Butterfly driving OpenFOAM inside Grasshopper on a simple room, and practise reading fields sceptically.
“A CFD result is objective and precise because it is based on real physics.”
Do it yourself
Interrogate, do not admire - reason it through.
- 1Name the three conservation laws CFD enforces in every cell.
- 2Why is a CFD result always an approximation, no matter how fine the mesh?
- 3What is a grid-independence study, and what does it protect you from?
- 4How do you tell from the residuals whether a run has converged?
- 5Give two reasons a beautiful CFD image can still be wrong.
The one line to carry out
Peer-reviewed journals & authoritative standards
- 01Computational fluid dynamics — Wikipedia, 2026.
- 02OpenFOAM — The OpenFOAM Foundation, 2026.
- 03Ladybug Tools (Butterfly CFD) — Ladybug Tools LLC, 2026.
- 04Natural ventilation — Wikipedia, 2026.
- 05Passive solar building design — Wikipedia, 2026.
CFD needs wind and pressure data at its boundaries - and so does every ventilation decision. The last lesson turns to the raw material: wind roses, pressure coefficients on facades, and using real wind data to place and size openings.
The author
Amogh N P
Architect, interior designer, and creative polymath. Studio Matrx began in his notebooks — his vision of design made honest, useful, and open to everyone. Its Academy is written and taught in his memory, and free, forever.
More about Amogh →