CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Channel flow DNS (https://www.cfd-online.com/Forums/openfoam-solving/59815-channel-flow-dns.html)

alberto June 20, 2006 03:49

Hello, I'm doing a DNS in a c
 
Hello,
I'm doing a DNS in a channel flow.
I modified the channelOodles solver removing the LES model and set up the case using the same numerical schemes adopted in dnsFoam (cubic method for U divergence term, linear for all other terms).

The only difference is that I adopted the Crank-Nicholson scheme for time integration, while dnsFoam adopts the backward Euler.

Results are quite in good agreement with experimental data, if I consider the mean velocity. But I've a significative underestimation of the u_rms (flow direction) and of the Reynolds stress -u'v', if compared with the results of Kim et al. (1987).

Could be this related to the choice of numerical schemes?

Thanks in advance,
Alberto

anne June 20, 2006 04:45

Hello Alberto, What is the
 
Hello Alberto,

What is the Reynolds number you are using and the grid resolution in terms of wall coordinates?

I am also doing some channel flow but I still need some statistical convergence.
The schemes I have applied are second order in time and space,
and I also modified the LES channel to make it as a DNS.
The Reyn I compute is Retau=180 and
the grid is almost a DNS: 100by100by64 for
Lx=8h, Ly=2h and Lz=4h.

Once I have some results I will communicate them to you.

Anne

alberto June 20, 2006 06:07

Hello Anne, Re_tau = 180 al
 
Hello Anne,

Re_tau = 180 also for me, so Ubar = 15.66.

I'm using a channel with these dimensions:

Lx = 2pi*delta, Ly = 2*delta, Lz = pi*delta, where delta is half the channel height, and is taken equal to 1.

The grid is: Nx = 96, Ny = 129, Nz = 64, uniform along x and z. Along y I adopted an hyperbolic tangent distribution of the nodes.

I'll tell you my results too.

How many times are you considering for statistics?

With kind regards,
Alberto

anne June 20, 2006 08:19

Hello Alberto, Once the flo
 
Hello Alberto,

Once the flow is well established (this
depends from the initial condition you use)
normally about 10 "through-flow" units time
is enough. But check by simple visualization
of the velocity field
that you flow looks well turbulent before
starting statistics.
The best way to check your statistic convergence is to draw the profile of the
total mean shear and ensure that
it is linear.

Anne

Apparently you grid resolutiojn should be enough.

I will let you know my results.

alberto June 20, 2006 08:29

Yes, I'm using the same criter
 
Yes, I'm using the same criterion for the statistics convergence.

My initial condition is a fully developed flow obtained by a previous DNS performed with spectral methods, so I've neglected the first two dimensionless times and then I started to average.

Alberto

anne June 28, 2006 10:17

Hello Alberto, I have now r
 
Hello Alberto,

I have now results of the channel flow I simulated with OpenFoam.
I also added a passive scalar transport equation
in a channel with fixed temperature at the bottom (T=0) and top (T=1) walls of the channel.

The DNS (or better say quasiDNS because of my resolution) was performed with second order time scheme (backward) and second order spatial schemes
(gauss linear for all the gradients:

Give me your email address so that I send you
the plots where you will also find more details about the grid resolution.

Anne

alberto June 29, 2006 03:06

Hello Anne, I sent an e-mail
 
Hello Anne,
I sent an e-mail to you with my address.

Thanks,
Alberto

jens_klostermann February 20, 2007 08:27

Hi Anne + Alberto, I also w
 
Hi Anne + Alberto,

I also want to simulate the dnsChannel.

How did you B and epsilon declare? (in createAverage.h)

Could you please sent your results with the dnsChannel over (email adress in the profile)?

regards,

Jens

alberto February 20, 2007 08:51

I changed the solver to remove
 
I changed the solver to remove the LES model, so I haven't B and epsilon, which would not be used in a DNS.

I'll look for the code and publish it.

Regards,
Alberto

jens_klostermann February 20, 2007 09:08

Hi Alberto, Ok than I guess
 
Hi Alberto,

Ok than I guess I know what to do:
Just change + sgsModel->divB(U)
with -fvm::laplacian(nu, U) and delete sgsModel->correct() in channelOodles and some changes in the header-files.

I thought you use B and epsilon vor postprocessing.

Can you send or post your calculation results?

Regards,

Jens

alberto February 20, 2007 13:45

Exactly. Remove the sgs model,
 
Exactly. Remove the sgs model, B and epsilon costructors, and averages calculation. That's all :-)

Regards,
A.

alberto February 20, 2007 15:50

Here's the code: Hope i
 
Here's the code:



Hope it helps :-)

alberto February 20, 2007 15:50

Here's the code: http://ww
 
Here's the code:

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif channelDNS.tar.gz

Hope it helps :-)

xiao March 18, 2010 04:36

channelDNS for OF1.6
 
Thanks, alberto, for sharing the code. I modified a bit (just removed the averaging and probing part, which are not necessary anymore for OF1.6), and it works perfectly!

Since my modification part is so trivial, I won't post the code here. If anyone needs it, let me know.

best,
Heng

Quote:

Originally Posted by alberto (Post 203249)


LijieNPIC June 15, 2011 02:30

Quote:

Originally Posted by alberto (Post 203237)
Hello,
I'm doing a DNS in a channel flow.
I modified the channelOodles solver removing the LES model and set up the case using the same numerical schemes adopted in dnsFoam (cubic method for U divergence term, linear for all other terms).

The only difference is that I adopted the Crank-Nicholson scheme for time integration, while dnsFoam adopts the backward Euler.

Results are quite in good agreement with experimental data, if I consider the mean velocity. But I've a significative underestimation of the u_rms (flow direction) and of the Reynolds stress -u'v', if compared with the results of Kim et al. (1987).

Could be this related to the choice of numerical schemes?

Thanks in advance,
Alberto

Hi, alberto. After doing DNS, how do you get mean field value and statistics such as Reynolds stress?

levka March 26, 2012 04:17

Hello,
guys i need this DNSchannel solver for OF 2.1.0.
Regards Lev

Quote:

Originally Posted by xiao (Post 250546)
Thanks, alberto, for sharing the code. I modified a bit (just removed the averaging and probing part, which are not necessary anymore for OF1.6), and it works perfectly!

Since my modification part is so trivial, I won't post the code here. If anyone needs it, let me know.

best,
Heng


levka May 6, 2012 02:41

Everything you need to compute DNS
 
Have a look here:"Everything you need to compute DNS"

http://www.cfd-online.com/Forums/ope...tml#post359522

Regards, Lev

raw17 December 5, 2012 15:42

Channel flow DNS with constant pressure gradient
 
Hello
I am trying to do channel flow simulation with constant pressure gradient.
I am giving an initial streamwise vortices and a sinous pertubation in W along with U=(1-y^2) to generate my initial velocity field in 0/ folder using funkysetfield. I have done the same simulation with exactly the same parameters in another spectral code written in fortran. My initial conditions are excatly the same in both the cases .But in OPENFOAM dns case no matter how small amplitude of the initial pertubation I give the pertubation energy is always increasing and the solution is becoming turbulent .

Can any help to solve this problem with constant pressure gradient case . I want to keep constant pressure gradient because I want to validate OpenFoam result with my Fortan code results. Any kind of help would be highly appreciated

thanks


Quote:

Originally Posted by levka (Post 359524)
Have a look here:"Everything you need to compute DNS"

http://www.cfd-online.com/Forums/ope...tml#post359522

Regards, Lev


levka December 6, 2012 03:43

Quote:

Originally Posted by raw17 (Post 396017)
Hello
I am trying to do channel flow simulation with constant pressure gradient.
I am giving an initial streamwise vortices and a sinous pertubation in W along with U=(1-y^2) to generate my initial velocity field in 0/ folder using funkysetfield. I have done the same simulation with exactly the same parameters in another spectral code written in fortran. My initial conditions are excatly the same in both the cases .But in OPENFOAM dns case no matter how small amplitude of the initial pertubation I give the pertubation energy is always increasing and the solution is becoming turbulent .

Can any help to solve this problem with constant pressure gradient case . I want to keep constant pressure gradient because I want to validate OpenFoam result with my Fortan code results. Any kind of help would be highly appreciated

thanks

Turbulent or laminar state you can manage with two parameters:
1-dp/dx
2-initial perturbations

If dp/dx small enough (when Re<<5000)then any perturbations will vanish in time.
If Re>>5000 then no matter value of perturbations the flow will develop to turbulent state
If you deal with transient Re around 5000 (that you have defined by dp/dx) then perturbation will play major role. And the flow can reach either turb/ or lam. states depending on initial perturbations.

dx/dx/rho is defined in transportProperties. The value you can estimate in Excel (dp/dx/rho VIA Re_tau) file that is included in the package.

raw17 December 6, 2012 04:05

Hi
Thanks for your reply. Yes you are right my Re =4000 based on Uc*h/nu . Where Uc is the centreline velocity =1 , h=1 so it means that my Re=1/nu. I have defined my gradP =2/Re . Now my problem as I said before is that even when my pertubations are very small my solution is never becoming laminar. Even when the initial pertubatiojn energy is very small the solution is still becoming turbulent and these results are not matching with my previous findings.

Quote:

Originally Posted by levka (Post 396067)
Turbulent or laminar state you can manage with two parameters:
1-dp/dx
2-initial perturbations

If dp/dx small enough (when Re<<5000)then any perturbations will vanish in time.
If Re>>5000 then no matter value of perturbations the flow will develop to turbulent state
If you deal with transient Re around 5000 (that you have defined by dp/dx) then perturbation will play major role. And the flow can reach either turb/ or lam. states depending on initial perturbations.

dx/dx/rho is defined in transportProperties. The value you can estimate in Excel (dp/dx/rho VIA Re_tau) file that is included in the package.



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