I am not very familiar with FEM and have limited knowledge about its implementation for the Navier-Stokes equation. Currently, I am trying to understand the principles of FEM and parallel computing, but my learning progress is slow.

For now, my research involves solving 2D/3D N-S equation and temperature equation under a large range of Ra/Re number(10^5<=Ra<=10^10). Consequently, the computational cost increases significantly due to the Kolmogorov length scale. To study a 2D convective heat transfer problem, I tried to adapt the script Rayleigh-Benard-time.edp by frederichecht, it works well but, slower and slower when Ra increases.
My serial script uploaded:R-B_obstacles.edp (7.8 KB)

My supervisor recommends the projection algorithm and parallel computing.
The projection method avoids solving a large system at a time, replaced by 2 or 3 decoupled equations for velocity and a Poisson-like equation for pressure. A implementation NSprojection.edp uses only P1 elements, but some common practices using the pressure space 1 order lower than the velocity space such as P2-P1.
I watched the tutorial Pierre Jolivet introduction to parallel FreeFEM part 1, I noticed that the equation for pressure pb4p(q, w, solver=CG, init=n, eps=epsp) = int2d(Th)(dx(q)*dx(w) + dy(q)*dy(w)) - int2d(Th)((dx(u) + dy(v))*w/dt) could be solved in parallel just as the video did.

To find some power law through a series of simulations under a large range of Ra, I need to ensure my numerical results reflect the properties of the equation derived from true physical world correctly.

So the problems are:

Can NSprojection.edp handle high Reynolds numbers and be easily adapted in parallel?

Hello,
I am not an expert on parallel issues, but I can give you some hints on the other parts.
2. You should not use convect, which is relevant when there is no viscosity. Since you have viscosity you can solve the convection implicitly as

In the projection method it is not mandatory to satisfy an inf-sup condition (thus you can use P1/P1), but you will get a more accurate solution if the inf-sup condition is satisfied (as for P2/P1).

Sorry but I am a bit confused. Why the built-in function convect relevant to inviscid flow?
I have no idea because the convection term u'*grad(u) is without nu.
Also, those serial examples related to N-S equation like NSUzawaCahouetChabart.edp using “convect” and they are indeed viscous flow. Could you please explain this further or if I have some misunderstanding?
Thank you very much for your help,
H. Weng

The fact is that when there is no viscosity the problem is hyperbolic. Thus you should not use the implicit formulation because it could be unstable, and give weak or strong oscillations. You should use convect, which is adapted to the hyperbolic structure.
With viscosity you have elliptic regularization of the gradient of the solution, that stabilizes the implicit resolution of convection (intuitively second-order derivatives dominate the first-order ones involved in the convection). This holds with a moderate Reynolds number Re=L*u/nu. But you are right in this case you can also use convect even if it is of really different nature than the spirit of finite elements (but it is truly relevant if you consider small viscosity i.e. large Reynolds number).
Indeed since there is space discretization the real key value is the discrete Reynolds number Re_h=h*u/nu with h the size of the mesh cell. If Re_h is not too large then the implicit formulation is possible.

Thank you very much for such detailed response. I need some time to digest those different stability properties of PDEs.

So, if the discrete Reynolds number Re_h is not too large, computational stability can be guaranteed, right? From the definition Re_h=h*u/nu, it appears to imply that the size h is proportional to nu/u, when I take Re_h fixed. Before, when simulating some 3D pipe flow I just build a initial 2D mesh, and for different Re=1/nu, and do splitting to the initial mesh to ensure h_local*Re^3/4=const. My problem definition, similar to NSprojection.edp, using convect, but with an extra dimension z, I noticed that sometimes, during the transition to turbulence, the computation blows up when timestep too large.

Is it better, for the stability and accuracy of computing, to use something like adaptmesh to let local mesh size h = const*nu/u? Here, the exponent of Re_h is 1, whereas that of the Kolmogorov scale is 3/4. I would like to know if maintaining the condition of an appropriate Re_h is more strict than that of an appropriate Kolmogorov scale to resolve the details. Further more, what are the criteria for selecting an appropriate mesh size in DNS within FEM?

The condition say Re_h<1 does not mean that you get an accurate solution, it just means that your computation is stable with respect to space discretisation if you use the implicit method for advection.
If you use convect this condition is not required.
If you have other criterion on h to achieve accuracy, you have to respect them additionally.
Concerning time stability, probably you need to respect that nu*dt/h^2 and u*dt/h of order of unity at most.
The mesh size h should be dictacted a priori by your data: it should be the cutoff length under which you do not wish to compute the details of the solution. But as you say it should be small enough in relation with nu in order to resolve your Kolmogorov scale.