The problem about 2D turbulent flat plate

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
zhuimengboy
Posts: 10
Joined: Wed Aug 05, 2015 10:15 am

Re: The problem about 2D turbulent flat plate

Post by zhuimengboy »

Hello,

I find a phenomenon. Although have good distribution of turbulent viscosity if I set turbulent intensity equate to 0.001, it will have a waring from Python, like turbulent intensity must not be neither negative neither 0. If I set 0.01, though have any waring, but have little oscillation.

Best regards

Yong Wang
Martin FERRAND
Posts: 47
Joined: Wed Mar 14, 2012 10:06 am

Re: The problem about 2D turbulent flat plate

Post by Martin FERRAND »

Hello,
concerning your "problem" mentioned in:
zhuimengboy wrote:Thank Yvan for your reply!
I'm a postgraduate from Northwestern Polytechnical University, China. Our research direction is lattice Boltzmann method(LBM). Since last September, I interested in Finite Volume LBM(FVLBM), and finial choose Code_saturne as a develop platform. In the program, we don't modify the pre-process and post-process model of Code_saturne, and use a program fvlbm.f90 instead of tridim.f90. Recently, we finish part of laminar cases and attend a cofference named ICMMES 2015, Beijing, to display our work. Here, thank for the developer of Code_saturne and I promise the purpose of use Code_saturne just academic research and don't have any commercial object, furture we will cite some paper about Code_saturne in our paper.
Recently, we want do some turbulent simulations use FVLBM coupled with RANS models. First, we want to simulate some test cases correctly use NS sovler in Code_saturne. As I have little knowledge about macro method, I still a newer in Code_saturne and encouter difficulty about problems of boundary conditions. The mesh I used named grid_quad_137x97_vol.cgns in website. All cells are cuboid. As I also set farfield boundary as outlet boundary condition, so I have one inlet and two outlet. What confuse me is that the nusa far from wall is much higher than district near wall(have the largest nusa at the corner of two outlet). I guess the problem in not the mesh. And now I don't have any idea what to do next!
Thanks!
It is normal that nusa (which is directly linked to the turbulent viscosity for Eddy Viscosity models is greater far from walls (the basic Prandtl model gives ).

Best Regards,

Martin
Martin FERRAND
Posts: 47
Joined: Wed Mar 14, 2012 10:06 am

Re: The problem about 2D turbulent flat plate

Post by Martin FERRAND »

Hello,
concerning questions 1-5 of the message:
zhuimengboy wrote:Hello, Yvan
I am sorry to disturb you again. In the last three months, I prepared the exam, and delayed my work.
Recently I continue to simulate 2D turbulent flat plate(use SST model).
As your suggestion, I generate a new mesh, and have any waring about y+ in the listing. And reduce time step, it works well.
Now I have some basic questions(maybe foolish):
1. About how to set reference value viscosity mu. I set rho=1.0, Uref=1.0, and the length of plat is 2.0, so the Lref=2.0. But I can't set Lref in GUI. As Re=5million, so mu=rho*Lref*Uref/Re=4.0e-7, is this right?
2. About reference length(used for initialization turbulence). For plate, how to set correctly?
3. About the initialization of k and w. Use default value in GUI, the turbulent viscosity so high at farfield(from NASA website, the turbulent viscosity is very little at farfield). I set k=1.0e-8, w=0.004(the idea come form another topic in this forum), it seems work. But how to initialize k and w correctly, I have no idea.
4. About hydraulic diameter and turbulent intensity. For inlet boundary condition, it have three different setting. I test three cases, a) given constant k and w equate to the initialization of k and w, it seem all right but have a little oscillation up of plate; b) given only hydraulic diameter(as I don't know how to define hydraulic diameter for plate, so use default value 1.0), is seem incorrectness; c) given both hydraulic diameter and turbulent intensity. The hydraulic diameter equate to default value, and set turbulent intensity very little(about 0.001), it seems very well. So the result of case 3 have good distribution of turbulent viscosity compare to NASA result. But how to define hydraulic diameter and turbulent intensity for plate correctly?
5. I wish you can explain the difference between three wall functions for SST model in GUI, or some paper about it?
6. Finally, I can't find the code about inlet boundary condition in condli.f90, so where the code about inlet boundary? I wish you can tell me(I will use it for coupling my LBM code with SST model in Code_Saturne).
As I study turbulent model recently and my English is poor, I wish I have explain my problem correctly and maybe the questions are very foolish :) .
Thank Yvan and other developers of Code_Saturne again.

Best regards

Yong Wang
1-2) you can set "almax" in routine "cs_user_parameters.f90" (usipsu I think) as the reference value used in the initialisation of the turbulence. By the way, you can impose whaterver you want for initial value of turbulent fields in "cs_user_initialisation.f90".
3) The initial value is high because by default in Code_Saturne, the initial conditions are for head flows. You can change "almax" to solve this.
4) There is no clear definition of the hydraulic diameter for free flows (as no closed surface can be considered as inlet). You can choose as D_h the maximum height of your case (by default it is the total volume to the power 1/3). More details between a), b) c) are given at:
http://code-saturne.org/doxygen/src/turent_8f90.html

5) The two first wall functions are detailed here:
http://code-saturne.org/cms/sites/defau ... theory.pdf
5.4.1 Velocity boundary condition for smooth walls and rough walls

Best Regards
Post Reply