CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

About the Taylor Green vortex

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By sbaffini
  • 1 Post By sbaffini

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 24, 2013, 03:44
Default About the Taylor Green vortex
  #1
New Member
 
Y.F.JIAO
Join Date: Oct 2013
Posts: 5
Rep Power: 12
clark.J is on a distinguished road
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!
clark.J is offline   Reply With Quote

Old   October 27, 2013, 16:33
Default
  #2
Senior Member
 
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20
cfdnewbie is on a distinguished road
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...
cfdnewbie is offline   Reply With Quote

Old   October 30, 2013, 00:48
Default
  #3
New Member
 
Y.F.JIAO
Join Date: Oct 2013
Posts: 5
Rep Power: 12
clark.J is on a distinguished road
Quote:
Originally Posted by cfdnewbie View Post
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...
Thank you for your explanation! now the problem has been solved!


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 ?
clark.J is offline   Reply With Quote

Old   October 30, 2013, 02:12
Default
  #4
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,152
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
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.
FMDenaro likes this.
sbaffini is offline   Reply With Quote

Old   October 30, 2013, 03:00
Default
  #5
New Member
 
Y.F.JIAO
Join Date: Oct 2013
Posts: 5
Rep Power: 12
clark.J is on a distinguished road
Quote:
Originally Posted by sbaffini View Post
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.
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
clark.J is offline   Reply With Quote

Old   October 30, 2013, 03:53
Default
  #6
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,152
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
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.
FMDenaro likes this.
sbaffini is offline   Reply With Quote

Old   October 30, 2013, 04:06
Default
  #7
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
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
FMDenaro is offline   Reply With Quote

Old   October 30, 2013, 21:53
Default
  #8
New Member
 
Y.F.JIAO
Join Date: Oct 2013
Posts: 5
Rep Power: 12
clark.J is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
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
I checked the temporal accuracy using a single-time step on grid 628*628,but the result is not satisfactory, when dt=0.1,after a single time step(ensuring the residuals down to 10-6),using L2 norm ,the error is 3.644E-4,and dt=0.05,the error is 2.14E-4, seems that it has reach the stagnation of error . I will try some bigger dt ,hope a good result.
clark.J is offline   Reply With Quote

Old   October 30, 2013, 21:57
Default
  #9
New Member
 
Y.F.JIAO
Join Date: Oct 2013
Posts: 5
Rep Power: 12
clark.J is on a distinguished road
Quote:
Originally Posted by sbaffini View Post
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.
I get a lot of useful information from your explanation ,thank you very much, sbaffini. I will try as you said . but using the finest grid will cost a little longer time.
clark.J is offline   Reply With Quote

Old   October 31, 2013, 03:14
Default
  #10
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by clark.J View Post
I checked the temporal accuracy using a single-time step on grid 628*628,but the result is not satisfactory, when dt=0.1,after a single time step(ensuring the residuals down to 10-6),using L2 norm ,the error is 3.644E-4,and dt=0.05,the error is 2.14E-4, seems that it has reach the stagnation of error . I will try some bigger dt ,hope a good result.

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


All times are GMT -4. The time now is 02:36.