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

comparison of discretization scheme

Register Blogs Community New Posts Updated Threads Search

Like Tree12Likes
  • 1 Post By alimea
  • 2 Post By Taataa
  • 1 Post By alimea
  • 1 Post By Taataa
  • 1 Post By Taataa
  • 1 Post By Taataa
  • 1 Post By Taataa
  • 1 Post By alimea
  • 1 Post By Taataa
  • 2 Post By Taataa

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 13, 2018, 04:45
Default comparison of discretization scheme
  #1
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Hi all

I am simulating "flow around a cylinder in Re=1-1000"

for divergence of velocity, which scheme is better?
I have used central, 1st order upwind and 2nd order upwind for that and I have gotten more accuracy (according to other numerical papers not experimental) for central!
for example for Re=100:

numerical paper: CL=0.15 and -0.15
central: CL=0.1461 and -0.1461
linearUpwind: CL=0.123 and -0.1293

thanks
msquare142857 likes this.
alimea is offline   Reply With Quote

Old   January 13, 2018, 12:26
Default
  #2
Senior Member
 
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 13
Taataa is on a distinguished road
There is no schemes that works for all the cases, depends on the problem, solver, other schemes that you've setup but what's important to note is that it should have the highest possible accuracy. You can get away with, for example, a first order scheme for turbulence variables but the velocity should be a formal second order. That said, I usually start with linearUpwind grad(U) and try to set other schemes in a way to get good results. If it doesn't work, vanLeer is the last resort. In cases with high Mach numbers limitedLinear is another option.
Linmunn and msquare142857 like this.
Taataa is offline   Reply With Quote

Old   January 13, 2018, 12:29
Default
  #3
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by Taataa View Post
There is no schemes that works for all the cases, depends on the problem, solver, other schemes that you've setup but what's important to note is that it should have the highest possible accuracy. You can get away with, for example, a first order scheme for turbulence variables but the velocity should be a formal second order. That said, I usually start with linearUpwind grad(U) and try to set other schemes in a way to get good results. If it doesn't work, vanLeer is the last resort. In cases with high Mach numbers limitedLinear is another option.
please give me your idea about central scheme for div terms.

Is there hybrid scheme in openFoam?

thanks
msquare142857 likes this.
alimea is offline   Reply With Quote

Old   January 13, 2018, 13:43
Default
  #4
Senior Member
 
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 13
Taataa is on a distinguished road
If you mean central solver then you should use reconstruct(U) as well to mitigate checkerboard issue. If you mean central schemes, off the top of my head, linear and midPoint.

There are blended schemes in OF such as LUST.
You can find some useful information here and here.
msquare142857 likes this.
Taataa is offline   Reply With Quote

Old   January 13, 2018, 13:52
Default
  #5
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by Taataa View Post
If you mean central solver then you should use reconstruct(U) as well to mitigate checkerboard issue. If you mean central schemes, off the top of my head, linear and midPoint.

There are blended schemes in OF such as LUST.
You can find some useful information here and here.
thank you

I've read both of those links, but I haven't gotten confidence to select "linear" or limitedLinear or linearUpwind for div(phi,U) in my case.
for all of above schemes, I have earned convergence, but accuracy is my problem.
What would you do if you were me?
Also, again: Are you sure that LUST is a hybrid?
Hybrid scheme has a good feature that it can switch between linear and upwind according to Peclet number. I think this is the best scheme for my problem. but I didn't find it in openFoam!
alimea is offline   Reply With Quote

Old   January 13, 2018, 14:21
Default
  #6
Senior Member
 
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 13
Taataa is on a distinguished road
If you use limited schemes such as limitedLinear you may loose accuracy, you should use them for variable that should be bounded such as K (always positive), T(always positive) and alpha(between 0 and 1). So linearUpwind which is second order and unbounded is one of the the best option for accuracy if there isn't crazy gradient in the nature of your problem.
LUST is a blended scheme, 75% linear and 25% linearUpwind scheme.
I always start with linearUpwind for U and change it if it doesn't converge.
In this simple case, however, a good starting setup for the flow around cylinder in low Reynolds number would be linear (more accurate than linearUpwind but unbounded) for U with PBiCGStab as the solver.
msquare142857 likes this.
Taataa is offline   Reply With Quote

Old   January 13, 2018, 16:11
Default
  #7
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by Taataa View Post
If you use limited schemes such as limitedLinear you may loose accuracy, you should use them for variable that should be bounded such as K (always positive), T(always positive) and alpha(between 0 and 1). So linearUpwind which is second order and unbounded is one of the the best option for accuracy if there isn't crazy gradient in the nature of your problem.
LUST is a blended scheme, 75% linear and 25% linearUpwind scheme.
I always start with linearUpwind for U and change it if it doesn't converge.
In this simple case, however, a good starting setup for the flow around cylinder in low Reynolds number would be linear (more accurate than linearUpwind but unbounded) for U with PBiCGStab as the solver.
Thanks dear Taher for your complete answer
I tested both linear and linearUpwind. Linear gave me more accurae in lift coeff (2% for lift coeff and 1% for drag coeff) and linearUpwind gave more accurate in drag coeff (14% for lift coeff and 0.1% for drag).
I dont know why?
Maby because Peclet in my problem is lower than 2.

But why gave me 14% error in lift coeff by linearUpwind???
As you mentioned, linearUpwind is 2nd order. But I think this is dissipative and dissipates lift coeff.
Your idea?
alimea is offline   Reply With Quote

Old   January 13, 2018, 16:49
Default
  #8
Senior Member
 
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 13
Taataa is on a distinguished road
May I see your case? If you can upload your whole case so I can see the boundaries, schemes, solutions and solver, I could provide more useful comments.

Maybe you've already read this link, but it has some nice explanations.
msquare142857 likes this.
Taataa is offline   Reply With Quote

Old   January 15, 2018, 05:03
Default
  #9
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by Taataa View Post
May I see your case? If you can upload your whole case so I can see the boundaries, schemes, solutions and solver, I could provide more useful comments.

Maybe you've already read this link, but it has some nice explanations.
yes, that is uploaded in this link:

http://s8.picofile.com/file/8316766050/11_tar.gz.html
alimea is offline   Reply With Quote

Old   January 15, 2018, 19:46
Default
  #10
Senior Member
 
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 13
Taataa is on a distinguished road
I haven't worked with OF 2 so I can't get very specific. Couple of comments though. Since you;re using pimpleFoam you should set the relaxation factor to 1, like this:

Code:
relaxationFactors
{
    equations
    {
        ".*"            1;
    }
}
Also, I would suggest these modifications in fvSchemes if you want to use non-orthogonal correction:
Code:
laplacianSchemes
{
    default        Gauss linear limited 0.5;
}

snGradSchemes
{
    default        limited 0.5;
}
Then you need to add at least one non-orthogonal correction in fvSolution:
Code:
PIMPLE
{
    nOuterCorrectors     1;
    nCorrectors           3;
    nNonOrthogonalCorrectors 1;
    momentumPredictor no;
}
msquare142857 likes this.
Taataa is offline   Reply With Quote

Old   January 16, 2018, 01:39
Default
  #11
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by Taataa View Post
I haven't worked with OF 2 so I can't get very specific. Couple of comments though. Since you;re using pimpleFoam you should set the relaxation factor to 1, like this:

Code:
relaxationFactors
{
    equations
    {
        ".*"            1;
    }
}
Also, I would suggest these modifications in fvSchemes if you want to use non-orthogonal correction:
Code:
laplacianSchemes
{
    default        Gauss linear limited 0.5;
}

snGradSchemes
{
    default        limited 0.5;
}
Then you need to add at least one non-orthogonal correction in fvSolution:
Code:
PIMPLE
{
    nOuterCorrectors     1;
    nCorrectors           3;
    nNonOrthogonalCorrectors 1;
    momentumPredictor no;
}

Thanks for your comments. I used PISO not pimple.
why should I use non-orthogonal correction for laplacian term?
msquare142857 likes this.
alimea is offline   Reply With Quote

Old   January 16, 2018, 02:57
Default
  #12
Senior Member
 
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 13
Taataa is on a distinguished road
When nOuterCorrectors is set to 1, it's PISO.

Non-orthogonal correction depends on mesh not equation. If max non-orthogonality of the mesh is more than 5 degree, it's recommended to use a limiter, the higher the coefficient of the limiter the more accurate the solution. If you can get away with limited 1 use it. You've set to limited 0.33 previously and I've changed it to 0.5!

I couldn't check the mesh. So run checkMesh and if max non-orthogonality is more than 5 and less than 40 use limited 1. If it's more than 40 you can lower the the coefficient add/or increase nNonOrthogonalCorrectors.
msquare142857 likes this.
Taataa is offline   Reply With Quote

Old   January 16, 2018, 03:03
Default
  #13
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by Taataa View Post
When nOuterCorrectors is set to 1, it's PISO.

Non-orthogonal correction depends on mesh not equation. If max non-orthogonality of the mesh is more than 5 degree, it's recommended to use a limiter, the higher the coefficient of the limiter the more accurate the solution. If you can get away with limited 1 use it. You've set to limited 0.33 previously and I've changed it to 0.5!

I couldn't check the mesh. So run checkMesh and if max non-orthogonality is more than 5 and less than 40 use limited 1. If it's more than 40 you can lower the the coefficient add/or increase nNonOrthogonalCorrectors.
Sorry, I think I sent you some thing wrong! Before run, I had checked my non-orthogonality that is 15 (max!). So I decided not to use limiter. As you know limiters have a strong dissipation. So I used "Gauss linear corrected" for laplacian term.
As my last question: what do you mean by "When nOuterCorrectors is set to 1, it's PISO." I didn't get it.

Thanks, again
alimea is offline   Reply With Quote

Old   January 16, 2018, 03:19
Default
  #14
Senior Member
 
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 13
Taataa is on a distinguished road
corrected is the same as limited 1.

PIMPLE is PISO + SIMPLE. Meaning that it's a combination of PISO segregation and SIMPLE under-relaxation. The main idea behind PIMPLE is to allow large time steps for example when you have a very long simulation.

So when you do only one iteration over the outer loop it's basically PISO without any under-relaxation but if you do more than that you're adding under-relaxation property of SIMPLE.

The values that I've suggested are the recommended values for transient solvers such as pimpleFoam.
alimea and msquare142857 like this.
Taataa is offline   Reply With Quote

Old   January 16, 2018, 03:22
Default
  #15
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by Taataa View Post
corrected is the same as limited 1.

PIMPLE is PISO + SIMPLE. Meaning that it's a combination of PISO segregation and SIMPLE under-relaxation. The main idea behind PIMPLE is to allow large time steps for example when you have a very long simulation.

So when you do only one iteration over the outer loop it's basically PISO without any under-relaxation but if you do more than that you're adding under-relaxation property of SIMPLE.

The values that I've suggested are the recommended values for transient solvers such as pimpleFoam.
Thank you so much for your complete answer
alimea is offline   Reply With Quote

Reply

Tags
openfoam, schemes


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
comparison of discretization scheme alimea Main CFD Forum 12 January 16, 2018 15:17
comparison of discretization scheme alimea Main CFD Forum 23 December 21, 2017 17:27
comparison of discretization scheme alimea OpenFOAM Running, Solving & CFD 0 December 14, 2017 10:42
Temporal discretization Scheme CoEuler vsammartano OpenFOAM Running, Solving & CFD 0 April 12, 2016 08:06
Time discretization scheme HaKu Main CFD Forum 1 June 12, 2011 03:06


All times are GMT -4. The time now is 15:19.