CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

setup problems - LES pipe flow with cyclic BC (1) and direct mapped inlet (2)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 7, 2009, 05:12
Default setup problems - LES pipe flow with cyclic BC (1) and direct mapped inlet (2)
  #1
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 17
florian_krause is on a distinguished road
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....
Attached Images
File Type: jpg grid.jpg (88.7 KB, 592 views)
File Type: jpg kPlot_CYCBC.jpg (25.7 KB, 424 views)
File Type: jpg UzPlot_CYCBC.jpg (24.4 KB, 382 views)
File Type: jpg zVorticityPlot_CYCBC.jpg (28.9 KB, 337 views)
File Type: jpg zVorticity_contour_CYCBC.jpg (22.2 KB, 551 views)
florian_krause is offline   Reply With Quote

Old   October 7, 2009, 05:28
Default
  #2
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 17
florian_krause is on a distinguished road
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

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

best regrads
Florian
Attached Images
File Type: jpg kPlot_DM.jpg (26.3 KB, 156 views)
File Type: jpg UzPlot_DM.jpg (23.6 KB, 152 views)
File Type: jpg zVorticityPlot_DM.jpg (29.9 KB, 133 views)
File Type: jpg zVorticity_contour_DM.jpg (23.5 KB, 311 views)
florian_krause is offline   Reply With Quote

Old   October 14, 2009, 05:53
Default
  #3
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 17
florian_krause is on a distinguished road
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
florian_krause is offline   Reply With Quote

Old   October 15, 2009, 07:46
Default
  #4
New Member
 
M. Li
Join Date: Apr 2009
Posts: 13
Rep Power: 17
cnlimin is on a distinguished road
Quote:
Originally Posted by florian_krause View Post
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.
cnlimin is offline   Reply With Quote

Old   October 15, 2009, 08:33
Default
  #5
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 17
florian_krause is on a distinguished road
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
florian_krause is offline   Reply With Quote

Old   October 15, 2009, 09:05
Default
  #6
New Member
 
M. Li
Join Date: Apr 2009
Posts: 13
Rep Power: 17
cnlimin is on a distinguished road
Quote:
Originally Posted by florian_krause View Post
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. ^-^
cnlimin is offline   Reply With Quote

Old   October 15, 2009, 11:44
Default
  #7
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 17
florian_krause is on a distinguished road
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

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
florian_krause is offline   Reply With Quote

Old   October 15, 2009, 12:35
Default
  #8
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
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
cedric_duprat is offline   Reply With Quote

Old   October 15, 2009, 13:07
Default
  #9
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 17
florian_krause is on a distinguished road
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
florian_krause is offline   Reply With Quote

Old   October 16, 2009, 03:11
Default a question about source term
  #10
New Member
 
M. Li
Join Date: Apr 2009
Posts: 13
Rep Power: 17
cnlimin is on a distinguished road
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 is offline   Reply With Quote

Old   October 16, 2009, 03:24
Default Another problem about LES
  #11
New Member
 
M. Li
Join Date: Apr 2009
Posts: 13
Rep Power: 17
cnlimin is on a distinguished road
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
cnlimin is offline   Reply With Quote

Old   October 16, 2009, 03:29
Default
  #12
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 17
florian_krause is on a distinguished road
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 is offline   Reply With Quote

Old   October 16, 2009, 04:33
Default
  #13
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 17
florian_krause is on a distinguished road
Hi Min Li,

Quote:
Originally Posted by cnlimin View Post
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 is offline   Reply With Quote

Old   October 20, 2009, 08:22
Default
  #14
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 17
florian_krause is on a distinguished road
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.

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
Attached Images
File Type: jpg instant_ux.jpg (25.2 KB, 459 views)
File Type: jpg UMean_profile.jpg (36.3 KB, 317 views)
florian_krause is offline   Reply With Quote

Old   November 16, 2009, 11:40
Default
  #15
New Member
 
M. Li
Join Date: Apr 2009
Posts: 13
Rep Power: 17
cnlimin is on a distinguished road
Quote:
Originally Posted by florian_krause View Post
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.

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

Last edited by cnlimin; November 16, 2009 at 12:21.
cnlimin is offline   Reply With Quote

Old   November 17, 2009, 04:47
Default
  #16
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 17
florian_krause is on a distinguished road
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
florian_krause is offline   Reply With Quote

Old   November 17, 2009, 05:10
Default
  #17
New Member
 
M. Li
Join Date: Apr 2009
Posts: 13
Rep Power: 17
cnlimin is on a distinguished road
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
cnlimin is offline   Reply With Quote

Old   November 17, 2009, 07:19
Default
  #18
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 17
florian_krause is on a distinguished road
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
florian_krause is offline   Reply With Quote

Old   November 17, 2009, 08:34
Default
  #19
New Member
 
M. Li
Join Date: Apr 2009
Posts: 13
Rep Power: 17
cnlimin is on a distinguished road
Quote:
Originally Posted by florian_krause View Post
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
cnlimin is offline   Reply With Quote

Old   November 19, 2009, 08:57
Default
  #20
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 17
florian_krause is on a distinguished road
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
florian_krause is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inlet and outlet flow rate Neser CFX 1 March 2, 2004 17:02
length scales at inlet for internal flows Anne-Marie Giroux Main CFD Forum 3 July 5, 1999 22:28


All times are GMT -4. The time now is 15:42.