CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

white noise in DNS

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree5Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   September 13, 2014, 03:42
Default white noise in DNS
  #1
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 45
Rep Power: 2
tzqfly is on a distinguished road
Hi,
I would like to create a random function with which I could play with my flow (adding it to velocity components as a white noise in the momentum equation ...).
Since I still do not catch well how data is organised within OpenFOAM, could somebody help me?


Thank you very much!!
hua1015 likes this.
tzqfly is offline   Reply With Quote

Old   September 18, 2014, 06:37
Default
  #2
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 45
Rep Power: 2
tzqfly is on a distinguished road
Nobody know ?
tzqfly is offline   Reply With Quote

Old   September 21, 2014, 12:06
Default
  #3
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Quick answer - have a look at this thread: PerturbU
hua1015 and itchy like this.
wyldckat is offline   Reply With Quote

Old   September 23, 2014, 03:07
Default About white noise
  #4
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 45
Rep Power: 2
tzqfly is on a distinguished road
Hello, everyone.
I want to add the white noise in the DNS, can you show me the source code about white noise in the OpenFoam?
tzqfly is offline   Reply With Quote

Old   September 23, 2014, 03:16
Default
  #5
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 3
itchy is on a distinguished road
Hi,

have a look into boxTurb-utility.

In this utility in the first step a normalized random vectorfield is generated. This should be similar to that what you search.

One question:
Why you want to add white noise to DNS??
In dnsFoam there is white noise inside.

White noise is not autocorrelated, so this is not a good way to add turbulence to DNS. What exactly you want to do??

kind regards
Florian
itchy is offline   Reply With Quote

Old   September 23, 2014, 03:59
Default
  #6
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 45
Rep Power: 2
tzqfly is on a distinguished road
Hi,
Tkank you for your help, I'll look into boxTurb-utility. the only aim add white noise is to convergence faster.
tzqfly is offline   Reply With Quote

Old   September 23, 2014, 04:28
Default
  #7
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 3
itchy is on a distinguished road
Hi,

do you want to initialize your field with white noise to get better convergence.

kind regards
itchy is offline   Reply With Quote

Old   September 23, 2014, 06:24
Default
  #8
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 45
Rep Power: 2
tzqfly is on a distinguished road
Quote:
Originally Posted by itchy View Post
Hi,

do you want to initialize your field with white noise to get better convergence.

kind regards
Yes, it's better to do that, you know I'm newer, so please tell me how! Thank you!!!
tzqfly is offline   Reply With Quote

Old   September 23, 2014, 06:38
Default
  #9
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 3
itchy is on a distinguished road
hi,

what kind of geometry do you want to init??

For example if you want to init the velocity field of a pipe:

1) create a mesh of a channel with 2^x cells
2) Use boxTurb-utility to init this channel
3) interpolate the field of the channel to the pipe geometry using mapfields

Is it smth like this you want to do??

kind regards
Florian
itchy is offline   Reply With Quote

Old   September 23, 2014, 07:54
Default
  #10
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 45
Rep Power: 2
tzqfly is on a distinguished road
It's a duct, 128*128*116, I looked into boxTurb-utility, but I cannot find the place stand for white noise. Currently, I use the icoFoam to do DNS, so I want to find the white noise codes to add into the icoFoam source code.
tzqfly is offline   Reply With Quote

Old   September 23, 2014, 08:35
Default
  #11
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 3
itchy is on a distinguished road
Hi,

Do you want to init your case with random noise or you want to add random noise to your solver??

For the first thing use boxTurb. You can find the random generator for boxTurb in turbGen.C. This file is in src/randomProcesses/turbulence/

For the second use dnsFoam. In dnsFoam a small amount of random fluctuations are introduced in every time step to keep turbulence alive using a small random body force. You need this, if you have no shear from the wall.

But what do you mean with better convergence with white noise in icoFoam?? Can you explain me that, because I don't understand it.

kind regards
Florian
itchy is offline   Reply With Quote

Old   September 23, 2014, 08:48
Default
  #12
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 45
Rep Power: 2
tzqfly is on a distinguished road
the code: force.internalField() = ReImSum......(omit some codes) is the part of white noise? I want to add random noise to my solver. "better convergence with white noise in icoFoam", I mean, my new solver is based on icoFoam, If the new solver is added white noise, it can get better convergence. Thank you very much, I'll do it by what you said.
tzqfly is offline   Reply With Quote

Old   September 23, 2014, 09:02
Default
  #13
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 3
itchy is on a distinguished road
Hi,

not exactly, it is in forceGen.newField(). This is from the object forceGen. Here energy is added randomly added using Wiener-Process. But only for some Wavenumbers in a special range.

But why you should get better convergence with this?? In my opinion this will make your results wrong???

kind regards
Florian
itchy is offline   Reply With Quote

Old   September 23, 2014, 21:24
Default
  #14
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 45
Rep Power: 2
tzqfly is on a distinguished road
Hi,
Thank you for you help. And I decided to use the random fluctuations of dnsFoam, but how? how add these code to the icoFoam?
tzqfly is offline   Reply With Quote

Old   September 23, 2014, 22:36
Default
  #15
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 45
Rep Power: 2
tzqfly is on a distinguished road
Quote:
Originally Posted by itchy View Post
Hi,

Do you want to init your case with random noise or you want to add random noise to your solver??

For the first thing use boxTurb. You can find the random generator for boxTurb in turbGen.C. This file is in src/randomProcesses/turbulence/

For the second use dnsFoam. In dnsFoam a small amount of random fluctuations are introduced in every time step to keep turbulence alive using a small random body force. You need this, if you have no shear from the wall.

But what do you mean with better convergence with white noise in icoFoam?? Can you explain me that, because I don't understand it.

kind regards
Florian
Hi,
I ran my solver successfully, using random fluctuations in the dnsFoam, it's calculating now, hope for good results.
tzqfly is offline   Reply With Quote

Old   September 24, 2014, 03:35
Default
  #16
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 3
itchy is on a distinguished road
Hi,

dnsFoam is exactly icoFoam. There is only one difference in dnsFoam. dnsFoam is icoFoam with random noise. So this solver is exactly what you want to do. No need to make a new solver. No need to add fluctuations to icoFoam.

What is the differnce between your solver and dnsFoam???

If you want to have better convergence you have to init your case in a proper way. If you have walls in your case, dnsFoam (or icoFoam with fluctuations) is not the right solver for you.

What is exactly your case?? Pherhaps we can find a better solution for your problem.

kind regards
Florian
wyldckat and tzqfly like this.
itchy is offline   Reply With Quote

Old   October 6, 2014, 06:29
Default
  #17
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 45
Rep Power: 2
tzqfly is on a distinguished road
Quote:
Originally Posted by itchy View Post
Hi,

Do you want to init your case with random noise or you want to add random noise to your solver??

For the first thing use boxTurb. You can find the random generator for boxTurb in turbGen.C. This file is in src/randomProcesses/turbulence/

For the second use dnsFoam. In dnsFoam a small amount of random fluctuations are introduced in every time step to keep turbulence alive using a small random body force. You need this, if you have no shear from the wall.

But what do you mean with better convergence with white noise in icoFoam?? Can you explain me that, because I don't understand it.

kind regards
Florian
Hi,
do you know how to add a constant pressure gradient in the momentum equation in the icoFoam?
tzqfly is offline   Reply With Quote

Old   October 6, 2014, 06:43
Default
  #18
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 45
Rep Power: 2
tzqfly is on a distinguished road
Quote:
Originally Posted by itchy View Post
Hi,

dnsFoam is exactly icoFoam. There is only one difference in dnsFoam. dnsFoam is icoFoam with random noise. So this solver is exactly what you want to do. No need to make a new solver. No need to add fluctuations to icoFoam.

What is the differnce between your solver and dnsFoam???

If you want to have better convergence you have to init your case in a proper way. If you have walls in your case, dnsFoam (or icoFoam with fluctuations) is not the right solver for you.

What is exactly your case?? Pherhaps we can find a better solution for your problem.

kind regards
Florian
To be honest, I really don't know, I just try to develop a solver fit my needs (do an essay's results, the essay is called: Quasi-DNS Capabilities of OpenFoam for different Mesh Types. If you wantit ,I can send it to you). if you want ,we can discuss and connect via email, my email address:tzqfly2009@163.com
tzqfly is offline   Reply With Quote

Old   October 8, 2014, 03:40
Default
  #19
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 3
itchy is on a distinguished road
Hi,

first:
I have found the paper:
Ed Komen et. al., "Quasi-DNS Capabilities of OpenFoam for different Mesh Types"
You want to do smth like this, right??
I will study the paper, give me a second. Then we will find a way, how you can do that.

second:
You can add pressure gradient with a fvOptions file in the /system folder. Smth. like this:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

momentumSource
{
type pressureGradientExplicitSource;
active on; //on/off switch
selectionMode all; //cellSet // points //cellZone

pressureGradientExplicitSourceCoeffs
{
fieldNames (U);
Ubar ( 0 0 0.1324225 ); //This is your desired mean velocity
}
}

kind regards
Florian
itchy is offline   Reply With Quote

Old   October 8, 2014, 03:56
Default
  #20
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 45
Rep Power: 2
tzqfly is on a distinguished road
Quote:
Originally Posted by itchy View Post
Hi,

first:
I have found the paper:
Ed Komen et. al., "Quasi-DNS Capabilities of OpenFoam for different Mesh Types"
You want to do smth like this, right??
I will study the paper, give me a second. Then we will find a way, how you can do that.

second:
You can add pressure gradient with a fvOptions file in the /system folder. Smth. like this:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

momentumSource
{
type pressureGradientExplicitSource;
active on; //on/off switch
selectionMode all; //cellSet // points //cellZone

pressureGradientExplicitSourceCoeffs
{
fieldNames (U);
Ubar ( 0 0 0.1324225 ); //This is your desired mean velocity
}
}

kind regards
Florian
I have two questions:
1、where is fvOptions file in the OpenFoam or it was create by ourselves?
2、how to call the file?

The following post is the effort I did, but it also met a questions, Add the constant pressure gradient to the momentum equation, you can have a look
tzqfly is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
finding noise of flow by dns simulation m2montazari OpenFOAM Running, Solving & CFD 0 October 22, 2010 11:54
Boundary Layer Noise Source Model Andrew FLUENT 0 January 12, 2009 23:47
Turbo noise macro Barri CFX 0 May 21, 2008 09:26
what is the meaning of white noise ztdep Main CFD Forum 5 November 17, 2006 05:14
noise and turbulence aim Main CFD Forum 4 June 6, 2001 05:26


All times are GMT -4. The time now is 23:20.