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

accuracy of skew meshes?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   August 19, 2011, 03:48
Default accuracy of skew meshes?
  #1
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 6
fisch is on a distinguished road
Hello,

is it possible to get a 2nd order accuracy for a skew mesh in OpenFoam?
My mesh looks like a parallelogram and the single cells look like parallelograms, too. All my results show (only) first order for p and U.
Can anybody help me?

Thanks a lot,
rupert

Here is my fvSchemes:

gradSchemes
{
default none;
grad(p) Gauss linear;
grad(U) Gauss linear;
snGradCorr(U) Gauss linear corrected;
snGradCorr(p) Gauss linear corrected;
}

divSchemes
{
div(phi,U) Gauss vanLeerV;
div((nuEff*dev(grad(U).T()))) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
}

interpolationSchemes
{
default none;
interpolate(U) linear;
}

snGradSchemes
{
default none;
}

fluxRequired
{
default yes;
p ;
}


// ************************************************** *********************** //
fisch is offline   Reply With Quote

Old   August 21, 2011, 04:59
Default
  #2
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,888
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Please post a case and the convergence study.
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   August 22, 2011, 03:34
Default
  #3
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 6
fisch is on a distinguished road
This is not so easy because the case works only with my solver and uses groovyBC.
I made graphs from my convergence studies. It's the discretization error development (in 2- and max-Norm for all variables) over mesh refinement (called factors).
http://www.st.bv.tum.de/index.html?3...stpdfplot2.pdf
The second picture shows the convergence rate which is round about 1.
http://www.st.bv.tum.de/index.html?3...stpdfplot4.pdf
If the mesh is not skew, it is round about 2...
Do i something wrong?


Is it in general possible to establish 2nd order of accuracy in Openfoam on non-orthogonal meshes?
Jasak is writing in his thesis that it should be possible with the non-orthogonal correction...
Is this the right setup in my fvSchemes or do i need something more in it?



Thanks a lot.


fisch is offline   Reply With Quote

Old   August 22, 2011, 11:09
Default
  #4
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,888
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
As a first comment: you use vanLeer scheme (a bounded scheme). How often does the limiter kick in? You could easily estimate this by computing the local Peclet number (Pe = Dx*U/nu in the cell), and see where this is larger than 2.
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   August 22, 2011, 11:52
Default
  #5
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 6
fisch is on a distinguished road
thanks for the reply alberto,

the peclet number is in all directions smaller then 1.
fisch is offline   Reply With Quote

Old   August 22, 2011, 12:04
Default
  #6
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,888
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Other question: what is the skeweness of the mesh (checkMesh will tell you).

One suggestion is to perform the study on a simple case, like a cavity flow, and control the mesh there.
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   August 22, 2011, 12:09
Default
  #7
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 6
fisch is on a distinguished road
Checking geometry...
Overall domain bounding box (0 0 0) (1.5 1 0.01)
Mesh (non-empty, non-wedge) directions (1 1 0)
Mesh (non-empty) directions (1 1 0)
All edges aligned with or perpendicular to non-empty directions.
Boundary openness (5.2090377e-18 -4.2269516e-18 1.4260487e-15) OK.
Max cell openness = 1.2490009e-16 OK.
Max aspect ratio = 1.6250001 OK.
Minumum face area = 5.425347e-05. Maximum face area = 7.8125004e-05. Face area magnitudes OK.
Min volume = 5.425347e-07. Max volume = 5.4253475e-07. Total volume = 0.01. Cell volumes OK.
Mesh non-orthogonality Max: 26.565056 average: 26.565051
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 0.45000007 OK.


this is out of checkMesh

But did you have a look on my fvSchemes? Is there some mistake that it couldn't work 2nd order?

Last edited by fisch; August 24, 2011 at 06:45.
fisch is offline   Reply With Quote

Old   August 22, 2011, 12:13
Default
  #8
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,888
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
The only reason could be the limiter in vanLeer scheme. You can simply use "linear" to check. The rest should be fine.
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   August 22, 2011, 12:23
Default
  #9
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 6
fisch is on a distinguished road
I will check using a NVD and this linear scheme instead and i will tell you tomorrow the results.
The thing is that everything works fine (with vanLeerV) as long as the mesh is 100% orthogonal. Could there be another reason beside the convection scheme limiter?

Do you prefer another scheme instead of vanLeer for incompressible flows?
fisch is offline   Reply With Quote

Old   August 22, 2011, 12:26
Default
  #10
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,888
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
I generally use limitedLinearV, and, if this is not stable enough, linearUpwindV (a 2nd order upwind).
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   August 23, 2011, 03:30
Default
  #11
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 6
fisch is on a distinguished road
Hello,

i used SFCDV, linear and limitedLinearV.
What is the total keyword in fvSchemes that linearUpwindV is working (in my case it will not work )?

But all of them show the same result. When i use the orthogonal mesh, 2nd order is established; but the accuracy drops down to an area between 1 and 1.5 when the mesh is not totally orthogonal...
The checkMesh information of this is given in #7.

Some other suggestions?
thanks

Last edited by fisch; August 23, 2011 at 05:39.
fisch is offline   Reply With Quote

Old   August 23, 2011, 10:35
Default
  #12
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,888
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
I forgot to tell you: use leastSquares for gradients. Gauss linear is not second order on arbitrary meshes.
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   August 24, 2011, 11:33
Default
  #13
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 6
fisch is on a distinguished road
Hi again,

i tested several different ways to use this leastSquares for the gradient schemes.
The problem is now converging with a rate lower then 1. SO it was "better" with Gauss linear instead, but even not 2nd order...

Did i some mistake? Could you check it please?

My simpleTolerance is 1e-12 and my relTol is 0.01

Here is again my fvSchemes:
gradSchemes
{
default none;
grad(p) leastSquares;
grad(U) leastSquares;
snGradCorr(U) Gauss linear corrected;
snGradCorr(p) Gauss linear corrected;
}

divSchemes
{
div(phi,U) Gauss GammaV 0.2;
div((nuEff*dev(grad(U).T()))) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear limited 1.0;
laplacian((1|A(U)),p) Gauss linear limited 1.0;
}

interpolationSchemes
{
default none;
interpolate(U) linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default yes;
p ;
}
fisch is offline   Reply With Quote

Old   August 24, 2011, 12:53
Default
  #14
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,888
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
You should post your case.
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   August 25, 2011, 03:26
Default
  #15
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 6
fisch is on a distinguished road
the solver and the case is attached.
Just start the case with ./doAllSkript

If you have questions, just ask.
thanks a lot for your help.

rupert

Last edited by fisch; August 29, 2011 at 12:27.
fisch is offline   Reply With Quote

Old   August 25, 2011, 12:10
Default
  #16
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,888
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Hi,

this should give you second order:

Code:
ddtSchemes
{
    default         steadyState;
}

gradSchemes
{
    default         leastSquares;
}

divSchemes
{
  div(phi,U)              Gauss linear;
  div((nuEff*dev(grad(U).T()))) Gauss linear;
}

laplacianSchemes
{
    default         none;
    laplacian(nuEff,U) Gauss linear corrected;
    laplacian((1|A(U)),p) Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         yes;
    p               ;
}
At a first glance, it looks like you are fixing p and U at all your boundaries, in an incompressible solver. Usually where you fix U you specify a zeroGradient for p. I do not know what you are trying to simulate, but I would double-check.
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   August 25, 2011, 16:48
Default
  #17
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 6
fisch is on a distinguished road
I just specify either U or p as dirichlet.
The other one is always specified as fixedGradient (Neumann) BC.
This should be OK, if i use the groovyBC the right way.

i will test your suggestion for fvSchemes tomorrow.

thanks so far..
fisch is offline   Reply With Quote

Old   August 26, 2011, 11:17
Default
  #18
Member
 
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 6
fisch is on a distinguished road
Hi again,

i did it again and it is again 1st order

Currently i'm not sure if it's really because of the skew mesh.
I objected at straight meshes the biggest errors always at the boundary area, too. Maybe the error is already there at straight meshes but they are not influencing the order of accuracy that much...

So i invest time now to check if all my boundaries etc. are implemented correctly. Maybe i can reduce the errors at the boundaries...

Or does anybody have other suggestions?

thanks
fisch is offline   Reply With Quote

Old   August 27, 2011, 22:58
Default
  #19
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,888
Rep Power: 25
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by fisch View Post
Hi again,

i did it again and it is again 1st order

Currently i'm not sure if it's really because of the skew mesh.
Simply perform the study with simple BC's in a simple test case (a cavity flow or a channel flow, for example), and just change the mesh. If the order is 2, you have your answer ;-)

Best,
__________________
Alberto

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
GeekoCFD 32bit - The 32bit edition of GeekoCFD.
GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats.
alberto is offline   Reply With Quote

Old   September 6, 2011, 14:01
Default
  #20
Senior Member
 
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 168
Rep Power: 7
linch is on a distinguished road
Hi,

I hope I'm not annoying or interrupting you. If it is so, please tell and I'll move to a new thread

I face a problem, that somehow can relate to the topic being discussed here. What I'm trying to do, set up a 3D pointsymmetric (or 1D in spherical coordinates) simulation to test my VOF-based evaporation model. So I made a spherical-segment-like mesh, consisting of prism elements, shown in the picture below. The issue is, I'm obtaining non-zero gradients of uniform fields with Gauss linear gradient scheme. Using of "fourths" or "Gaus cubic" schemes doesn't have such effect.

I can imagine the gradient can be inaccurate, but I can't imagine how can it be non-zero using Gauss-linear-scheme, which just is supposed to take difference of some values in neighboring cells and divide it through the distance. If values are same (uniform field), the difference and thus the gradient is supposed to be zero, independent of the mesh, isn't is?

Here are some pictures of mesh, alpha-filed and it's gradient. In the first case there is a jump in the alpha-field but it's uniform elsewhere away form the jump. In the second case I took completely uniform field, but there is still non-zero gradient. I also have zero-gradient-BCs on the left and right side, wedge BCs on the top and bottom, front and back.

Best regards,
illya
Attached Images
File Type: jpg mesh.jpg (27.1 KB, 28 views)
File Type: jpg alpha_jump.jpg (10.9 KB, 32 views)
File Type: jpg gradAlpha_jump.jpg (12.9 KB, 28 views)
File Type: jpg gradAlpha_jump_scaled.jpg (11.0 KB, 25 views)
File Type: jpg magGradAlpha_jump_scaled.jpg (11.3 KB, 23 views)

Last edited by linch; September 7, 2011 at 10:50.
linch is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grid refinement study for Order of accuracy and GCI Chander CFX 5 May 3, 2011 20:13
Taylor Vortex and Accuracy ganesh Main CFD Forum 0 April 7, 2010 23:59
Temporal accuracy ganesh Main CFD Forum 0 February 29, 2008 06:32
accuracy of Discontinuous Galerkin Qu Kun Main CFD Forum 0 September 6, 2004 10:19
Large 3D tetrahedral meshes Aldo Bonfiglioli Main CFD Forum 4 August 27, 1999 04:33


All times are GMT -4. The time now is 17:07.