|
[Sponsors] |
June 12, 2011, 05:59 |
Strange DNS results
|
#1 |
New Member
Join Date: Oct 2010
Posts: 24
Rep Power: 16 |
Hi foamers, especially DNSers,
I need your help. I have modified channelFoam to perform DNS of pipe flow. L/D=5, D=0.01m, bulk velocity is 0.53m/s, viscosity is 1e-6, so Re based on D is 5300. The mesh is 4 million, time step is 0.0001. At inlet and outlet boundaries, I set cyclic boundary condition. After 10000 time steps, I sampled the main axial velocity(z direction), very 500 time steps I get 1 sample, so there are 10 samples. I averaged the velocity, and get the following result, seen graph1 attached, the axial velocity seems to oscillate in the radial direction. This behavior will more obvious in instantaneous velocity, seen in graph2. What is more, the inlet instantaneous velocity differs from outlet instantaneous velocity. It is strange, because I applied cyclic bc at the two boundaries. Anyone who has do DNS simulation experience such problem. Please give me your hands, thanks |
|
June 13, 2011, 05:08 |
|
#2 |
Member
Dejan Morar
Join Date: Nov 2010
Posts: 78
Rep Power: 17 |
Hello,
I have no experience with DNS, but I think that your results are not that strange. Ten samples are not enough. For time averaging use function in controlDict. In this kind of simulations I always start averaging after about 15 flow-through times. Regards, Dejan |
|
June 13, 2011, 08:29 |
|
#3 |
New Member
Join Date: Oct 2010
Posts: 24
Rep Power: 16 |
Thanks for your reply, Dejan. Today my simulation complete at 59000 time steps. Then I sample the fields again. I sample very 1000 time steps, and get 49 samples. The average axial velocity also seems to oscillate in the radial direction, and the Reynold stress derivate largely from previous results. What is more, my inlet velocity fields are not the same as the outlet velocity
|
|
June 13, 2011, 08:30 |
|
#4 | |
New Member
Join Date: Oct 2010
Posts: 24
Rep Power: 16 |
Quote:
|
||
June 13, 2011, 09:04 |
|
#5 |
Member
Dejan Morar
Join Date: Nov 2010
Posts: 78
Rep Power: 17 |
Just add this function at the end of your controlDict file:
functions { fieldAverage1 { type fieldAverage; functionObjectLibs ( "libfieldFunctionObjects.so" ); enabled true; outputControl outputTime; fields ( U { mean on; prime2Mean on; base time; } p { mean on; prime2Mean on; base time; } ); } } and keep it running for at least 15 flow-through time (time needed for fluid to complete distance from inlet to outlet). Than check your profiles. Maybe you will need 100 time steps, or 1000 (depends on your geometry). Hope this helps. |
|
June 13, 2011, 09:19 |
|
#6 |
Member
Dejan Morar
Join Date: Nov 2010
Posts: 78
Rep Power: 17 |
Hi once again,
in channelFoam tutorial you have example of controlDict. |
|
June 13, 2011, 10:05 |
|
#7 |
New Member
Join Date: Oct 2010
Posts: 24
Rep Power: 16 |
Dejan, I sample after 10000 time steps. So I think my simulation should be fully developed. But the results are bad, especially the u'v' or Urms. Besides, the inlet instantaneous velocity differs from outlet instantaneous velocity
|
|
June 13, 2011, 10:53 |
|
#8 |
Member
Dejan Morar
Join Date: Nov 2010
Posts: 78
Rep Power: 17 |
Ok, I see that your flow is fully developed, but you cannot do averaging in time just by sampling 10, or 50 or 100 time steps. Continue with simulation for another 10000 steps, let say from time 1 to time 2 (use function in controlDict I told you - also gives you UPrime2Mean values) and then check your profile. That function does averaging; just imagine that you have sampled 10000 time steps instead of 49! Than, at least your velocity profiles should be ok.
Regarding instantaneous velocities, I have no idea where could be the problem. How did you calculate Urms values? |
|
June 13, 2011, 11:15 |
|
#9 | |
New Member
Join Date: Oct 2010
Posts: 24
Rep Power: 16 |
Quote:
|
||
June 13, 2011, 13:01 |
|
#10 |
Member
Dejan Morar
Join Date: Nov 2010
Posts: 78
Rep Power: 17 |
I understand what have you done. But, you do not have to do that since OpenFOAM provides easy and the right way. It means you do not have to save 49 steps and try to find average value; first: you need a lot of disk space, and second: 49 steps is far from enough in your case - it does not matter if you take every, or every 10000 steps.
Maybe I am not able to explain this clearly. I suggest you to try channelFoam tutorial and to check the output. You will see that mean and rms values are automatically calculated, because functions for that are specified in controlDict. Btw, did you try on the way I told you? |
|
June 13, 2011, 21:41 |
|
#11 | |
New Member
Join Date: Oct 2010
Posts: 24
Rep Power: 16 |
Quote:
|
||
June 14, 2011, 03:31 |
|
#12 | |
New Member
Join Date: Oct 2010
Posts: 24
Rep Power: 16 |
Quote:
|
||
June 14, 2011, 04:13 |
|
#13 |
Member
Dejan Morar
Join Date: Nov 2010
Posts: 78
Rep Power: 17 |
Hi LijieNPIC,
I'm glad to hear that! You can extract all components of UPrime2Mean tensor by using foamCalc. If you don't know how to use it, just type the following: foamCalc components UPrime2Mean This will extract UPrime2Meanxx UPrime2Meanxy UPrime2Meanxz UPrime2Meanyy UPrime2Meanyz UPrime2Meanzz (u'u' u'v' u'w' v'v' v'w' w'w'). |
|
June 14, 2011, 05:28 |
|
#14 | |
New Member
Join Date: Oct 2010
Posts: 24
Rep Power: 16 |
Quote:
|
||
June 14, 2011, 05:30 |
|
#15 |
Member
Dejan Morar
Join Date: Nov 2010
Posts: 78
Rep Power: 17 |
You are welcome
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Results comparison problems | ken87 | FloEFD, FloWorks & FloTHERM | 0 | March 15, 2011 04:58 |
Strange behaviour 1.6 decomposePar vs 1.7 decomposePar | BlueyTheDog | OpenFOAM | 7 | January 16, 2011 19:12 |
validation of CFD results | andy | FLUENT | 0 | June 13, 2007 14:55 |
CFX cylinder or sphere benchmark results | Mel | CFX | 1 | August 8, 2005 19:47 |
benchmark results | stefan | Siemens | 3 | September 10, 2001 10:48 |