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

LinkBack  Thread Tools  Display Modes 
October 7, 2009, 04:12 
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: 9 
Hi guys and especially LESpipeflowexperts ;)
On OF1.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 zdirection) 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 zvorticity 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.... 

October 7, 2009, 04:28 

#2 
Senior Member
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 9 
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 backmapping is at z=0.5 L. I initialized the flow with a uniform inlet (flow in zdirection 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 zvorticity. Basically, I try to simulate the same then M.H. BabaAhmadi and Gavin Tabor in their work / paper "Inlet conditions for LES using mapping and feedback control" Just for your info  I also performed a kepsilon 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 

October 14, 2009, 04:53 

#3 
Senior Member
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 9 
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 1e3 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 

October 15, 2009, 06:46 

#4  
New Member
M. Li
Join Date: Apr 2009
Posts: 13
Rep Power: 9 
Quote:
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. 

October 15, 2009, 07:33 

#5 
Senior Member
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 9 
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 OF1.6.x). http://www.cfdonline.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. LES turbulent pipe flow hope I could help cheers! Florian 

October 15, 2009, 08:05 

#6  
New Member
M. Li
Join Date: Apr 2009
Posts: 13
Rep Power: 9 
Quote:
I'm using OpenFOAM 1.6.x and waiting for you LES results mentioned above. ^^ 

October 15, 2009, 10:44 

#7 
Senior Member
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 9 
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 

October 15, 2009, 11:35 

#8 
Senior Member
Cedric DUPRAT
Join Date: Mar 2009
Location: Belgium
Posts: 184
Rep Power: 9 
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. BabaAhmadi 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 

October 15, 2009, 12:07 

#9 
Senior Member
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 9 
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 

October 16, 2009, 02:11 
a question about source term

#10 
New Member
M. Li
Join Date: Apr 2009
Posts: 13
Rep Power: 9 
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 

October 16, 2009, 02:24 
Another problem about LES

#11 
New Member
M. Li
Join Date: Apr 2009
Posts: 13
Rep Power: 9 
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 skinfriction coefficient to estimate wall shear stress and friction velocity? Regards, Min Li 

October 16, 2009, 02:29 

#12 
Senior Member
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 9 
Hi Min Li,
look at this thread: LES of turbulent channel flows 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 

October 16, 2009, 03:33 

#13  
Senior Member
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 9 
Hi Min Li,
Quote:
For your approach with the empirical relation, I am not sure about it. hope I could help! Florian 

October 20, 2009, 07:22 

#14 
Senior Member
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 9 
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 

November 16, 2009, 11:40 

#15  
New Member
M. Li
Join Date: Apr 2009
Posts: 13
Rep Power: 9 
Quote:
How about you LES case and is the postprocessing all right? If you are using channelFoam in version 1.6 to conduct your case, you can find the value for the timemean pressure gradient in the uniform folder at the timestep folder! then you can obtain timemean wall shear stress. Have a nice day! LI Min Last edited by cnlimin; November 16, 2009 at 12:21. 

November 17, 2009, 04:47 

#16 
Senior Member
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 9 
Hi Min Li,
postprocessing 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 

November 17, 2009, 05:10 

#17 
New Member
M. Li
Join Date: Apr 2009
Posts: 13
Rep Power: 9 
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 postprocessing. 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 

November 17, 2009, 07:19 

#18 
Senior Member
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 9 
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 

November 17, 2009, 08:34 

#19  
New Member
M. Li
Join Date: Apr 2009
Posts: 13
Rep Power: 9 
Quote:
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 

November 19, 2009, 08:57 

#20 
Senior Member
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 9 
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 

Thread Tools  
Display Modes  


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  AnneMarie Giroux  Main CFD Forum  3  July 5, 1999 21:28 