# Everything you need to compute DNS in channel vs OF 2.1.0

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

 July 9, 2013, 07:00 #21 Member   Lev Join Date: Dec 2010 Posts: 31 Rep Power: 7 initial conditions were U=0,p=0. And then flow developed to the "quasi steady state" of turbulence flow.

 March 3, 2014, 21:08 #22 Senior Member   Huang Xianbei Join Date: Sep 2013 Location: CAU,China Posts: 277 Rep Power: 6 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

 March 6, 2014, 22:27 #23 Senior Member   Huang Xianbei Join Date: Sep 2013 Location: CAU,China Posts: 277 Rep Power: 6 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?

 March 25, 2014, 21:21 #24 Senior Member   Huang Xianbei Join Date: Sep 2013 Location: CAU,China Posts: 277 Rep Power: 6 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 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?

 July 9, 2014, 15:11 #25 Senior Member   Kent Wardle Join Date: Mar 2009 Location: Illinois, USA Posts: 208 Rep Power: 13 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. Last edited by kwardle; July 10, 2014 at 10:59.

 July 6, 2015, 16:46 Same set up calculation using icoFoam #26 Member     Roro Wang Join Date: Mar 2010 Location: Cambridge, MA, USA Posts: 30 Rep Power: 8 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 Last edited by foamWang; July 6, 2015 at 23:49.

November 10, 2015, 09:39
#27
New Member

Join Date: Oct 2015
Posts: 3
Rep Power: 2
Quote:
 Originally Posted by levka 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!
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

Last edited by Hackerbrucke; December 1, 2015 at 08:59. Reason: Able to compile with newer versions

January 26, 2016, 08:02
#28
New Member

Jean Schuster
Join Date: Jan 2015
Posts: 5
Rep Power: 3
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.

January 29, 2016, 05:08
#29
New Member

Join Date: Oct 2015
Posts: 3
Rep Power: 2
Quote:
 Originally Posted by jeanbvb 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.
Attached Files
 icoT_DNS.tar.gz (2.0 KB, 10 views)

January 29, 2016, 10:58
#30
New Member

Jean Schuster
Join Date: Jan 2015
Posts: 5
Rep Power: 3
Quote:
 Originally Posted by Hackerbrucke 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.

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post alberto OpenFOAM Running, Solving & CFD 20 February 17, 2016 18:26 sbaffini Main CFD Forum 2 July 29, 2013 06:03 Abhinav Main CFD Forum 1 April 11, 2013 06:37 magicsquirrel Main CFD Forum 4 December 13, 2011 18:45 YANGLIANG OpenFOAM 0 March 4, 2010 09:40

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