|
[Sponsors] |
September 13, 2014, 04:42 |
white noise in DNS
|
#1 |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
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!! |
|
September 18, 2014, 07:37 |
|
#2 |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
Nobody know ?
|
|
September 21, 2014, 13:06 |
|
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answer - have a look at this thread: http://www.cfd-online.com/Forums/ope...-perturbu.html
|
|
September 23, 2014, 04:07 |
About white noise
|
#4 |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
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? |
|
September 23, 2014, 04:16 |
|
#5 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 |
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 |
|
September 23, 2014, 04:59 |
|
#6 |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
Hi,
Tkank you for your help, I'll look into boxTurb-utility. the only aim add white noise is to convergence faster. |
|
September 23, 2014, 05:28 |
|
#7 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 |
Hi,
do you want to initialize your field with white noise to get better convergence. kind regards |
|
September 23, 2014, 07:24 |
|
#8 |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
||
September 23, 2014, 07:38 |
|
#9 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 |
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 |
|
September 23, 2014, 08:54 |
|
#10 |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
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.
|
|
September 23, 2014, 09:35 |
|
#11 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 |
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 |
|
September 23, 2014, 09:48 |
|
#12 |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
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.
|
|
September 23, 2014, 10:02 |
|
#13 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 |
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 |
|
September 23, 2014, 22:24 |
|
#14 |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
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? |
|
September 23, 2014, 23:36 |
|
#15 | |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
Quote:
I ran my solver successfully, using random fluctuations in the dnsFoam, it's calculating now, hope for good results. |
||
September 24, 2014, 04:35 |
|
#16 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 |
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 |
|
October 6, 2014, 07:29 |
|
#17 | |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
Quote:
do you know how to add a constant pressure gradient in the momentum equation in the icoFoam? |
||
October 6, 2014, 07:43 |
|
#18 | |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
Quote:
|
||
October 8, 2014, 04:40 |
|
#19 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 |
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 |
|
October 8, 2014, 04:56 |
|
#20 | |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
Quote:
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, http://www.cfd-online.com/Forums/ope...-equation.html, you can have a look |
||
|
|
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 12:54 |
Boundary Layer Noise Source Model | Andrew | FLUENT | 0 | January 12, 2009 23:47 |
Turbo noise macro | Barri | CFX | 0 | May 21, 2008 10: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 06:26 |