# How many cells/elements do I need?

I'm relatively new in the CFD modelling and I'm making a VOF model of a rectangular box ($$l \times w \times h = 120\times 80 \times8$$ m) with an inlet ($$w\times h = 10\times 8$$) at the long side.

The pressure outlet is the upper face of the box ($$l\times w=120\times 80$$m). The box is initially filled with $$5$$m water. Water is flowing in through the inlet, velocities at inlet: around $$0.1$$ to $$0.01$$ m/s

How many cells/elements do I need to get a good indication for the flow pattern in the box?

The answer to your question can depend on quite a few things, such as whether you need a turbulence model, and which one you choose if so, and how you are handling the "top" of your fluid since moving interfaces are nontrivial. You are also imposing discontinuities on the boundary at the edges of your inlet so a nonuniform mesh would be advantageous for you.

While someone may be able to give you a real answer, the best way is to find it yourself. Mesh your problem with what you deem a "reasonable" mesh, solve it, mesh it again with twice as many points, and see if your answers changed. If they didn't you are done, and you have your answer. If they did, either double your number of points again if you think you are close, or start over with the meshing based on where you biggest errors are. Not only will this guarentee a good answer for you problem, it will also start to build your intuition for what types of features need more mesh points, so the next time you will start with a much better mesh.

Concerning the flow simulation, an upper bound is given by the relation $N\geq Re^{9/4}$, where $N$ is the number of mesh nodes and $Re$ is the Reynolds number, derived for direct numerical simulation .

In your case with $L=120m$, $u=0.1m/s$ and $\nu = 10^{-6}m^2/s$, you have $Re \approx 1.2 \cdot 10^5$ what - in theory - means that you will need about $2.7\cdot 10^{11}$ nodes in your mesh to resolve all scales of the flow dynamics.

In practise, however, this number is drastically decreased by using turbulence models or by just not caring about the smallest scales and doing a quasi DNS with adaptive mesh spacing (as @Godric Seer has pointed out).

• DNS generally does not use adaptive mesh spacing because the entire domain contains rich structure down to the finest scales. To use fewer degrees of freedom, you must accept that your computed solution will have O(1) errors in a norm, and instead ask that chosen functionals of the solution converge: time-averaged quantities like drag and pressure on surfaces, or statistics of the energy spectrum. "Not caring about the smallest scales" is also inaccurate. You can do LES, but the discretization and subgrid model have to be chosen carefully to get meaningful results. May 16 '13 at 13:15
• Oh yes, true, I was more about quasi DNS. I will put this right in my answer...
– Jan
May 16 '13 at 13:19