CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

second order schemes

Register Blogs Community New Posts Updated Threads Search

Like Tree58Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 21, 2010, 11:08
Default second order schemes
  #1
Member
 
Marine
Join Date: Mar 2010
Posts: 38
Rep Power: 16
marine is on a distinguished road
Hello everybody !

I'm running a simulation of flow around a ship with a k-omega SST turbulent model.
I have an inlet, an outlet, four symmetry planes and a hull.

I did the simulation with first order schemes for divergence, linear schemes for gradschemes and interpolation schemes, linearCorrected for laplacian and corrected for snGradSchemes. It worked and I obtained coherent results for the velocity, pressure, and forces on the hull.

I'd like now to run it with second order schemes but I really don't know which one to choose because I tried some of them (linearUpwind, linearLimited, skewCorrected linear) on a previous simulation with an other hull and no one worked.

Do you have some advice? is there a advisable second order scheme for this type of simulation? Is there an other scheme (grad, interpolation) I must change?

thanks a lot for any advice !

Marine
marine is offline   Reply With Quote

Old   June 21, 2010, 21:31
Default
  #2
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Why didn't they work? Could you post your fvScheme?
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   June 22, 2010, 01:15
Default second order schemes
  #3
Senior Member
 
NAVEEN.K.M
Join Date: Mar 2009
Location: Bangalore, Karnataka, india
Posts: 114
Rep Power: 17
naveen is on a distinguished road
hi marine,

Try leastsquares or liner which are second order schemes.If you use leastsquares you wil get da best results.

Regards

Naveen
Bangalore
s.m and Gang Wang like this.
naveen is offline   Reply With Quote

Old   July 6, 2010, 09:52
Default
  #4
Member
 
Marine
Join Date: Mar 2010
Posts: 38
Rep Power: 16
marine is on a distinguished road
I tried linearUpwind then limitedLinear for the divergence terms, both time with limited 0.333 for laplacian and sngradschemes, and both worked. The problem was apparently the corrected shemes for laplacian and snGradschemes.
The linear scheme for divergence terms still doesn't work (pressure residuals decrease and continuity explode).
My question now is do you know which one between linearUpwind and limitedLinear is the best for 2nd order accuracy?

I attached the fvSchemes.

thank you very much.

Marine
Attached Files
File Type: zip fvSchemes.zip (574 Bytes, 765 views)
marine is offline   Reply With Quote

Old   July 6, 2010, 09:54
Default
  #5
Member
 
Ngoc-Minh Truong
Join Date: Feb 2010
Location: Toulouse, France
Posts: 42
Rep Power: 16
truong_nm is on a distinguished road
Send a message via MSN to truong_nm
Dear Marine,

Seems that Upwind implies 1st order. Default 2nd order scheme is Linear.
truong_nm is offline   Reply With Quote

Old   July 6, 2010, 10:01
Default
  #6
Member
 
Marine
Join Date: Mar 2010
Posts: 38
Rep Power: 16
marine is on a distinguished road
linearUpwind is a blend of first and second order, I would like to know if it can be more accuracy than limitedLinear because I don't find a lot of documentation about limitedLinear and I don't know how it works.
Linear schemes don't work with my simulation.
Thanks !

Marine
marine is offline   Reply With Quote

Old   July 6, 2010, 10:04
Default
  #7
Member
 
Ngoc-Minh Truong
Join Date: Feb 2010
Location: Toulouse, France
Posts: 42
Rep Power: 16
truong_nm is on a distinguished road
Send a message via MSN to truong_nm
Would you mind describing your case: Mach, boundary conditions.
Which solver do you use?
truong_nm is offline   Reply With Quote

Old   July 6, 2010, 10:13
Default
  #8
Member
 
Marine
Join Date: Mar 2010
Posts: 38
Rep Power: 16
marine is on a distinguished road
I'm running a simulation of incompressible flow around a ship with a k-omega SST turbulent model. The solver is simpleFoam.
I have an inlet, an outlet, four symmetry planes (it's a "double model" simulation, I don't know the english term) and a hull.
The solver for pressure is GAMG, for U and turbulence PBICG.

at the inlet : u,k,omega=fixedvalue p=zeroGradient
at the outlet : u=zeroGradient p=fixedvalue k and omega=inletOutlet

thank you

Marine
marine is offline   Reply With Quote

Old   July 6, 2010, 10:17
Default Try under-relaxation
  #9
Member
 
Ngoc-Minh Truong
Join Date: Feb 2010
Location: Toulouse, France
Posts: 42
Rep Power: 16
truong_nm is on a distinguished road
Send a message via MSN to truong_nm
One possibility is to come back to "Gauss linear" for every div(x,y) scheme and try under-relaxing the solution for a few steps before increasing the U/R factors.
truong_nm is offline   Reply With Quote

Old   July 6, 2010, 11:14
Default
  #10
Member
 
Francois Gallard
Join Date: Mar 2010
Location: Toulouse, France
Posts: 44
Rep Power: 16
fgal is on a distinguished road
Hi,

And the problem can come from the mesh too, because higher order schemes are less dissipative and can require higher quality meshes. Can you post a screen shot of a cut of your mesh please ?
Cheers,

Francois.
fgal is offline   Reply With Quote

Old   July 7, 2010, 03:50
Default
  #11
Member
 
Marine
Join Date: Mar 2010
Posts: 38
Rep Power: 16
marine is on a distinguished road
I already tried to under-relax the solution, it just postponed the divergence of the solution.
I attached three pictures of my mesh (it's a mesh with polyhedrons so the cut with paraview isn't nice ).

Regards,

Marine
Attached Images
File Type: jpg meshpoly1.jpg (99.5 KB, 1036 views)
File Type: jpg meshpoly2.jpg (95.0 KB, 1218 views)
File Type: jpg meshpoly3.jpg (85.7 KB, 904 views)

Last edited by marine; July 7, 2010 at 04:30.
marine is offline   Reply With Quote

Old   July 7, 2010, 04:42
Default
  #12
Member
 
Ngoc-Minh Truong
Join Date: Feb 2010
Location: Toulouse, France
Posts: 42
Rep Power: 16
truong_nm is on a distinguished road
Send a message via MSN to truong_nm
Hum... I think I misunderstood. Have you already succeed in having a converged solution? For me, you succeeded, with 1st order schemes. Am I right ?
truong_nm is offline   Reply With Quote

Old   July 7, 2010, 06:40
Default
  #13
Member
 
Marine
Join Date: Mar 2010
Posts: 38
Rep Power: 16
marine is on a distinguished road
Yes it worked with first order schemes and with limitedLinear 1 schemes but when I switch to linear schemes it doesn't work anymore.
marine is offline   Reply With Quote

Old   July 7, 2010, 07:03
Default
  #14
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Check your local (cell) Peclet number. The linear scheme requires it to be less than 2 (see Ferziger and Peric for a reference).

In your application you might want to use limitedLinear or linearUpwind anyway, which ensure the boundness of the solution.

Best,
s.m, mgg, elham-u and 1 others like this.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   July 8, 2010, 07:09
Default
  #15
Member
 
Marine
Join Date: Mar 2010
Posts: 38
Rep Power: 16
marine is on a distinguished road
OK that explain why the linear scheme doesn't work, my Peclet number is too big.

I don't obtain the same results for the viscous forces on my hull with the linearUpwind scheme or the limitedLinear scheme (15% difference) . As they say in the book (Peric) that linearUpwind is unbounded I think is more accurate than limitedLinear ( I still don't know how this one works) and is comparable to the second order upwinded scheme we can find in Starccm+ or Fluent. Do you think I'm wrong?

regards,

Marine
marine is offline   Reply With Quote

Old   July 8, 2010, 08:07
Default
  #16
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by marine View Post
I don't obtain the same results for the viscous forces on my hull with the linearUpwind scheme or the limitedLinear scheme (15% difference) . As they say in the book (Peric) that linearUpwind is unbounded I think is more accurate than limitedLinear ( I still don't know how this one works) and is comparable to the second order upwinded scheme we can find in Starccm+ or Fluent. Do you think I'm wrong?
Hi,

both limitedLinear and linearUpwind are bounded. What is different is how the boundness of the scheme is obtained (see table 4.10 of User's guide).
  • limitedLinear is the linear scheme stabilized with the introduction of a limiter (Sweby limiter)
  • linearUpwind in an upwinded scheme
About their accuracy, limitedLinear is in my experience slightly less diffusive, but I had good results with both the schemes.

I believe the second order upwind scheme in commercial codes is close to linearUpwind than to limitedLinear, probably with limiters turned on. Something along the lines of

div(phi, U) Gauss linearUpwindV cellMDLimited Gauss linear 1;

(notice linearUpwindV becomes linearUpwind for scalars) which limits also the gradients.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   July 8, 2010, 09:30
Default
  #17
Member
 
Marine
Join Date: Mar 2010
Posts: 38
Rep Power: 16
marine is on a distinguished road
Thanks Alberto you helped me a lot !
marine is offline   Reply With Quote

Old   October 19, 2010, 11:27
Default
  #18
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 20
vkrastev is on a distinguished road
Quote:
Originally Posted by alberto View Post
Hi,

both limitedLinear and linearUpwind are bounded. What is different is how the boundness of the scheme is obtained (see table 4.10 of User's guide).
  • limitedLinear is the linear scheme stabilized with the introduction of a limiter (Sweby limiter)
  • linearUpwind in an upwinded scheme
About their accuracy, limitedLinear is in my experience slightly less diffusive, but I had good results with both the schemes.

I believe the second order upwind scheme in commercial codes is close to linearUpwind than to limitedLinear, probably with limiters turned on. Something along the lines of

div(phi, U) Gauss linearUpwindV cellMDLimited Gauss linear 1;

(notice linearUpwindV becomes linearUpwind for scalars) which limits also the gradients.

Best,
Hi Alberto,

I really need some advices about the convection schemes choice for an external aerodynamics case (hybrid prisms-tetrahedrons unstructured mesh)... For all the details about the case and my previous numerical trials you can have a look at this post: http://www.cfd-online.com/Forums/ope...red-grids.html
Apart from this, I would also like to know something more about the linearUpwind scheme: I've understood that this is a bounded "more than first order" upwinded scheme, but indeed in Ferziger and Peric's book it's mentioned like an unbounded scheme, so maybe you can adress me to some references about the limited implementation of such a scheme...

Thank you in advance

V.
vkrastev is offline   Reply With Quote

Old   October 19, 2010, 12:08
Default
  #19
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
I have a few comments on what you posted.

- First your case barely converges also with upwind (residuals of the pressure are the highest (yellow line)). Reduce the tolerances on the linear solvers to something closer to your machine precision (10^-12 for p, 10^-10 for the rest: yes it will take more iterations, it does not matter).

- Relax the turbulent quantities more than the velocity. Typically an URF = 0.4 works well.

- As schemes, linearUpwindV for div(phi, U) and linearUpwind for the rest, with cellLimited modifier for gradients should work just fine.

- Your mesh does not suffer of strong non-orthogonality, so I would not push the correctors too much (surely not to 8!).

- Stay away from SFCD, QUICK, UMIST. They won't give you any significant advantage. All the love for QUICK comes from the fact that it is formally third-order accurate, but its dissipation error is still high, and its stability is not good.

I hope this helps.

Best,
kiddmax, sharonyue, mgg and 3 others like this.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   October 19, 2010, 12:57
Default
  #20
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 20
vkrastev is on a distinguished road
Quote:
Originally Posted by alberto View Post
I have a few comments on what you posted.

- First your case barely converges also with upwind (residuals of the pressure are the highest (yellow line)). Reduce the tolerances on the linear solvers to something closer to your machine precision (10^-12 for p, 10^-10 for the rest: yes it will take more iterations, it does not matter).

- Relax the turbulent quantities more than the velocity. Typically an URF = 0.4 works well.

- As schemes, linearUpwindV for div(phi, U) and linearUpwind for the rest, with cellLimited modifier for gradients should work just fine.

- Your mesh does not suffer of strong non-orthogonality, so I would not push the correctors too much (surely not to 8!).

- Stay away from SFCD, QUICK, UMIST. They won't give you any significant advantage. All the love for QUICK comes from the fact that it is formally third-order accurate, but its dissipation error is still high, and its stability is not good.

I hope this helps.

Best,
First of all, thanks a lot for your suggestions. About the nonOrth correctors, the 8-option was only a trial to see if there is some significant dependence of such parameter in my case, but actually the residuals' graphs that you have seen are all referred to simulations with nonOrth correctors set to 3. About your other indications, If I understand properly from your previous posts the right setting in the fvSchemes dictionary should be:

div(phi, U) Gauss linearUpwindV cellMDLimited Gauss linear 1;
div(phi, k) Gauss linearUpwindV cellMDLimited Gauss linear 1;
div(phi, epsilon) Gauss linearUpwindV cellMDLimited Gauss linear 1;

am I right?
Apart from this, I'll try to follow your advices and then I'll let you know what happens.
Thank you once again

Regards

V.

PS-I'm sorry if I'm repetitive, but I'll be very glad if you can direct me to some more informations about the theoretical basis of the linearUpwind scheme in its bounded formulation
vkrastev 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
4th order schemes in channelOodles maka OpenFOAM Bugs 9 January 19, 2009 12:58
Help for fourth order accurate convective schemes Z.C.Wang Main CFD Forum 0 January 15, 2009 07:53
2nd order conservative schemes taw Main CFD Forum 1 September 16, 2008 08:05
CFL condition for higher order schemes Shyam Main CFD Forum 2 February 14, 2008 15:24
High order compact finite difference schemes Mikhail Main CFD Forum 6 August 5, 2003 11:36


All times are GMT -4. The time now is 12:43.