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/)
-   -   Everything you need to compute DNS in channel vs OF 2.1.0 (https://www.cfd-online.com/Forums/openfoam-solving/101511-everything-you-need-compute-dns-channel-vs-2-1-0-a.html)

levka July 9, 2013 07:00

initial conditions were U=0,p=0. And then flow developed to the "quasi steady state" of turbulence flow.

huangxianbei March 3, 2014 20:08

Hi
I just follow your idea of adding a source term representing the grad(p) in the UEqn, I made my domain as 12.56*2*6.28m in 3 orientation. The fluid is water whose nu =1e-6m2/s, the grad(p)=3.8e-8m/s2, however, the solution turns to be strange that the residual of Uy,Uz and p increase after a certain timesteps, the residual of p approches about 0.5. Also, the velocity along the y direction increases steadily along timestep, so the solution can converge, what may be the problem? My grid is 64*128*64

huangxianbei March 6, 2014 21:27

Hi,lev:
Another question(probably very simple). In the controlDict in your test case, the application name is solver_DNS, while the solver you defined is ico_DNS, is this should be "ico_DNS' insteady?

huangxianbei March 25, 2014 20:21

Hi:
I use the perturbU to make a initial field, setting the maximum streak to be at y+=12 by modifying the perturbU.C. However, the solution takes long time to reach a perhaps fully developed flow after 40000s, also ,the result is not good, as you can see
http://www.cfd-online.com/Forums/mem...m-perturb.jpeg
the velocity is higher than the loglaw when y+>30, I don't know how to generate a more proper initial field, can anyone help?

kwardle July 9, 2014 15:11

Any chance someone can repost the files for ico_dns solver? I am unable to get them from sendspace.

~ EDIT ~

Never mind. I got it now. Thanks for sharing.

foamWang July 6, 2015 16:46

Same set up calculation using icoFoam
 
Hi Lev,

Your work looks very amazing. Thanks for the contribution. I tried to use icoFoam directly to reproduce your work but found the mean velocity profile is ok, but the u_rms is much off. So I guess it's due to your modification to the original icoFoam. I noticed you modified the pressure term. Could you explain why and is there any reference to your modification?

Update: Got the reason, i.e. the modification applied a constant pressure gradient. Everything works great now.

Thanks a lot.
foamWang

Hackerbrucke November 10, 2015 08:39

Quote:

Originally Posted by levka (Post 359522)
Hello everyone.
Here are everything you need to compute DNS in channel vs OF 2.1.
Attached pdf is comparison this solver with DNS data of Kawamura and "Kim and Moin, 1987". Max divergence by mean "u" vs Moin is 2%, vs Kawamura 0%. Also in pdf there is view of full turbulent velocity profile that was taken during average procedure(10,000-30,000).
Following reference is to download zip file:
http://www.sendspace.com/file/xw4myd

Zip contains:
- solver (modified ico_Foam);
- utility to create tangential mesh spacing;
- test case with perturbed initial data;
- computed averaged data+log file;
- manipulation with data Excel file;
- paper Kim and Moin 1987;
- DNS data from paper above;
- DNS data Kawamura;
- master thesis of Steven van Haren"Testing DNS capability of OpenFOAM
and STAR-CCM+";

In case zip is not available i will e-mail it .


Have fun guys!:cool:

Hi Levka,

I am trying to compile your solver for OpenFOAM v2.3.0 and of course, it does not work! I tried to make changes to your source code to correspond to the new OF version but it did not work.

I am trying to simulate a DNS channel case with a step and want to run my simulations parallelly.

If a newer version of your solver is available, please guide me to it. Or if there is something else available from OpenFOAM (2.3.0 or any later versions) to solve the problem.

Thanks,
KM


Solved --- Figured out the changes in the icoFoam solver in the new version of OpenFOAM. Was able to compile with v2.3.0 & v2.4.0

jeanbvb January 26, 2016 07:02

Hi guys.

I'm trying to compile the solver with the OpenFOAM 3.0.0 in the Ubuntu 14.04 LTS x64 distribution. I have total control over the OpenFOAM instalation directory, but when I try to run the "wmake all" command I got the following error:

Quote:

jean@Jean:/opt/openfoam30/applications/solvers/DNS/ico_DNS$ wmake all
/opt/openfoam30/applications/solvers/DNS/ico_DNS
g++ -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam30/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam30/src/OpenFOAM/lnInclude -I/opt/openfoam30/src/OSspecific/POSIX/lnInclude -fPIC -c ico_DNS.C -o /opt/openfoam30/platforms/linux64GccDPInt32Opt/applications/solvers/DNS/ico_DNS/ico_DNS.o
In file included from /opt/openfoam30/src/finiteVolume/lnInclude/ddtScheme.C:30:0,
from /opt/openfoam30/src/finiteVolume/lnInclude/ddtScheme.H:337,
from /opt/openfoam30/src/finiteVolume/lnInclude/fvcDdt.C:28,
from /opt/openfoam30/src/finiteVolume/lnInclude/fvcDdt.H:199,
from /opt/openfoam30/src/finiteVolume/lnInclude/fvc.H:44,
from /opt/openfoam30/src/finiteVolume/lnInclude/fvCFD.H:8,
from ico_DNS.C:32:
/opt/openfoam30/src/finiteVolume/lnInclude/cyclicAMIFvPatch.H:39:35: fatal error: cyclicAMILduInterface.H: No such file or directory
#include "cyclicAMILduInterface.H"
^
compilation terminated.
make: *** [/opt/openfoam30/platforms/linux64GccDPInt32Opt/applications/solvers/DNS/ico_DNS/ico_DNS.o] Error 1
jean@Jean:/opt/openfoam30/applications/solvers/DNS/ico_DNS$
I would be very pleased if someone could help me trhought this problem.

Hackerbrucke January 29, 2016 04:08

1 Attachment(s)
Quote:

Originally Posted by jeanbvb (Post 582466)
Hi guys.

I'm trying to compile the solver with the OpenFOAM 3.0.0 in the Ubuntu 14.04 LTS x64 distribution. I have total control over the OpenFOAM instalation directory, but when I try to run the "wmake all" command I got the following error:

I would be very pleased if someone could help me trhought this problem.

Hello,

The icoFoam solver implementation was improved from the one in OFv2.1.0 due to the restructuring of some libraries.

I took the icoFoam code from v2.4.0 and implemented the changes as suggested in the code from Levka. An additional control on the Maximum Courant number was added.

I am not sure if it will work with the latest v3.0 because I haven't used it but you can give it a try.

Best regards,
KM

PS: Incase it doesn't work, just take a look at the icoFoam code in v3.0, copy the files, rename the solver and make the changes according to this code.

jeanbvb January 29, 2016 09:58

Quote:

Originally Posted by Hackerbrucke (Post 582898)
Hello,

The icoFoam solver implementation was improved from the one in OFv2.1.0 due to the restructuring of some libraries.

I took the icoFoam code from v2.4.0 and implemented the changes as suggested in the code from Levka. An additional control on the Maximum Courant number was added.

I am not sure if it will work with the latest v3.0 because I haven't used it but you can give it a try.

Best regards,
KM

PS: Incase it doesn't work, just take a look at the icoFoam code in v3.0, copy the files, rename the solver and make the changes according to this code.

Hi Hackerbrucke, it worked on the OF 2.4.0 but did not with OF 3.0. I'll try to get it work on the OF 3.0 following your tips. If I get it work on OF 3.0 I'll post the results on this thread.

I'm starting to work with CFD now, so I still haven't much to add to the comunity.

I would like to thank you guys, in special to levka and Hackerbrucke.

Aaron_L April 13, 2017 13:14

Hi foamers,
I have some doubt in levka's DNS test case, he compare with kim and moin(1987) Retau=180, and Re=3300

and in levka's case, he set nu=1.5e-5, so the mean inlet velocity is U=Re*nu/L=3300*1.5e-5/1=0.0495, but in his case, he set the mean inlet velocity U=0.045

I compare his result with moin, the uplus_mean and urms show a good agreement, and I calculate the case's Utau=0.00263842, it approximate to Utau=Retau*nu/h=180*1.5e-5/1=0.0027

however, I run a case with mean inlet velocity U=0.0495, when I check my result, my Utau=0.00306223, uplus_mean can fit with moin, but my urms are some bigger than moin's result

can someone good at DNS explain it to me?

Best regards

Santiago April 14, 2017 02:04

Low order codes generate higher dissipation. This due to the use of discrete CDS approximations. A simple Fourier analysis reveal the 'dampening' of waves passed through low order gradient schemes. See this DNS not in the context of Kim&Moin, who used spectral codes for their work, but in the context of FVM.

Sent from my GT-I8190L using CFD Online Forum mobile app

Aaron_L April 14, 2017 04:34

Quote:

Originally Posted by Santiago (Post 644877)
See this DNS not in the context of Kim&Moin, who used spectral codes for their work, but in the context of FVM.
[/URL]

you mean in openfoam, due to the FVM precision less than spectral codes and mesh amount too little, my Re=3300 case cannot ensure the Retau=180(my case result is Retau=204)?
but why levka's case (Re=3000) can ensure his case result Retau=176≈180?and his result fit with moin's result well.

can you give me some suggestions? increase grid amount, or use high order discretization schemes? or may be in his or my case something set error.

Best regards.

Santiago April 14, 2017 04:55

To clarify, "Precision" is not the correct word to use in this context, least to talk about the goodness of a particular approach in solving numerically the incompressible NSE; again, it's more appropriate to talk about context: as you should never use an F1 car to drive back from work, you would never compete in F1 using a Fiat Panda, both do the job of taking you places but you use them for completely different reasons. FVM methods used in the context of CFD serve for the study of complex geometry and physics scenarios, where no accurate comparison can be made, and "Better" methods just won't cut it, maybe because it's too slow, too dispersive (thus unstable), or the physics of turbulence too complex that modelling needs to be used. Note that the greatest achievements in incompressible turbulence (algorithms, models, etc) have come from the FVM community, and then somehow transformed and used by the other communities (FEM, Spectral, etc.)

Coming back to your query, I don't know what spatial schemes are you using, but you should avoid all TDV/NVD/limited/corrected schemes when doing DNS as they add dissipation "on purpose". For such a low Reynolds Number, a low order Solver should give you nice results as long you keep the cell Peclet Number under 2 and, obviously, the size of the cells fine enough to resolve the dissipative scales of turbulence for your particular simulation.

Honda May 12, 2020 11:21

Quote:

Originally Posted by levka (Post 359522)
Hello everyone.
Here are everything you need to compute DNS in channel vs OF 2.1.
Attached pdf is comparison this solver with DNS data of Kawamura and "Kim and Moin, 1987". Max divergence by mean "u" vs Moin is 2%, vs Kawamura 0%. Also in pdf there is view of full turbulent velocity profile that was taken during average procedure(10,000-30,000).
Following reference is to download zip file:
http://www.sendspace.com/file/xw4myd

Zip contains:
- solver (modified ico_Foam);
- utility to create tangential mesh spacing;
- test case with perturbed initial data;
- computed averaged data+log file;
- manipulation with data Excel file;
- paper Kim and Moin 1987;
- DNS data from paper above;
- DNS data Kawamura;
- master thesis of Steven van Haren"Testing DNS capability of OpenFOAM
and STAR-CCM+";

In case zip is not available i will e-mail it .


Have fun guys!:cool:

Hi,
The mentioned link is not working anymore, can you update it please?

Thanks

ViktorKL October 7, 2020 08:18

The zip file isn't accessible anymore. Can someone help out?

hxaxtma October 8, 2020 06:01

Hi did found the file in my backups:

so here is a link where you can download it:

https://drive.google.com/file/d/1To-...ew?usp=sharing

Hughtong March 8, 2021 04:19

file cannot download
 
Quote:

Originally Posted by levka (Post 359522)
Hello everyone.
Here are everything you need to compute DNS in channel vs OF 2.1.
Attached pdf is comparison this solver with DNS data of Kawamura and "Kim and Moin, 1987". Max divergence by mean "u" vs Moin is 2%, vs Kawamura 0%. Also in pdf there is view of full turbulent velocity profile that was taken during average procedure(10,000-30,000).
Following reference is to download zip file:
http://www.sendspace.com/file/xw4myd

Zip contains:
- solver (modified ico_Foam);
- utility to create tangential mesh spacing;
- test case with perturbed initial data;
- computed averaged data+log file;
- manipulation with data Excel file;
- paper Kim and Moin 1987;
- DNS data from paper above;
- DNS data Kawamura;
- master thesis of Steven van Haren"Testing DNS capability of OpenFOAM
and STAR-CCM+";

In case zip is not available i will e-mail it .


Have fun guys!:cool:

Dear levka
many years past. the file can not download, as you mentioned the initial condition, dont forget add perturbation, but how to do it? I only find turbulentInlet boundary, are they the same?

openfoam_aero May 19, 2022 03:51

Quote:

Originally Posted by levka (Post 359522)
Hello everyone.
Here are everything you need to compute DNS in channel vs OF 2.1.
Attached pdf is comparison this solver with DNS data of Kawamura and "Kim and Moin, 1987". Max divergence by mean "u" vs Moin is 2%, vs Kawamura 0%. Also in pdf there is view of full turbulent velocity profile that was taken during average procedure(10,000-30,000).
Following reference is to download zip file:
http://www.sendspace.com/file/xw4myd

Zip contains:
- solver (modified ico_Foam);
- utility to create tangential mesh spacing;
- test case with perturbed initial data;
- computed averaged data+log file;
- manipulation with data Excel file;
- paper Kim and Moin 1987;
- DNS data from paper above;
- DNS data Kawamura;
- master thesis of Steven van Haren"Testing DNS capability of OpenFOAM
and STAR-CCM+";

In case zip is not available i will e-mail it .


Have fun guys!:cool:

Hi please can you email the files to Uttam.offc07@gmail.com ? I am not able to download them

vb276 August 28, 2022 22:04

Hello levka , File date limit has expired,If you still have the file ,could send me it?my mailbox is vbcwl.276@gmail.com. Thanks for your help!


All times are GMT -4. The time now is 11:49.