CFD Mesh Cell Count Estimator

CFD Mesh Cell Count Estimator

How many cells your mesh will have, and how much RAM that implies, worked out before the mesher runs for an hour and falls over. Cell count by region, the multiplier every refinement level contributes, and the prism-layer count on its own — because the inflation layers are usually a third or more of the mesh and almost nobody expects that.

Mesh cell count and the RAM it implies

domain, base cell size, refinement levels, prism layers → cells by region and total
The whole box, inlet to outlet, not the body. If you do not know it yet, the domain size and blockage calculator turns body lengths into metres and gives you the volume directly.
Full width. Halve it if you are modelling half the body on a symmetry plane, and the cell count halves with it — which is the single cheapest thing you can do to a mesh.
Full height. For a ground-vehicle or building case this is the distance from the ground plane to the top boundary; there is no second half to remove.
The coarsest cell in the domain — the size the background grid would have with no refinement anywhere. Everything else on this page is expressed as halvings of this, because that is how every octree and every trimmed-cell mesher works. Cell count scales as Δ⁻³ in the volume and Δ⁻² in the prism layers, so a 20% reduction in Δ is about 95% more volume cells.
Each level halves the cell size, so in three dimensions it multiplies the cell density in the region it covers by eight. Four levels is 4096 times the density of the background — which is why a refinement box drawn a little too generously is the usual reason a mesh comes out three times bigger than intended.
The fraction of the WHOLE domain volume that ends up at Δ/2, counted once — the levels here are disjoint shells, not nested boxes. Estimate it as the volume of your refinement region divided by the domain volume. This is the input you will be most wrong about, and it is the one the answer is most sensitive to.
Fraction of the domain volume at Δ/4. Multiplies the local cell density by 64.
Fraction of the domain volume at Δ/8. Multiplies the local cell density by 512. A wake refinement box that looks modest on screen commonly lands here.
Fraction of the domain volume at Δ/16. Multiplies the local cell density by 4096, so a tenth of a percent of the domain at this level costs about four times the whole background mesh.
Wetted area of every surface you are inflating — the body, and the ground plane if that is a wall rather than a slip boundary. Read it off the CAD or the surface mesh. A road under a car is often larger than the car and doubles this number, which is a very common surprise.
Sets the surface cell size, and through it the number of faces the prism stack sits on. Prism cell count goes as the square of this: one more halving is four times the prism layers, and the prism layers are already the biggest single block on most external-aero meshes.
Number of layers in the stack. The count is linear in this, so twenty layers on a finely refined surface is twenty times the surface face count in cells. Use the prism layer stack calculator to choose the count, the first height and the growth rate; use this page to find out what that choice costs.
Cells per unit volume at a given target size, and faces per unit area on the surface, are set by the topology and nothing else. The three factors on this page are derived rather than quoted: a trimmed Cartesian or hex-dominant mesh holds one cell per Δ³ by definition; a tetrahedral mesh holds 6 per Δ³ (the Delaunay triangulation of a cubic lattice splits each cube into exactly six tetrahedra — the upper bound, regular tetrahedra of edge Δ, is 6√2 = 8.49); a polyhedral mesh has one cell per NODE of the tetrahedral mesh it dualises, which for that same lattice is exactly one per Δ³, and vendors report a 3 to 5 times reduction from tet, so 1.2 is the low end of the overlap. On the surface an equilateral triangle of side Δ covers √3/4 Δ² = 0.433 Δ², so a triangulated surface carries 2.31 faces per Δ² against a quad mesh’s 1.0, and dualising it halves that to 1.155.
The most useful input here. Mesh once, divide the cell count you actually got by the count this page predicted, and put the ratio in. Every later estimate for that geometry and that mesher is then right to within a few per cent instead of a factor of two, because the calibration absorbs the buffer layers, the curvature and proximity refinement and the quality repair that no closed form can know about.
5.328 GB per million cells is what the CFD memory and runtime calculator returns for a polyhedral mesh on a pressure-based coupled solver in double precision — its own default combination. Change the solver, the precision, the phase count or the number of transported equations THERE, not here: this page sizes the mesh, that page sizes the solver, and the two must not carry two copies of the same model.
30.417million cellsExample

A 30 × 12 × 8 m domain, 128 mm base cells, four refinement levels covering 6%, 2%, 0.6% and 0.15% of the domain volume, 30 m² of wall carrying 20 prism layers on surface cells four levels below the base size, polyhedral topology, no calibration, 5.328 GB per million cells

Advertisement

Cells by region, and where each factor comes from

Nuniform = c · kV · V/Δ³  ·  Nlevel k = c kV (V/Δ³) fk 8k  ·  Nvolume = c kV (V/Δ³) [f0 + Σk fk 8k]  ·  Δs = Δ/2ns  ·  Nprism = c kF ksplit (Aw/Δs²) np  ·  N = Nvolume + Nprism
V/Δ³
cells a uniform background mesh of size Δ would put in the domain. Everything else on this page is a multiplier on this one number
f_k
share of the DOMAIN volume sitting at refinement level k, counted once. The levels are disjoint shells, not nested boxes, and f_0 = 1 − Σ f_k is what is left at the base size
8^k
cell-density multiplier of level k in three dimensions. Halving the cell size in each of three directions is eight times the cells: 8, 64, 512, 4096
k_V
cells per Δ³ for the topology. 1.0 for hex-dominant or trimmed Cartesian by definition, about 6 for tetrahedra (six tetrahedra per cube in the Delaunay triangulation of a cubic lattice; 6√2 = 8.49 for regular tetrahedra of edge Δ), about 1.2 for polyhedra (one cell per node of the tet mesh it dualises)
k_F
surface faces per Δ² for the topology. 1.0 for a quad mesh, 2.309 for a triangulated surface (an equilateral triangle of side Δ has area √3/4 Δ² = 0.433 Δ²), 1.155 for the polygonal dual of that triangulation
k_split
cells per prism per layer. 1 for a hex or a polyhedral prism, 3 for a tetrahedral mesher, because a triangular prism splits into exactly three tetrahedra
A_w
wetted wall area carrying the prism stack. The ground plane counts if it is a wall, and under a road vehicle it is usually larger than the vehicle
c
your own calibration factor. Mesh once, divide the count you got by the count predicted, and put the ratio here — it absorbs the buffer layers, curvature and proximity refinement and quality repair that no closed form can predict

Worked example

A 30 × 12 × 8 m domain, 128 mm base cells, four refinement levels covering 6%, 2%, 0.6% and 0.15% of the domain volume, 30 m² of wall carrying 20 prism layers on surface cells four levels below the base size, polyhedral topology, no calibration, 5.328 GB per million cells
The domain volume is 30 × 12 × 8 = 2880 m³, and 128 mm cells would fill it with 2880/0.128³ = 1,373,291 cells if nothing were refined. That is the number every other figure on this page is a multiple of.
The refinement multiplier. The shares add to 8.75%, so 91.25% of the domain stays at the base size. The bracket is 0.9125 + 8(0.06) + 64(0.02) + 512(0.006) + 4096(0.0015) = 0.9125 + 0.48 + 1.28 + 3.072 + 6.144 = 11.8885. Note what that shows: level 4 covers a seventh of one per cent of the domain and contributes more cells than the entire background.
Polyhedral topology carries about 1.2 cells per Δ³, so the volume mesh is 1,373,291 × 11.8885 × 1.2 = 19.59 million cells.
Now the prism stack, which is a completely separate calculation and the one people leave out. Four halvings puts the surface cells at 128/16 = 8 mm. A quad mesh would carry 30/0.008² = 468,750 faces; the polygonal dual of a triangulation carries 1.155 times that, so 541,266 faces.
Twenty layers on those faces is 541,266 × 20 = 10.83 million prism cells — 35.6% of the finished mesh, from a stack that occupies a layer about 8 mm thick on a domain 8 m tall. That is the number this page exists to put in front of you.
Total 19.59 + 10.83 = 30.4 million cells, and at 5.328 GB per million that is 162 GB of solver memory — a two-node job on 128 GB nodes, not a workstation job.
Then the honest part. Take this as 30 million with a plausible range of about 17 to 53 million. The spread is not sloppiness, it is what an unstructured mesher does that no formula can see: buffer layers inserted at every size jump, curvature and proximity refinement you did not ask for, feature-edge refinement along every sharp edge, the prism stack retreating to fewer layers where the geometry pinches, and quality repair adding cells after the fact. Mesh once, divide, and put the ratio in the calibration box — after that the estimate is good to a few per cent.
One deliberate simplification: the prism stack physically displaces about one face-layer of volume cells (30 × 0.008/0.008³ is the same 468,750), so the total here double-counts roughly one layer in twenty, about 2%. That is well inside the factor-of-two spread and is left in rather than modelled.

What one refinement level costs, by the share of the domain it covers

Share of the domain volumeLevel 1 (×8)Level 2 (×64)Level 3 (×512)Level 4 (×4096)
0.1%0.008× the base mesh0.064×0.51×4.1×
0.5%0.04×0.32×2.6×20×
1%0.08×0.64×5.1×41×
5%0.4×3.2×26×205×
10%0.8×6.4×51×410×
20%1.6×13×102×819×
Read the multiplier against the whole background mesh. The point is the asymmetry: a level-1 box covering a fifth of the domain adds 1.6 background meshes, while a level-4 box covering a five-hundredth of it adds four. Refinement boxes drawn by eye are almost always too generous at the fine end, and that is where the cost is.

Cells per Δ³ and faces per Δ², and where each number comes from

TopologyCells per Δ³Surface faces per Δ²Cells per prism per layerDerivation
Hex-dominant / trimmed Cartesian1.01.01Definition: one cell per Δ³, one quad face per Δ²
Polyhedralabout 1.21.1551One cell per node of the tet mesh it dualises. For the cubic-lattice triangulation that is exactly 1.0 per Δ³; vendors report a 3 to 5 times reduction from tet, which with 6 per Δ³ gives 1.2 to 2.0. The surface figure is half the triangle count, because a large triangulation has about twice as many faces as vertices
Tetrahedralabout 62.3093Six tetrahedra per cube in the Delaunay triangulation of a cubic lattice. Regular tetrahedra of edge Δ would give 6√2 = 8.49, so 6 to 8.5 is the honest band. An equilateral triangle of side Δ covers √3/4 Δ² = 0.433 Δ², hence 2.309 faces per Δ². A triangular prism splits into exactly three tetrahedra
Not vendor claims. Each of these is a geometric identity you can check, and that matters because the difference between them is the difference between a 26 million cell mesh and a 163 million cell one on exactly the same geometry at exactly the same target size. The tetrahedral figure is the least certain, because a production tet mesh is neither a lattice triangulation nor regular; 6 is the lower bound of the range and a real mesher will often come in higher.

Where the factor-of-two spread comes from

CauseDirectionTypical size
Buffer layers at every cell-size jumpmore cells5 to 25% of the volume mesh, worse with many levels
Curvature refinement on the surfacemore cellsconcentrated on the body; can double the prism face count on a curvy geometry
Proximity or gap refinementmore cellsvery large in narrow gaps — a 2 mm gap meshed with 4 cells across forces 0.5 mm cells wherever it appears
Feature-edge refinementmore cellsa few per cent on a smooth body, much more on anything with trim and panel lines
Prism stack retreating or collapsingfewer cellsreduces the prism block near sharp edges and in tight concave corners, commonly 5 to 20%
Refinement region volume misjudgedeither waythe biggest single term. A refinement box 20% too large in each direction is 73% too much volume
Quality repair and smoothingmore cellsusually small, a few per cent
Every one of these is a real mechanism rather than a fudge, and all but one push the same way — which is why an honest estimate is asymmetric: being 30% under is much more likely than being 30% over. This is also exactly why the calibration factor is the most valuable input on the page. One measured mesh replaces all seven rows.

What actually drives a cell count, and why the prism layers surprise everyone

A cell count is a volume divided by a cell volume, plus a surface area divided by a face area times a layer count. That is the whole model. Everything difficult about estimating a mesh is that the two terms have different exponents — the volume term goes as Δ⁻³ and the prism term as Δ⁻² — so they change places as the mesh gets finer, and intuition built on one of them is wrong about the other.

Start with the number nobody expects: the prism layers. On the worked example above they are 36% of the mesh. That is not an unusual case, it is the normal case for external aerodynamics and for any conjugate heat transfer problem. The reason is arithmetic. A prism stack is a two-dimensional object — one cell per surface face per layer — so its count scales as the surface area over the square of the surface cell size, and refining the surface by one level quadruples it while refining the volume by one level in a small box adds much less. Twenty layers on 8 mm cells over 30 m² is eleven million cells sitting in a shell a few millimetres thick. If you need the mesh smaller, that is where to look first, and the prism layer stack calculator is where to decide how many layers you can give up without losing the boundary layer.

The refinement levels are where a mesh gets away from you. Each level halves the cell size, which in three dimensions multiplies the local cell density by eight; four levels is 4096. The consequence is that the cost of a refinement region is dominated by its innermost shell, and the innermost shell is the one whose volume you estimated worst. In the worked example the level-4 region is 0.15% of the domain and contributes more cells than the entire background mesh. Draw that box 20% larger in each direction and you have added 73% to the most expensive term on the page. This is the single most common reason a mesh comes out two or three times bigger than the engineer intended, and it is not a mesher defect — it is a cubic function being estimated by eye.

Topology changes the answer by a factor of six, at the same target cell size. The factors used here are derived rather than quoted, because vendor claims about cell counts are not comparable between vendors. A trimmed Cartesian or hex-dominant mesh holds one cell per Δ³ by construction. A tetrahedral mesh holds about six, and the bound is checkable: the Delaunay triangulation of a cubic lattice splits every cube into exactly six tetrahedra, while regular tetrahedra of edge Δ would give 6√2 = 8.49, so a real tet mesh at target size Δ lands somewhere in 6 to 8.5. A polyhedral mesh has one cell per NODE of the tetrahedral mesh it dualises — for that same lattice, exactly one per Δ³ — which is why polyhedral and hex meshes come out within a small factor of each other and both come out several times smaller than tet. On the surface the same reasoning gives 1.0 faces per Δ² for quads, 2.309 for triangles (an equilateral triangle of side Δ covers only 0.433 Δ²) and 1.155 for the polygonal dual, and a tetrahedral mesher splits each prism into three tets. Those are the six numbers this page runs on and you can check every one of them.

Be clear about what this estimate is worth. A factor of 1.5 to 2 either way is normal for an unstructured mesher, and the spread is one-sided: buffer layers at size jumps, curvature refinement, proximity refinement in gaps, feature-edge refinement and quality repair all add cells, while only the prism stack retreating near sharp geometry takes them away. So expect to land above this number rather than below it. The fix is not a better formula, it is one measurement: mesh the geometry once, divide the count you got by the count predicted here, and enter the ratio in the calibration box. After that the estimate is good to a few per cent for that geometry and that mesher, because the calibration absorbs every mechanism in the list at once.

What to do with the answer. The cell count decides three separate things, and only the first is about the solver. It decides whether the case fits in memory — take the RAM figure here as a first pass and then go to the CFD memory and runtime calculator, which handles the solver, the precision, the phases and the per-node allocation that actually decides whether a job starts. It decides whether the MESHER will finish, which is a different and usually tighter constraint, because an unstructured mesher holds several times the solver’s per-cell memory while it works and most of them are poorly parallel. And it decides whether you can afford a grid convergence study at all: a GCI needs three meshes in a geometric family, so the coarse mesh has to be affordable and the fine mesh has to exist, and a 30 million cell medium mesh implies a 100 million cell fine one at a refinement ratio of 1.5. Deciding that before meshing is the entire point of a page like this.

Advertisement

Frequently asked questions

Why is my mesh always bigger than the estimate?

Because almost every mechanism an unstructured mesher has adds cells, and only one takes them away. Buffer layers appear at every cell-size jump whether you asked for them or not. Curvature refinement subdivides where the surface bends. Proximity refinement subdivides in gaps — and a single 2 mm gap meshed with four cells across forces 0.5 mm cells everywhere that gap appears, which can dominate the whole count. Feature-edge refinement follows every sharp edge. Quality repair adds a few per cent after the fact. The only mechanism working the other way is the prism stack retreating to fewer layers near sharp or pinched geometry. So expect to be under, not over, and use the calibration factor rather than arguing with the formula.

Should the prism layers really be a third of my mesh?

Usually yes, on an external-aero or heat-transfer case. It is a consequence of the exponents: the prism count is an area divided by the square of the surface cell size, times the layer count, so it does not care how large the domain is — only how much wall there is and how finely it is resolved. A body with 30 m² of wall at 8 mm surface cells and 20 layers is eleven million cells no matter whether the domain is 2000 m³ or 20 000 m³. If the share is over about 40% the cheapest saving is nearly always one fewer surface refinement level, which quarters it, or a few fewer layers with a slightly larger growth rate. Check what that does to the wall resolution on the prism layer stack calculator first — the stack has to still cover the boundary layer.

What base cell size should I start from?

Work backwards from the smallest feature you must resolve and the number of refinement levels you are willing to carry, not forwards from the domain. If the finest cell you need is 8 mm and you are prepared to run four levels, the base cell is 128 mm. Choosing the base size first and then discovering you need six levels to reach 8 mm is how meshes reach a billion cells: each extra level multiplies the density in its region by eight, and the buffer layers between levels multiply too.

The domain here is a box. What about the ground plane, or a symmetry plane?

A symmetry plane halves the domain volume and therefore halves the volume cells, and it halves the wall area too, so it halves the whole mesh. Enter the halved dimensions and the halved wall area. A ground plane does the opposite: if the ground is a no-slip wall it needs its own prism stack, and under a road vehicle the road inside the refinement region is often larger in area than the vehicle. Add it to the wall area. That single omission is the most common reason a prism count comes out half of what the mesher produces.

Does this include the boundary faces, or the interior faces?

No — it counts CELLS, which is what solver memory and solver time scale with. Face counts follow from the topology if you need them: a hex mesh has about three interior faces per cell, a tetrahedral mesh two, a polyhedral mesh six or seven, and the memory per cell tracks that ratio, which is exactly why the memory page charges a polyhedral cell 1.8 times a tetrahedral one. So a tet mesh has six times the cells of a poly mesh but each cell is cheaper — the net penalty is about three and a half times, not six.

How do I use this to plan a grid convergence study?

Pick the medium mesh first, then check that both neighbours are affordable. A GCI wants a refinement ratio of at least about 1.3 in cell size between meshes, which in three dimensions is a factor of 2.2 in cells; at a ratio of 1.5 it is 3.4. So a 30 million cell medium mesh implies roughly 9 million coarse and 100 million fine at a ratio of 1.5. Set the base cell size on this page to your medium value, then to that value divided and multiplied by the ratio, and read the three counts off before you commit to any of them.

Why does the estimate not ask for the prism stack thickness?

Because the cell count does not depend on it. A prism stack of n layers on a given surface face is n cells whether the stack is 0.1 mm or 10 mm thick — the thickness, the first-layer height and the growth rate change the QUALITY of the stack and the y+ you land on, not its count. Those are decided on the prism layer stack calculator and the y+ and first cell height calculator. The one place thickness does enter is the small double count noted in the worked example: the stack displaces about one face-layer of volume cells, roughly 2% of the total on the default numbers.

Related calculators

References

  1. Derived for this page rather than taken from a source: the topology factors. A trimmed Cartesian mesh holds one cell per Δ³ by definition. The Delaunay triangulation of a cubic lattice (Kuhn’s triangulation) splits each cube into exactly six tetrahedra, giving 6 per Δ³, while regular tetrahedra of edge Δ have volume Δ³/(6√2) and so give 6√2 = 8.485 per Δ³ — the honest band for a production tet mesh at target size Δ is between those two. An equilateral triangle of side Δ has area √3/4 Δ² = 0.4330 Δ², so a triangulated surface carries 2.3094 faces per Δ²; Euler’s formula gives F ≈ 2V for a large closed triangulation, so its polygonal dual carries half that, 1.1547. A triangular prism decomposes into exactly three tetrahedra.
  2. A. Okabe, B. Boots, K. Sugihara and S. N. Chiu, on the Poisson–Delaunay tessellation in R³: the expected number of tetrahedra per vertex is 24π²/35 = 6.768. Cited as the independent check on the polyhedral factor — dividing a tet count by 6.77 rather than by 6 gives 0.89 cells per Δ³, close to the lattice value of 1.0 and below the vendor-reported reduction, which is why 1.2 is used here as the low end of the range rather than 1.5 or 2.
  3. ANSYS Fluent User’s Guide, section on converting a mesh to polyhedra, for the reported reduction in cell count of roughly 3 to 5 times from the tetrahedral mesh it is built from. Cited, not reproduced. Note that this figure and the geometric dual argument disagree — 3 to 5 implies 1.2 to 2.0 cells per Δ³ where the dual gives about 1.0 — most likely because a production tet mesh is not a lattice triangulation and because prism regions convert differently. The lower end is used here and the disagreement is stated rather than hidden.
  4. Siemens Simcenter STAR-CCM+ documentation on the polyhedral and trimmed-cell meshers, and on prism-layer generation, for the behaviour this page models: growth and buffer layers at cell-size transitions, curvature and proximity refinement, and prism-layer retreat near sharp features. Cited for behaviour, not for numbers.
  5. Cell counts and memory are kept consistent with the CFD memory and runtime calculator on this site: 5.328 GB per million cells is that page’s own default combination (polyhedral mesh, pressure-based coupled solver, double precision, single phase), being 1.8 × 1.85 × 1.6. The per-cell model deliberately lives on that page alone so the two cannot drift apart.

Setup guidance, not validation. Correlations have ranges of validity and cell-count estimates are order-of-magnitude. A converged simulation is not a correct one. Full disclaimer at calcengines.com/disclaimer/