CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   4th order central scheme (http://www.cfd-online.com/Forums/openfoam-solving/78715-4th-order-central-scheme.html)

mmahdinia July 30, 2010 11:39

4th order central scheme
 
Hi,

I was wondering if there are any fourth order centeral differencng schemes in OpenFOAM.

Sincerely,
Maani

ata July 31, 2010 08:24

4th order central scheme
 
Hi Mani
How are you?
I think there is not.
Good luck
Best regards

Ata

mmahdinia July 31, 2010 08:41

Hi dear Ata,

Thanks for the reply. I appreciate your time.

If there are not, then what about the "Cubic" Scheme? In page U-112 it says "Fourth order, unbounded".

Also I wanted to know if linear is second order or 1st order. Again at U-112.

I am running LES simulations and I need higher order central-differencing schemes (upwind/TVD/NVD are too dissipative) for div, grad and laplacian terms.

Bests
Maani

mmahdinia August 1, 2010 02:41

I have a serious problem!

Does anybody know what are the best high-order discretization schemes for LES?

I know that QUICK is too dissipative!

Sincerely,
Mani Mahdinia

ata August 1, 2010 03:37

4th order central scheme
 
Hi Mani
Are you sure in U-112?
There is fourth order scheme for surface normal gradient, are you mean it?
Best regards

Ata

mmahdinia August 1, 2010 04:27

U-pages
 
Hi,

Yes. But I meant: OF 1.5 User guide p 112
which is equal to: OF 1.6 User guide p 116
which is equal to: OF 1.7 User guide p 116.

Here it says: linear = second order, unbounded
cubicCorrected=fourth order unbounded

Sincerely,
Maani

ata August 1, 2010 09:11

I have 1.6
 
Hi
Excuse me I have 1.6
Best regards

Ata

mmahdinia August 1, 2010 09:53

My mistake
 
Hi ata,

I know it was my mistake. Sorry. Do you think they are 2nd and 4th order for all the terms like grad/div/lap?

Sincerely,
Maani

ata August 1, 2010 10:10

4th order central scheme
 
Hi Mani
Your welcome, no problem.
It seems replying via forum is not fast and very easy for me. Are you at Sharif University of Technology in Department of Mechanical Engineering?
If it is true or you are at Tehran we can have easier conversation. You can send an Email to me and I'll send you my phone number.
However I think that it is fourth order only for normal gradient at faces.
Best regards
Good luck

Ata

alberto August 1, 2010 14:50

Hello,

cubic and cubicCorrected are fourth order central schemes. For gradients, there is the "fourth" scheme.

Best,

mmahdinia August 1, 2010 15:12

Thanks alberto,

I have a question. Is it odd that I get better results with the QUICK scheme (which as you know, is too dissipative) than the cubic Scheme in LES?

I have to mention that my grid is relatively, coarse.

Sincerely,
Maani

alberto August 1, 2010 15:43

Quote:

Originally Posted by mmahdinia (Post 269712)
Thanks alberto,

I have a question. Is it odd that I get better results with the QUICK scheme (which as you know, is too dissipative) than the cubic Scheme in LES?

I have to mention that my grid is relatively, coarse.

Two questions:

- What do you mean with "better results"? Your results compare better with experiments, or there are unphysical results with cubic?

- Is your grid satisfying the stability criterion for central schemes?

A suggestion:

A finite volume scheme is second order whatever you do, so I would suggest you to use "linear" for convection, and leastSquares for gradients. They usually work fine.

Best,

mmahdinia August 1, 2010 16:02

The problem
 
Dear Alberto,

Regarding your first inquiry
:


I am simulating a release of a higher density fluid (salt-water mixture) underneath a lower density ambient fluid (water). I am also solving the concentration equation along with NS. I use the dynamic Smagorinsky method is used for the simulation. The runs are in 3D. Here are two animations:

http://mech.sharif.edu/~mahdinia/A1.htm
http://mech.sharif.edu/~mahdinia/A2.htm

I tried these:

1) Linear schemes for div/grad/lap/interpolation: The 3D instabilities at the interface of the two fluids are not created as they are supposed to.

2) Cubic schemes for div/grad/lap/interpolation: The 3D instabilities at the interface of the two fluids are created along with unphysical waves.

3) QUICK schemes for div/lap and Cubic for grad/interpolation: The 3D instabilities are created as they should be created physically, in the horizontal and span-wise directions.

I can put some 3D pictures if required. I am not sure why the QUICK scheme gives the best results.

Regarding your second inquiry:

I don't know about the stability criterion for central schemes. But the the location of interest is in the middle of the domain and the grid there is nearly fine enough.

Is the QUICK scheme always not appropriate for LES or it may be used for some of the flows in nature?

Sincerely,
Maani

alberto August 1, 2010 16:53

Quote:

Originally Posted by mmahdinia (Post 269715)
I don't know about the stability criterion for central schemes. But the the location of interest is in the middle of the domain and the grid there is nearly fine enough.

The stability criterion for the linear scheme is that the cell Peclet (Reynolds, defined as DeltaX*|U|/nu; in 3D deltaX = cubeRoot(cellVolume) gives an indication) number is less than 2.

I would suggest an experiment to understand what is going on there, since you tried different combination of schemes.
  1. Check if the grid satisfies the stability criterion.
  2. Use leastSquares for gradients, and linear for all the rest, with a grid where the stability criterion is satisfied.
  3. Use backward time scheme.
With this setup we obtained good results with LES in confined flows.

About QUICK, it has been quite widely used in the literature for LES (they essentially use a bounded version called B-QUICK). I would try to avoid upwinded schemes in LES, especially if you are interested in capturing details.

Best,

mmahdinia August 1, 2010 17:38

Thanks
 
Thanks,

I'll do the above and see if the things get right.

Sincerely,
Maani

lakeat August 1, 2010 23:48

@Maani: I am afraid that in many occasions, the comparison conclusion based on coarse grid simulations would be quite misleading.

I find a hard time to see how higher order (I mean higher than second) works for finite volume method. Since FV need estimation of a variety of items, so I think it would be pretty hard to get a order higher than 2nd.

I am thinking is it possible to build finite difference scheme in openfoam framework, any ideas?

alberto August 1, 2010 23:56

Quote:

Originally Posted by lakeat (Post 269728)
I find a hard time to see how higher order (I mean higher than second) works for finite volume method. Since FV need estimation of a variety of items, so I think it would be pretty hard to get a order higher than 2nd.

You are correct. The formal accuracy is always second order, at best. However it is known that increasing the accuracy on some term can limit some side effect.

Quote:

I am thinking is it possible to build finite difference scheme in openfoam framework, any ideas?
Why finite differences? Or better, why not discontinuous Galerkin methods or internal penalty methods, which are actually innovative and allow accuracy to be increased without losing the good properties gained with finite volumes? (I'm not saying it would be easy to do in OF :D)

Best,

lakeat August 2, 2010 00:07

Hey, what! I feel I left behind in life. Any Good papers on that? Could you share some links? And why you think it's not easy to implement them?

You know it would be great that openfoam could continue serving as not just for FV but for a many CFD C++ class Basis.

For example:
For finite volume, we build dir ./src/finiteVolume
For finite area, we build dir ./src/finiteArea (as in extend fork)
For discontinuous Galerkin methods, we build dir ./src/discontinuousGalerin
....
:)

lakeat August 2, 2010 00:11

*****************

lakeat August 2, 2010 00:23

Quote:

Originally Posted by alberto (Post 269717)
The stability criterion for the linear scheme is that the cell Peclet (Reynolds, defined as DeltaX*|U|/nu; in 3D deltaX = cubeRoot(cellVolume) gives an indication) number is less than 2.

I would suggest an experiment to understand what is going on there, since you tried different combination of schemes.
  1. Check if the grid satisfies the stability criterion.
  2. Use leastSquares for gradients, and linear for all the rest, with a grid where the stability criterion is satisfied.
  3. Use backward time scheme.
With this setup we obtained good results with LES in confined flows.

About QUICK, it has been quite widely used in the literature for LES (they essentially use a bounded version called B-QUICK). I would try to avoid upwinded schemes in LES, especially if you are interested in capturing details.

Best,



Concerning the Schemes, I am also very interested. I guess the openfoam team must have done a lot of works on testing the different schemes.

So,
1. You mean
Code:

gradSchemes
{
    default        leastSquares;
    grad(p)        leastSquares;
    grad(U)        leastSquares;
}

but what about "extendedLeastSquaresGrad" (see in the dir), would it better than LeastSquares?

2. Will "boundedBackward" be better than backward ddt?


I know there is not formal documentation on these schemes items for openfoam, but do you any information on where we can find papers showing the foam-techniques progress in detail other than (http://powerlab.fsb.hr/ped/kturbo/OpenFOAM/)?




Thanks and good night!


All times are GMT -4. The time now is 00:44.