|
[Sponsors] |
October 24, 2013, 03:44 |
About the Taylor Green vortex
|
#1 |
New Member
Y.F.JIAO
Join Date: Oct 2013
Posts: 5
Rep Power: 12 |
Hello,everyone! Resently,I'm working on verifying the accuracy of my code by mesh refinement.My code is written in Fortran, and is based on FVM.
I choose the benchmark problem--Taylor-Green Vortex. During the computation,the computation domain size is 2π*2π. I impose the initial velocity and pressure field as following: u(x,y,t)=-sin(x)cos(y)exp(-2νt) v(x,y,t)=cos(x)sin(y)exp(-2νt) p(x,y,t)=0.25(cos(2x)+cos(2y))exp(-4νt) The folw is two-dimensional,laminar and unsteady.The density ρ is 1,and the kinetic viscosity is 0.01;with periodic conditions at the boundaries x=0,x=2π, y=0 and y=2π. Is that right?During the computation,I just give the velocity and pressure field at t=0. In my thought,my code is second order,but the result shows that it is less than first order! Please point out my mistakes, and I will be very grateful! |
|
October 27, 2013, 16:33 |
|
#2 |
Senior Member
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20 |
Your setup of the problem seems to be OK, have you tested your code or parts of it before? Have you for example tested the implementation of your convection, the time discretization, the viscous terms etc independently?
Do you achieve better convergence for a finer grid? This is a smooth problem, so a convergence between one suggests there is something wrong with your implementation. Check your boundary conditions, and your fluxes... |
|
October 30, 2013, 00:48 |
|
#3 | |
New Member
Y.F.JIAO
Join Date: Oct 2013
Posts: 5
Rep Power: 12 |
Quote:
but there is another one,when testifying the temporal accuracy,I use the finest grid ,considering the CFL must less than 1,so dt should be very small, but the problem is that when i using the very small dt,the error seem become constant between different dt(they are all very small). i.e. the grid is 320*320 in a domain 2phi*2phi,dt= 0.0001,0.0002. the errors are almost the same! another question is how many time step should it iterate? is there some norm ? when checking the temporal accuracy of the code,should the flow time T be constant or the number of time step be constant using different dt? does there anything wrong ? |
||
October 30, 2013, 02:12 |
|
#4 |
Senior Member
|
This is to be expected as 2*pi/320 is much higher than your dt, hence everything is covered by the spatial error. To be fair, you should use a fixed T for comparison when reducing dt.
|
|
October 30, 2013, 03:00 |
|
#5 |
New Member
Y.F.JIAO
Join Date: Oct 2013
Posts: 5
Rep Power: 12 |
well, i remember a literature it says that keep dt/h=10-2,so i choose the very small dt. 2*pi/320=0.019625,so what is the proper dt when checking the temporal accuracy ? 0.01?or much higher? if so ,then CFLwill >1, is it OK? I am a fresh
|
|
October 30, 2013, 03:53 |
|
#6 |
Senior Member
|
Ok, let me put it another way. You can do accuracy check in 3 way (for unsteady problems):
1) With fixed dx: you choose the smallest dx you can achieve and change dt from the largest allowable one to the smallest feasible. Of course, your Courant number is changing (that's why i wrote allowable dt), but that's part of the approach. At some time, the spatial error will be dominant, as in your case (actually there it seems to be always dominant). 2) With fixed dt: you choose a very small dt and change your dx. You may want some control on the range of Courant numbers passed trough by this approach, dt is thus chosen accordingly. I don't know if there is any theporetical advantage in having the same Courant number range as in point 1 above. Again, at some point, your time discretization error will be dominant. 3) With fixed Courant number: You both fix an initial dt and dx such that your desired Courant number is achieved, and then you change both dx and dt in order to preserve the Courant number. Ideally, in this case, there is no numerical error barrier and the error should go down indefinitely as long as you keep refining your grid. The approach (3) is usually tought to be the most relevant approach as the Courant number is the relevant non-dimensional parameter for "numerical" convection. However, when diffusion comes in, you also have an additional non-dimensional parameter: nu * dt/dx^2 = (nu/dt) * C^2 (assuming unitary velocity U) which would be changing unless you change the viscosity too. However, for the Taylor-Green case, the velocity is also changing in time (and space!!!), hence such sofistication might be non-sense... just, be aware of it as your numerical method might depend on the diffusion parameter as well. |
|
October 30, 2013, 04:06 |
|
#7 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
as Paolo said, the way to check the numerical time-accuracy requires a very fine spatial grid, such as 628x628. Otherways the local truncation error will produce a constant level that overwhelms the expected convergences.
Further, I would suggest using a single-time step analysis. For example, a second order accuracy in time, just running a single dt, estimating the discretization error, must produce a third-order slope. This is because in a single-step analysis O(e) = dt O(LTE) If you want, I have some papers providing many details |
|
October 30, 2013, 21:53 |
|
#8 | |
New Member
Y.F.JIAO
Join Date: Oct 2013
Posts: 5
Rep Power: 12 |
Quote:
|
||
October 30, 2013, 21:57 |
|
#9 | |
New Member
Y.F.JIAO
Join Date: Oct 2013
Posts: 5
Rep Power: 12 |
Quote:
|
||
October 31, 2013, 03:14 |
|
#10 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
Quote:
well, I don't think the problem is the dt. I suggest using the Linf norm and check the position where the max error is reached. If you have time, have a reading at the numerical results section in http://onlinelibrary.wiley.com/doi/1...d.520/abstract http://onlinelibrary.wiley.com/doi/1...d.598/abstract where the same test-case is analysed |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Presenation of vortex strength and velocity concept? | fruitkiwi | Main CFD Forum | 0 | September 26, 2012 22:08 |
vortex cause pressure gradient or pressure gradient induce vortex? | fruitkiwi | Main CFD Forum | 4 | June 12, 2012 01:12 |
creating vortex core line | aay023 | Main CFD Forum | 0 | September 15, 2010 21:49 |
Air-Jet Vortex Generator, request for some papers | ROOZBEH | Main CFD Forum | 0 | July 12, 2008 10:27 |
turbulent scales of forced vortex and free vortex | lcw | Main CFD Forum | 3 | September 1, 2005 13:40 |