|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Join Date: Dec 2015
Posts: 5
Rep Power: 10 ![]() |
Hi all,
I'm new to the forum. It's a really nice place to discuss fluid mechanics. I recently got a pseudo-spectral code (Fourier*Chebyshev*Fourier for the spatial discretization) for simulating a turbulence channel flow. But the code is old and I was told not to take it for granted. So I would like to validate the code first to see if it can run correctly. In this regard, I would like to ask (1) how to generate a consistent and proper initial condition (ic) field for the turbulence channel flow? The ic should satisfy the nonslip boundary conditions for the velocities and the divergence-free condition at the same time. (2) what is a simple way to check the code? Is there any analytical solution in the channel flow setting to NS equation? I guess probably not. From the reference, I see that people usually check the mean velocity profile around the wall, i.e., the law of the wall. But that will be in a too late stage, I mean, I should take the statistics of the generated flow data to check the law of the wall. Is there any simpler and easier to check the code? Thanks a lot for your suggestions. Any comments will be appreciated. jinhua |
|
![]() |
![]() |
![]() |
![]() |
#2 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73 ![]() ![]() ![]() |
Quote:
Hi, I suggest to test the code first for the laminar steady Poiseuille solution... I suppose you have periodic condition in streamwise and spanwise condition, so you could check for the 4 combinations of pressure gradient. An initial condition could be simply the plug flow. Then, if you want to use the code for turbulent conditions you should distinguish between DNS and LES formulations that drive to different grid resolution. The initial condition cna be generated from the Poiseuille solution with a superimposed fluctuations. However, you need to run the code until the solution loose memory of the initial condition. Many database for DNS are available, for example here http://turbulence.ices.utexas.edu/MKM_1999.html |
||
![]() |
![]() |
![]() |
![]() |
#3 | |
New Member
Join Date: Dec 2015
Posts: 5
Rep Power: 10 ![]() |
Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#4 | |
New Member
Join Date: Dec 2015
Posts: 5
Rep Power: 10 ![]() |
Quote:
I take your suggestion to run the code with steady Poiseuille flow (initial condition is u=1-y^2 without background turbulence and the flow is driven by a constant streamwise pressure gradient -2/Re, solved from the steady NS equation). Now even for this simple setting, I have some problems. I expect that the flow would remain the same before the numerical error takes over, but it's very soon that I spot the trend of the flow filed is going to blow up. The maximum velocity keeps increasing. I plot the flow field, it seems that there are check-board errors (for example, I plot the u at the boundary y=1, the velocity there should be zero, but when I run for less than 1 time unit, the error shows a check-board pattern.). I know that this could be avoided in the finite difference scheme by using staggered grid, but the code I have do not solve pressure explicitly (see Kim, Moin Moser 1987). Do you know what may be the cause of this error in spectral method? The code was using FFTPACK for the FFT. I actually have also tried FFTW as I suspect that FFTPACK might be worse in the performance, but this error is still there.... Thanks for any comments. Jinhua |
||
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73 ![]() ![]() ![]() |
first, your plot show a vanishing velocity u ! You can see oscillations but their magnitude order is 10^-13 ....
second, have you set Re=1? the height of the channel is 1 in non dimensional unit? third, do you run the code within the numerical stabilty constraints? you should get a steady solution (check the magnitude of max time derivative) |
|
![]() |
![]() |
![]() |
![]() |
#6 | |
New Member
Join Date: Dec 2015
Posts: 5
Rep Power: 10 ![]() |
Quote:
Thanks for your reply. At the initial time, the velocity amplitude at the boundary (y=1) is indeed zero, but then it increases slowly to 10^-13. If I run for a longer time, the flow field will blow up. The nondimensional length is the half channel flow, so yes, y=1 is the boundary of the channel. I constrain the CFL number. I tried this morning, and I did get a steady solution. I will run for a real flow with some turbulence. Hope it will get right. Thanks a lot. Have a nice day. Jinhua |
||
![]() |
![]() |
![]() |
![]() |
#7 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73 ![]() ![]() ![]() |
Quote:
however, the velocity at the walls must be prescribed, not computed...so, see the part in your code that fix the BC.s. what about the steady solution you get? |
||
![]() |
![]() |
![]() |
![]() |
#8 | |
Member
Kaya Onur Dag
Join Date: Apr 2013
Posts: 94
Rep Power: 13 ![]() |
Quote:
do you do dealiasing? actually with such a low re it shouldn't be a problem you can save your velocity field and take the spatial spectrum in each time snapshot and see how it changes before your code blows. than can enlighten a bit |
||
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
rhoCentralFoam for channel flow | fportela | OpenFOAM Running, Solving & CFD | 22 | June 10, 2014 20:14 |
Gravitational water flow in closed channel. | Szymon85 | CFX | 7 | September 3, 2013 16:28 |
is there any parallel code for the famous Lid Driven Cavity flow? | gholamghar | Main CFD Forum | 0 | August 1, 2010 01:55 |
Wrong Pressure countors for channel flow driven by mass flow rate or press gradient | ash-khan | FLUENT | 0 | June 21, 2009 10:02 |
channel flow.. | R.D.Prabhu | Main CFD Forum | 0 | July 14, 1998 00:22 |