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

The problem about 2D turbulent flat plate

Post by zhuimengboy »

Hello, everyone:
I'm a newer in Code_saturne. Recently I want to simulate a case that 2D turbulent flat plate. The Re is 5 miilon and the mesh is download form NASA Turbulence Modeling Resource(http://turbmodels.larc.nasa.gov/). The RANS model which I used is S-A turbulent model. I have some questions about how to set boundary condtion. In GUI, have no farfield boundary condition, so I have to set Outlet boundar condition for the farfield boundary. In listing file, "Incoming flow detained for 132 outlet faces on 232" is usually found, I can't unstandard what meaning of this word. And near farfield boundary, the nusa is too higher. So, how to set boundary condition correctly? Finialy, I have no confident about how to simulate turbulence flow in Code_Saturne, maybe I use wrong parameter that set in XML file.
My English is poor, I wish I have explain the problem which I encounter correctly.
Attachments
nstest.xml
(6.7 KiB) Downloaded 257 times
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: The problem about 2D turbulent flat plate

Post by Yvan Fournier »

Hello,

I can't download the mesh right now (I can do it in a few days). Is your mesh a tetrahedral mesh ? Code_Saturne's outlet boundary condition model is quite sensitive to irregular thickness in the outle layer. I'll need to check with colleagues which options my help here. Prolonging the output with 2 layers of extruded (automatically prism if extruded) cells can also help here.

Regards,

Yvan
zhuimengboy
Posts: 10
Joined: Wed Aug 05, 2015 10:15 am

Re: The problem about 2D turbulent flat plate

Post by zhuimengboy »

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!
Attachments
nusa.png
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: The problem about 2D turbulent flat plate

Post by Yvan Fournier »

Hello,

Thanks for the info on your usage.

For your information, the GPL licence of Code_Saturne allows its use for any purpose, including commercial, just not its distribution (you are allowed to use the code for studies for sale, but if you modify the code, you cannot sell/distrbute the modified version without distributing the modifications to anyone who asks, with no other restriction).

In any case, we are happy if you cite the code (and we'll be happy if you can send us the reference to your article).

I am not too sure I undestand you problem correctly (I am the "high performace computing" and pre/post processing /code coupling expert on the Code_Saturne team, but some of my collegues know the turbulence and numerical parts much better than me).

If you can post your setup (xml file from the GUI and/or user subroutines from the test case), I'll try to look at it in a few days.

Best regards,

Yvan
zhuimengboy
Posts: 10
Joined: Wed Aug 05, 2015 10:15 am

Re: The problem about 2D turbulent flat plate

Post by zhuimengboy »

Thank Yvan very much!
Here I upload the cases which set up in Code_saturne. Inculde mesh, xml file, schematic of flat plate, and two post-process files.
a. In picture of schematic, as In GUI have no farfield boundary condition, I also set as outlet boundary condition;
b. xml file. I set two Reynoly numbers, laminar flow at Re=50000, turbulent flow at Re=5 million(The length of plat flate is 2);
c. for laminar(Re50000) and turbulent(Re5000000) are two results which I obtained.
d. the mesh is download from NASA website. I modify the name of boundary face groups as the oringal name is too long.
For laminar flow, have some problem at sym. And for turbulent flow, I don't have the correct nusa.

Regards :D !

Yong Wang
Attachments
cases.tar.gz
(1.64 MiB) Downloaded 206 times
zhuimengboy
Posts: 10
Joined: Wed Aug 05, 2015 10:15 am

Re: The problem about 2D turbulent flat plate

Post by zhuimengboy »

I'm sorry I forget to tell somebody who can help me something. The version which I used is 3.0.5. And I do not use user subroutine in case. If some other files will help to solver the problem, please tell me then I will upload. :D
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: The problem about 2D turbulent flat plate

Post by Yvan Fournier »

Hello,

I'll check with colleagues tomorrow to see if there were changes (fixes) in the Spallart-Allmaras model between 3.0 and 4.0. I'll keep you informed.

In any case, for new computations, I would recommend upgrading to version 4.0.

Also, regarding one of your previous mails, for your LBM model, instead of modifying tridim, you could also use cs_user_solver.c (dependeing on whether your added code is in Fortran or C).

Best regards,

Yvan
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: The problem about 2D turbulent flat plate

Post by Yvan Fournier »

Hello,

There are 2 possible issues in your case:

- you have a very refined mesh near the wall. This is good for low-Reynolds models (the y+ near the wall is near 0.6), but maybe to refined for high-Reynolds turbulent models.

- you have very high CFL numbers. You could reduce the time step, or use a local time step (steady computation mode), to have a max CFL not higher than 20 if possible. Postprocessing the CFL the high values are near the plat inlet, probably where the flow is not quite tangential to the plate, and your mesh is very refined in the y direction there. A less refined wall would lead to better CFL values.

- on the laminar case, at the "outlet" before the plate, strong variations in velocity values mean there is a bad velocity-pressure coupling. Using symmetry instead of a "tangential" outlet before the plate would probably lead to a more stable computation.

I a not sure what the expected "nusa" value should be. Running a few time steps with k-epsilon, turbulent viscosity is important in the same "far-wall" region, but turbulent kinetic energy is higher near the wall.

Colleagues tell me there is a minor bug in our Spallart-Almaras model, but it should lead only to a small (subtle) error, not something easily visible.

Regards,

Yvan
zhuimengboy
Posts: 10
Joined: Wed Aug 05, 2015 10:15 am

Re: The problem about 2D turbulent flat plate

Post by zhuimengboy »

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
Attachments
cases.tar.gz
(5.16 MiB) Downloaded 185 times
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: The problem about 2D turbulent flat plate

Post by Yvan Fournier »

Hello,

I am not a turbulence specialist, so for questions 1-5, I'l check with colleagues, who can answer better.

For 6), check src/user/cs_user_boundary_conditions.f90 (or src/user_examples/cs_user_boundary_conditions*) for examples.

Regards,

Yvan
Post Reply