CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   setup problems - LES pipe flow with cyclic BC (1) and direct mapped inlet (2) (http://www.cfd-online.com/Forums/openfoam/68947-setup-problems-les-pipe-flow-cyclic-bc-1-direct-mapped-inlet-2-a.html)

florian_krause October 7, 2009 04:12

setup problems - LES pipe flow with cyclic BC (1) and direct mapped inlet (2)
 
5 Attachment(s)
Hi guys and especially LES-pipe-flow-experts ;-)

On OF-1.6.x, I am using pisoFOAM with LES turbulence model to simulate a fully turbulent pipe flow with Re=7000 based on the centreline velocity.
The pipe is fully 3D and the dimensions are L (pipe length) =5*D (pipe diameter). My grid look attachment grid.jpg . I have 3 grid points in the viscous sublayer, whereas I I calculated the size of the viscous sublayer from the friction velocity calculated by a DNS for the same flow.

I performed now two different simulations (first one explained here, second one in the following post)

1.) I used cyclic boundaries on the inlet outlet pair and initialized the flow with a uniform flow field (flow in z-direction) and some reasonable turbulent kinetic energy k (corresponding to 10% turbulent intensity)

The problem is now, that my flow and my velocity profiles developes into Poseuille flow profile, but I have small amount of (z-)vorticity and turbulentt kinetic energy.

I attached the corresponding plots for Uz, k and z-vorticity plot and contour plot.

For the whole computation time, my courant number is below 0.5 so my timestep should be ok.

My LES SGS model is the oneEqnEddyViscosity model.

Do you guys have any clue how I could improve my setup for my boundary conditions ? My fvSolution and my fvScheme files are copied from the pisoFoam -> les -> pitzDaily case

...see next post....

florian_krause October 7, 2009 04:28

4 Attachment(s)
2.) For the second setup with the direct mapped inlet, I used the same pipe geometry and the same grid.

I basically copied the boundary condition from the pitzDailyDirectMapped tutorial case. I just modified the flow direction and the average velocity in the U file.

In the boundary file I set directMappedPatch for my inlet and tthe offset surface for the back-mapping is at z=0.5 L. I initialized the flow with a uniform inlet (flow in z-direction only) and the same value for k as in the case 1 .

The timestep should be ok again, since the Courant number stays below 0.7.

The problem again, I obtain after the same endtime a "nice" Poseuille flow velocity profile, but also with some z(-)vorticity and turbulent kinetic energy

I again attached the plots and the contour plot of the z-vorticity.

Basically, I try to simulate the same then M.H. Baba-Ahmadi and Gavin Tabor in their work / paper "Inlet conditions for LES using mapping and feedback control"


Just for your info - I also performed a k-epsilon RANS simulation with pisoFoam and some addtional forcing to sustain the flow and my results for the mean Uz velocity profile is not so bad compared to two different DNS data

Guys, any hints and help is really appreciated as you might guess :D

I hope I gave me all necessary case info, if not, please let me know.

best regrads
Florian

florian_krause October 14, 2009 04:53

Hello FOAMers!

...after talking to myself and reading some other threads, I think my calculation endtime was choosen too small, so that no turbulent structures can evolve within the computation time.

Plus, I have used now the perturbU utility to initialize my flow and it seems to work. I am using different combination of SGS model (Smag, dynSmag, oneEqEddy, dynOneEqEddy) with two different LES delta functions (cubeRootVol and vanDriest for wall treatment).

Since my timestep 1e-3 is still quite small for my endtime of 100sec corresponding to 40 flow through times, it takes some time and its still running (single proc.)

I will post the result, if calculation stopped and if it was successful.

Cheers!
Florian

cnlimin October 15, 2009 06:46

Quote:

Originally Posted by florian_krause (Post 232552)
Hello FOAMers!

...after talking to myself and reading some other threads, I think my calculation endtime was choosen too small, so that no turbulent structures can evolve within the computation time.

Plus, I have used now the perturbU utility to initialize my flow and it seems to work. I am using different combination of SGS model (Smag, dynSmag, oneEqEddy, dynOneEqEddy) with two different LES delta functions (cubeRootVol and vanDriest for wall treatment).

Since my timestep 1e-3 is still quite small for my endtime of 100sec corresponding to 40 flow through times, it takes some time and its still running (single proc.)

I will post the result, if calculation stopped and if it was successful.

Cheers!
Florian

Hi, Florian
Nice to meet you. I'm running a LES case for duct flow and meet the some problems.
Just as you say the perturbU utility seems to work, Where can i find this utility? It seems not the standard utility of OF.

florian_krause October 15, 2009 07:33

Hi,

for my case I used the the perturbCylinder utility from the following thread. Depending on your OF version you have to modify it a bit to be able to compile it (I had to, since I am using OF-1.6.x).

http://www.cfd-online.com/OpenFOAM_D...es/1/2946.html

The more generic perturbU utility you can find in the following thread. I am not sure if it is the latest version.

http://www.cfd-online.com/Forums/ope...pipe-flow.html

hope I could help

cheers!
Florian

cnlimin October 15, 2009 08:05

Quote:

Originally Posted by florian_krause (Post 232746)
Hi,

for my case I used the the perturbCylinder utility from the following thread. Depending on your OF version you have to modify it a bit to be able to compile it (I had to, since I am using OF-1.6.x).

http://www.cfd-online.com/OpenFOAM_D...es/1/2946.html

The more generic perturbU utility you can find in the following thread. I am not sure if it is the latest version.

http://www.cfd-online.com/Forums/ope...pipe-flow.html

hope I could help

cheers!
Florian

Thanks a lot.
I'm using OpenFOAM 1.6.x and waiting for you LES results mentioned above. ^-^

florian_krause October 15, 2009 10:44

I hope next week I can produce some plots like u+ over y+... my turbulence structure looks fine for and also the mean velocity profile matches quite good with given DNS and exp. data.

I will now map my fields on a fine mesh with a better near wall discretisation (3 gridpoints within the viscous sublayer) and let it run

Thinking about the postprocessing I can already see three issues :confused:

1.) how to define a cylindrical coordinate system (r, phi, z), in detail how to use the cylindricalCS class or how to convert my cartesian field components into cylindrical ones as a post step??

2.) how to obtain the r.m.s. velocities preferable on runtime to capture all fluctuations??

3.) is it possible to use the postChannel tool for the periodic pipe case??

cheers!
Florian

cedric_duprat October 15, 2009 11:35

Hi Florian,

First of all about your calculation; I'm not using OF1.6 therefore I'm not sure about the PISOFoam solver but did you check that your mass flow average is constant as in the channelOodles solver (in OF1.4.1) ?
If you use cyclic BC, a body force term in the streamwise direction need to be added (see channelOodles solver).

then, about postprocessing, in the wiki there is something about cylindricalCS from H. Nilsson. However, for LES application, there is no postprocessing tool for pipe flow. I don't think postChannel will work.

A last point, if you want to reproduce M.H. Baba-Ahmadi and Gavin Tabor work, you should have a look on directMapped BC, there are some thread in the forum.

Cedric

PS: sorry for the delay :)

florian_krause October 15, 2009 12:07

Hi Cedric,

because I want to use the same solver for my RANS and LES calculations, I extended the OF1.6 pisoFoam with a source term as in channelFoam. So I can sustain the flow and have const. mass flow average.

Thanks for the hint with the wiki for the cylindrical CS, I wil check it out. For the other postprocessing issues, I will think about it and try to figure it out. But still, hints & helps are welcome (@everyone) :)

I alread tried the directMappedInlet, but messed up the case setup. I will run another one by time.

thanks,
Florian

cnlimin October 16, 2009 02:11

a question about source term
 
Hi, Cedric and Florian

You mentioned body force term in the streamwise direction need to be added. So, I got a problem how to determine the quantity of force term?
I think it should be consistent with the velocity (initial velocity set in 0/U) that drived by the pressure difference.

Would you please give me the answer?

Thanks

Min Li

cnlimin October 16, 2009 02:24

Another problem about LES
 
Hi Florian,
I'm really a jackaroo in LES and OpenFoam. So, I have another basical question for LES to enquire.

Just as you say "I have 3 grid points in the viscous sublayer, whereas I calculated the size of the viscous sublayer from the friction velocity calculated by a DNS for the same flow."

However, if the DNS data are unavailable for my case, how can I determine the grid space near the wall? y+ is an unknown quantity before fininshing computation. Can I use the empiric relationship of skin-friction coefficient to estimate wall shear stress and friction velocity?

Regards,
Min Li

florian_krause October 16, 2009 02:29

Hi Min Li,

look at this thread:

http://www.cfd-online.com/Forums/ope...nel-flows.html

as it is explained in Cedrics post in the above thread, it is basically a source term to adjust for the difference of your target velocity and the current velocity. Check out the channelFoam solver code, its from there.

greetz!
Florian

florian_krause October 16, 2009 03:33

Hi Min Li,

Quote:

Originally Posted by cnlimin (Post 232845)
Hi Florian,
I'm really a jackaroo in LES and OpenFoam. So, I have another basical question for LES to enquire.

Just as you say "I have 3 grid points in the viscous sublayer, whereas I calculated the size of the viscous sublayer from the friction velocity calculated by a DNS for the same flow."

However, if the DNS data are unavailable for my case, how can I determine the grid space near the wall? y+ is an unknown quantity before fininshing computation. Can I use the empiric relationship of skin-friction coefficient to estimate wall shear stress and friction velocity?

In my case, the RANS and LES computations are validations, so I just took a clearly written techn. paper with exp. and DNS results for pipe flow at Re=7000. They mention (refering to Groetzbach) that there should be at least 3 gridpoints within the viscous sublayer. So use a relation like: delta < pi*eta with delta the mean grid width and eta the kolmogorov lengthscale. With this grid start your calculation and you can check your y+. Maybe thats not the best approach, but it seems to work...

For your approach with the empirical relation, I am not sure about it.

hope I could help!
Florian

florian_krause October 20, 2009 07:22

2 Attachment(s)
Hello guys,

as I said, I will put my intermediate result of my LES pipe flow with cyclic BC. Attached is the contour plot of instantaneous Ux in different cross sections and the UMean velocity profile compared to some DNS data. As you can see I plotted the sampled data along y and z, since I have to averagre more and let it run longer, but its going in the right direction I think.

I cannot give other plots, because I still try to figure out how to get the friction velocity utau ...cause there is no wallShearStress utility for LES if I am not mistaken. :confused:

By the way, is there really no one who rewrote the postChannel utility for a turbulent pipe flow with only one homogenuous directon ? ;) if not, ok I will write a small script for the rms values...

cheers!
Florian

cnlimin November 16, 2009 11:40

Quote:

Originally Posted by florian_krause (Post 233372)
Hello guys,

as I said, I will put my intermediate result of my LES pipe flow with cyclic BC. Attached is the contour plot of instantaneous Ux in different cross sections and the UMean velocity profile compared to some DNS data. As you can see I plotted the sampled data along y and z, since I have to averagre more and let it run longer, but its going in the right direction I think.

I cannot give other plots, because I still try to figure out how to get the friction velocity utau ...cause there is no wallShearStress utility for LES if I am not mistaken. :confused:

By the way, is there really no one who rewrote the postChannel utility for a turbulent pipe flow with only one homogenuous directon ? ;) if not, ok I will write a small script for the rms values...

cheers!
Florian

Hi Florian,
How about you LES case and is the post-processing all right?
If you are using channelFoam in version 1.6 to conduct your case, you can find the value for the time-mean pressure gradient in the uniform folder at the timestep folder! then you can obtain time-mean wall shear stress.

Have a nice day!
LI Min

florian_krause November 17, 2009 04:47

Hi Min Li,

post-processing of my case is going more or less allright. I can write now fields of u+ and y+ the slope of the u+(y+) graph looks more or less correct, up to u+(y+=5) the graph matches almost perfectly with some DNS data. But from there it starts to differ from the DNS data.

I still have problems with:

- transforming the field of the symmetric reynolds stress tensor R from cartesian in cylindrical coordinates. I know how to transform vector and vectorFields (thanks Hrv), but not tensors. I cannot just use one single transormation matrix, somehow I have to take into account the CV coordinates wrt. to the pipe axis....

- transformation of my velocity vectorField gives a incorrect tangential velocity, radial and axial looks ok.

What are you working on??

Best,
Florian

cnlimin November 17, 2009 05:10

Hi Florian,

Actually, I'm conducting a LES for developed turbulent flow in a square duct. It is same to you I got some problems in post-processing.

One of the questions that you may be met is how to average across streamwise direction. You know we are all computing fully developed problem, this space averaging is needed, right?

Do you know how to do that?

Best,
Min

florian_krause November 17, 2009 07:19

Hi Min Li,

lets try to clarify this, cause I am not doing any spatial averaging and I wanna do it correct.

For me 'fully developed' is more a property of a turbulent flow, than something you obtain and force by spatial averaging.

I mean if you average in space, you will get one mean profile, which maybe fits with experiments or DNS. But I would say it doesnt tell you, if the flow is fully developed.

In my opinion your criterion 'fully developed' should be something like d(UMean)/dx=0 (considering that x is the axial direction of the pipe) or maybe better, instead of *=0, taking *=eps with eps beeing a small value for your criterion.

What do you think?!

Best,
Florian

cnlimin November 17, 2009 08:34

Quote:

Originally Posted by florian_krause (Post 236609)
Hi Min Li,

lets try to clarify this, cause I am not doing any spatial averaging and I wanna do it correct.

For me 'fully developed' is more a property of a turbulent flow, than something you obtain and force by spatial averaging.

I mean if you average in space, you will get one mean profile, which maybe fits with experiments or DNS. But I would say it doesnt tell you, if the flow is fully developed.

In my opinion your criterion 'fully developed' should be something like d(UMean)/dx=0 (considering that x is the axial direction of the pipe) or maybe better, instead of *=0, taking *=eps with eps beeing a small value for your criterion.

What do you think?!

Best,
Florian

Hi Florian,
Yes, as you said fully developed turbulent is a state of turbulent flow that is an idea situation. But I think it's necessary to do average in streamwise (homogeneous) direction in a numerical simulation. Of course if your simulation is sufficient precise your results will not vary along the homogeneous direction, although it's hard to achieve. So most of numerical simulation of developed flow did average. I'm not an expert in CFD, and not sure about my idea. Please give me your opinion.

Any advice from others is also greatly appreciated.

Best,
Min

florian_krause November 19, 2009 08:57

dont know if its important to be an CFD expert.... but still, for me the spatial averaging is something like cheating and not beeing fair to your CFD code. You obtain only one nice mean velocity profile, like 100% fully developed flow, but in fact it isnt.... why not showing profiles at different streamwise positions and plotting the differences / error?! Then you might investigate how close you reached the fully developed state with your code...

Best,
Florian


All times are GMT -4. The time now is 01:22.