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

white noise in DNS

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 11, 2014, 06:36
Default
  #41
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12
itchy is on a distinguished road
Hi,

concerning laminar

In the momentum equation of pimpleFoam/pisoFoam ... you can find turbulence->divDevReff(U).
If you choose constant/turbulenceProperties -> simulationType laminar; turbulence->divDevReff(U). change to:

- fvm::laplacian(nuEff(), U)
- fvc::div(nuEff()*dev(T(fvc::grad(U))))

, where nuEff() is for simulationType laminar the laminar viscosity.
Here you can see, changing to simulationType laminar gives you the Navier-Stokes equation for laminar flow, which is equal to DNS-flow.

concerning boxTurb

In OF2.3 boxTurb is a standard utility. you can find a tutorial at:
run/tutorials/DNS/dnsFoam/boxTurb16/constant

kind regards
Florian
itchy is offline   Reply With Quote

Old   October 11, 2014, 08:22
Default
  #42
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12
tzqfly is on a distinguished road
Quote:
Originally Posted by itchy View Post
Hi,

concerning laminar

In the momentum equation of pimpleFoam/pisoFoam ... you can find turbulence->divDevReff(U).
If you choose constant/turbulenceProperties -> simulationType laminar; turbulence->divDevReff(U). change to:

- fvm::laplacian(nuEff(), U)
- fvc::div(nuEff()*dev(T(fvc::grad(U))))

, where nuEff() is for simulationType laminar the laminar viscosity.
Here you can see, changing to simulationType laminar gives you the Navier-Stokes equation for laminar flow, which is equal to DNS-flow.

concerning boxTurb

In OF2.3 boxTurb is a standard utility. you can find a tutorial at:
run/tutorials/DNS/dnsFoam/boxTurb16/constant

kind regards
Florian
Yes, I got the boxTurb, but I don't know where is the perTurb,can you send me? Another question is how to use the boxTurb utility,you know, I try to use is ,but I met the following error: From function Kmesh::Kmesh(const fvMesh& mesh) in file Kmesh/Kmesh.C at line 84, Could you help me?
tzqfly is offline   Reply With Quote

Old   October 11, 2014, 08:33
Default
  #43
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12
itchy is on a distinguished road
Hi,

you can find perTurb in some threads at cfd-online. I don't have it, no need to have it.

Is this the whole error message??? Because it says nothing. Please post the whole error message.

Have you tried the tutorial?? Does it work??

function Kmesh checks the mesh size. Pherhaps your grid has a wrong number of cells. For boxTurb your grid must have 2^x cells. How many cells do you have??

If your grid has not 2^x cells you have to build a dummy mesh with 2^x cells. Then use boxTurb for your dummy mesh. After that you can use mapfields for interpolating from the dummy mesh to the "real" mesh.

best regards
Florian
itchy is offline   Reply With Quote

Old   October 12, 2014, 01:53
Default
  #44
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12
tzqfly is on a distinguished road
Quote:
Originally Posted by itchy View Post
Hi,

you can find perTurb in some threads at cfd-online. I don't have it, no need to have it.

Is this the whole error message??? Because it says nothing. Please post the whole error message.

Have you tried the tutorial?? Does it work??

function Kmesh checks the mesh size. Pherhaps your grid has a wrong number of cells. For boxTurb your grid must have 2^x cells. How many cells do you have??

If your grid has not 2^x cells you have to build a dummy mesh with 2^x cells. Then use boxTurb for your dummy mesh. After that you can use mapfields for interpolating from the dummy mesh to the "real" mesh.

best regards
Florian
My mesh is 2^x, the error is same.the details is following:


--> FOAM FATAL ERROR:
calculated number of cells is incorrect

From function Kmesh::Kmesh(const fvMesh& mesh)
in file Kmesh/Kmesh.C at line 84.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) in "/home/jason/OpenFOAM/OpenFOAM-2.1.1/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/jason/OpenFOAM/OpenFOAM-2.1.1/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Foam::Kmesh::Kmesh(Foam::fvMesh const&) in "/home/jason/OpenFOAM/OpenFOAM-2.1.1/platforms/linuxGccDPOpt/lib/librandomProcesses.so"
#3
in "/home/jason/OpenFOAM/OpenFOAM-2.1.1/platforms/linuxGccDPOpt/bin/boxTurb"
#4 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#5
in "/home/jason/OpenFOAM/OpenFOAM-2.1.1/platforms/linuxGccDPOpt/bin/boxTurb"
Aborted

Can you tell me how to do it? Thank you
tzqfly is offline   Reply With Quote

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

Can you see the grid and the velocityfield in paraFoam??? (Before you start boxTurb)

please post a checkMesh of your mesh and the file /constant/polyMesh/boundary

Have you tried the tutorial??

Best regards
Florian
itchy is offline   Reply With Quote

Old   October 13, 2014, 03:33
Default
  #46
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12
tzqfly is on a distinguished road
Quote:
Originally Posted by itchy View Post
Hi,

Can you see the grid and the velocityfield in paraFoam??? (Before you start boxTurb)

please post a checkMesh of your mesh and the file /constant/polyMesh/boundary

Have you tried the tutorial??

Best regards
Florian

Yes, I can see the grid and velocityfield in paraFoam,after checkMesh, Ihe mesh is OK, but when I use the boxTurb, the error is occur. Can you tell me why?
tzqfly is offline   Reply With Quote

Old   October 13, 2014, 03:50
Default
  #47
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12
itchy is on a distinguished road
please post a checkMesh of your mesh and the file /constant/polyMesh/boundary
itchy is offline   Reply With Quote

Old   October 13, 2014, 04:20
Default
  #48
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12
tzqfly is on a distinguished road
Quote:
Originally Posted by itchy View Post
please post a checkMesh of your mesh and the file /constant/polyMesh/boundary
The result after checkMesh is following:

Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 64821
faces: 184700
internal faces: 175300
cells: 60000
boundary patches: 10
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 60000
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0

Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
bottomWall 1200 1271 ok (non-closed singly connected)
topWall 1200 1271 ok (non-closed singly connected)
sides1_half0 1000 1066 ok (non-closed singly connected)
sides1_half1 1000 1066 ok (non-closed singly connected)
sides2_half0 1000 1066 ok (non-closed singly connected)
sides2_half1 1000 1066 ok (non-closed singly connected)
inout1_half0 750 806 ok (non-closed singly connected)
inout1_half1 750 806 ok (non-closed singly connected)
inout2_half0 750 806 ok (non-closed singly connected)
inout2_half1 750 806 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (0 0 0) (4 2 2)
Mesh (non-empty, non-wedge) directions (1 1 1)
Mesh (non-empty) directions (1 1 1)
Boundary openness (-2.26528e-16 -3.05745e-18 3.30085e-17) OK.
Max cell openness = 1.5351e-16 OK.
Max aspect ratio = 10.4192 OK.
Minumum face area = 0.000639842. Maximum face area = 0.0102758. Face area magnitudes OK.
Min volume = 6.39842e-05. Max volume = 0.000685055. Total volume = 16. Cell volumes OK.
Mesh non-orthogonality Max: 0 average: 0
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 3.90723e-11 OK.
Coupled point location match (average 1.74642e-16) OK.

Mesh OK.

End


And the boundary file is following:

10
(
bottomWall
{
type wall;
nFaces 1200;
startFace 175300;
}
topWall
{
type wall;
nFaces 1200;
startFace 176500;
}
sides1_half0
{
type cyclic;
nFaces 1000;
startFace 177700;
matchTolerance 0.0001;
neighbourPatch sides1_half1;
}
sides1_half1
{
type cyclic;
nFaces 1000;
startFace 178700;
matchTolerance 0.0001;
neighbourPatch sides1_half0;
}
sides2_half0
{
type cyclic;
nFaces 1000;
startFace 179700;
matchTolerance 0.0001;
neighbourPatch sides2_half1;
}
sides2_half1
{
type cyclic;
nFaces 1000;
startFace 180700;
matchTolerance 0.0001;
neighbourPatch sides2_half0;
}
inout1_half0
{
type cyclic;
nFaces 750;
startFace 181700;
matchTolerance 0.0001;
neighbourPatch inout1_half1;
}
inout1_half1
{
type cyclic;
nFaces 750;
startFace 182450;
matchTolerance 0.0001;
neighbourPatch inout1_half0;
}
inout2_half0
{
type cyclic;
nFaces 750;
startFace 183200;
matchTolerance 0.0001;
neighbourPatch inout2_half1;
}
inout2_half1
{
type cyclic;
nFaces 750;
startFace 183950;
matchTolerance 0.0001;
neighbourPatch inout2_half0;
}
)
tzqfly is offline   Reply With Quote

Old   October 13, 2014, 04:48
Default
  #49
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12
itchy is on a distinguished road
Hi,

Overall number of cells of each type:
hexahedra: 60000


this is not 2^x

for example 2^16=65536
or 2^15 = 32768

Your mesh must have 2^x cells.

kind regards
Florian
itchy is offline   Reply With Quote

Old   October 13, 2014, 05:27
Default
  #50
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12
tzqfly is on a distinguished road
Quote:
Originally Posted by itchy View Post
Hi,

Overall number of cells of each type:
hexahedra: 60000


this is not 2^x

for example 2^16=65536
or 2^15 = 32768

Your mesh must have 2^x cells.

kind regards
Florian

In other words, If my require grid is z28*128*116, then I cannot use boxTurb? Do you know how to use perturbU? when I use perturbU utility, the coordinate of wall direction is changeless, so do you know the difference between boxTurb and perturbU?
tzqfly is offline   Reply With Quote

Old   October 13, 2014, 07:54
Default
  #51
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12
itchy is on a distinguished road
Hi,

I am not familar with perTurb. You can read the thesis of Eugen de Villiers. Or you can look at other threads in cfd-online about perTurb.

For your channel you have to use boxTurb in combination with mapFields. Do it like this:

1) create a "dummy grid" of your channel with 2^x cells
2) map the field from the "dummy grid" to your desired grid using mapFields utility in OF

No need to use perTurb.

kind regards
Florian
itchy is offline   Reply With Quote

Old   November 2, 2014, 21:56
Default
  #52
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12
tzqfly is on a distinguished road
Quote:
Originally Posted by itchy View Post
Hi,

I am not familar with perTurb. You can read the thesis of Eugen de Villiers. Or you can look at other threads in cfd-online about perTurb.

For your channel you have to use boxTurb in combination with mapFields. Do it like this:

1) create a "dummy grid" of your channel with 2^x cells
2) map the field from the "dummy grid" to your desired grid using mapFields utility in OF

No need to use perTurb.

kind regards
Florian
Hi,
I have tested your method, but I met the following question, could you help me?
First of all, the computation speed, you know, the DNS should take a long time to computation.So I want to use across nodes in parallel computing, do you know how?
Second is how to product the average time curve in the source code. Do you remember the essay that I shared with you? In the essay, there is a picture(a) about mean velocity in the figure 4 in page 19.
Third is how to get the root mean square speed curve of u,v,w, like Figure 4 (b)
Thank you!!!
tzqfly is offline   Reply With Quote

Old   November 16, 2014, 17:09
Question
  #53
Member
 
Daniel
Join Date: Jun 2014
Posts: 60
Rep Power: 12
Dan1788 is on a distinguished road
Hi Florian,

Regarding your message:

Quote:
For your channel you have to use boxTurb in combination with mapFields. Do it like this:

1) create a "dummy grid" of your channel with 2^x cells
2) map the field from the "dummy grid" to your desired grid using mapFields utility in OF
I am doing a similar test where I used the boxTurb utility for a 32X32X32 cube to generate initial velocity perturbations. I then mapped the U field using mapFields to a pipe with bulk velocity of 9.2 m/s.

I would like to know what should be the approximate magnitude of the velocity perturbations. Should it be of the same order as the bulk velocity in the pipe?? what are the appropriate values of Ea and Ko to choose for a particular case??
Dan1788 is offline   Reply With Quote

Old   November 28, 2014, 07:58
Default
  #54
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12
itchy is on a distinguished road
Hi,

sorry I was in holiday.

@Dan1788
you can estimate the perturbation using turbulent intensity. For example Ub = 9,6 m/s, turbulent intensity I= 10% -> u' is about 1m/s. Now you can set Ea and k that your fluctuations in the boy is about 1m/s. That should work.

kind regards
Florian
itchy is offline   Reply With Quote

Old   November 28, 2014, 08:03
Default
  #55
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12
itchy is on a distinguished road
Hi tzqfly,

you can use decomposePar for parallel computing. What is "across nodes in parallel computing" ??

For averaging you have to include smth. like this at the of your controlDict:
functions
{
fieldAverage1
{
type fieldAverage;
functionObjectLibs ( "libfieldFunctionObjects.so" );
enabled true;
outputControl outputTime;
resetOnRestart false;

fields
(
U
{
mean on;
prime2Mean on;
base time;
}
);
}
}

kind regards
Florian
itchy is offline   Reply With Quote

Old   November 28, 2014, 21:26
Default
  #56
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12
tzqfly is on a distinguished road
Quote:
Originally Posted by itchy View Post
Hi tzqfly,

you can use decomposePar for parallel computing. What is "across nodes in parallel computing" ??

For averaging you have to include smth. like this at the of your controlDict:
functions
{
fieldAverage1
{
type fieldAverage;
functionObjectLibs ( "libfieldFunctionObjects.so" );
enabled true;
outputControl outputTime;
resetOnRestart false;

fields
(
U
{
mean on;
prime2Mean on;
base time;
}
);
}
}

kind regards
Florian
Hi,itchy
Thank you very much,all the problems have been solved.I use the task submit system to solve the problem of mutil-nodes(I mean across nodes in parallel computing), when it comes to the averaging curve, I simulated the controlDict of channelFoam.
I still confused about varies problems about DNS, you said you've done a lot of DNS case, can you send me one of them which is stand for typically DNS? So I can easier to understand DNS!
Thank you again!
tzqfly is offline   Reply With Quote

Old   November 29, 2014, 10:22
Default
  #57
Member
 
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12
itchy is on a distinguished road
Hi,

it is very difficult to send you this data, because the files are huge ( even the mesh). I have done some pipe DNS, I am more specialized in LES (very similar). In my opinion OpenFoam is not a good tool for DNS, because the code (schemes ...) are very diffusive -> You need a lot of cells for DNS.

I will have a look at some cases, that I can send you (next week).

What are your problems with DNS???

kind regards
Florian
itchy is offline   Reply With Quote

Old   November 30, 2014, 16:59
Default
  #58
Member
 
Daniel
Join Date: Jun 2014
Posts: 60
Rep Power: 12
Dan1788 is on a distinguished road
Quote:
Hi,

sorry I was in holiday.

@Dan1788
you can estimate the perturbation using turbulent intensity. For example Ub = 9,6 m/s, turbulent intensity I= 10% -> u' is about 1m/s. Now you can set Ea and k that your fluctuations in the boy is about 1m/s. That should work.

kind regards
Florian
Hi Florian,

Thanks for your reply . So I am doing pipe flow LES with pimpleFoam using the following steps:

(1) generate initial turbulence using boxTurb in a square channel with walls on the top and bottom and rest cyclic BC's. Length is the same as the pipe but side equal to pipe diameter.
(2) Running the pimpleFoam solver on the square channel for around 5 flow through times.
(3) map the solution onto the pipe (mapFields) and then achieving a developed flow in the pipe.

The problem I am facing is that the pimpleFoam solver keeps crashing with cyclic BC's after a couple of time steps. did you ever encounter this problem before? (I have read posts of people talking about mappedPatch instead of cyclic for LES/RANS)
Dan1788 is offline   Reply With Quote

Old   December 1, 2014, 02:06
Default
  #59
Member
 
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12
tzqfly is on a distinguished road
Quote:
Originally Posted by itchy View Post
Hi,

it is very difficult to send you this data, because the files are huge ( even the mesh). I have done some pipe DNS, I am more specialized in LES (very similar). In my opinion OpenFoam is not a good tool for DNS, because the code (schemes ...) are very diffusive -> You need a lot of cells for DNS.

I will have a look at some cases, that I can send you (next week).

What are your problems with DNS???

kind regards
Florian
OK,thank you very much!you really helpful.By the way, I need no mesh file. What I want is the solver and case so as to learn DNS more efficiently.And now, I'm doing duct flow with DNS.
There are some problems that I summarized:
1、How to set averaging time in the controlDict.
2、How to calculate and show Y+ curve.(for example: y+=15)
3、What's the mass flow rate (Ubar) formulation.
4、Although I used the boxTurb, I still don't know how to set the boxTurbDict file. Can you show me?
Thank you!!!

Last edited by tzqfly; December 6, 2014 at 02:35.
tzqfly is offline   Reply With Quote

Old   January 23, 2015, 17:54
Default
  #60
mgg
New Member
 
Join Date: Nov 2012
Posts: 27
Rep Power: 14
mgg is on a distinguished road
Hallo Florian,

how about the results of your DNS pipe flow? About the diffusivity of pipe flow, you mean the 2rd oder FVM of OF?

Quote:
Originally Posted by itchy View Post
Hi,

it is very difficult to send you this data, because the files are huge ( even the mesh). I have done some pipe DNS, I am more specialized in LES (very similar). In my opinion OpenFoam is not a good tool for DNS, because the code (schemes ...) are very diffusive -> You need a lot of cells for DNS.

I will have a look at some cases, that I can send you (next week).

What are your problems with DNS???

kind regards
Florian
mgg is offline   Reply With Quote

Reply


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 Off
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 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


All times are GMT -4. The time now is 06:00.