
[Sponsors] 
August 19, 2011, 02:48 
accuracy of skew meshes?

#1 
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 7 
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((1A(U)),p) Gauss linear corrected; } interpolationSchemes { default none; interpolate(U) linear; } snGradSchemes { default none; } fluxRequired { default yes; p ; } // ************************************************** *********************** // 

August 21, 2011, 03:59 

#2 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26 
Please post a case and the convergence study.


August 22, 2011, 02:34 

#3 
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 7 
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 maxNorm 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 nonorthogonal meshes? Jasak is writing in his thesis that it should be possible with the nonorthogonal correction... Is this the right setup in my fvSchemes or do i need something more in it? Thanks a lot. 

August 22, 2011, 10:09 

#4 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26 
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.


August 22, 2011, 10:52 

#5 
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 7 
thanks for the reply alberto,
the peclet number is in all directions smaller then 1. 

August 22, 2011, 11:04 

#6 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26 
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. 

August 22, 2011, 11:09 

#7 
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 7 
Checking geometry...
Overall domain bounding box (0 0 0) (1.5 1 0.01) Mesh (nonempty, nonwedge) directions (1 1 0) Mesh (nonempty) directions (1 1 0) All edges aligned with or perpendicular to nonempty directions. Boundary openness (5.2090377e18 4.2269516e18 1.4260487e15) OK. Max cell openness = 1.2490009e16 OK. Max aspect ratio = 1.6250001 OK. Minumum face area = 5.425347e05. Maximum face area = 7.8125004e05. Face area magnitudes OK. Min volume = 5.425347e07. Max volume = 5.4253475e07. Total volume = 0.01. Cell volumes OK. Mesh nonorthogonality Max: 26.565056 average: 26.565051 Nonorthogonality 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 05:45. 

August 22, 2011, 11:13 

#8 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26 
The only reason could be the limiter in vanLeer scheme. You can simply use "linear" to check. The rest should be fine.


August 22, 2011, 11:23 

#9 
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 7 
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? 

August 22, 2011, 11:26 

#10 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26 
I generally use limitedLinearV, and, if this is not stable enough, linearUpwindV (a 2nd order upwind).


August 23, 2011, 02:30 

#11 
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 7 
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 04:39. 

August 23, 2011, 09:35 

#12 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26 
I forgot to tell you: use leastSquares for gradients. Gauss linear is not second order on arbitrary meshes.


August 24, 2011, 10:33 

#13 
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 7 
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 1e12 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((1A(U)),p) Gauss linear limited 1.0; } interpolationSchemes { default none; interpolate(U) linear; } snGradSchemes { default corrected; } fluxRequired { default yes; p ; } 

August 24, 2011, 11:53 

#14 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26 
You should post your case.


August 25, 2011, 02:26 

#15 
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 7 
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 11:27. 

August 25, 2011, 11:10 

#16 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26 
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((1A(U)),p) Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default yes; p ; } 

August 25, 2011, 15:48 

#17 
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 7 
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.. 

August 26, 2011, 10:17 

#18 
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 7 
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 

August 27, 2011, 21:58 

#19  
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26 
Quote:
Best, 

September 6, 2011, 13:01 

#20 
Senior Member
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 174
Rep Power: 7 
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 VOFbased evaporation model. So I made a sphericalsegmentlike mesh, consisting of prism elements, shown in the picture below. The issue is, I'm obtaining nonzero 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 nonzero using Gausslinearscheme, 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, alphafiled and it's gradient. In the first case there is a jump in the alphafield but it's uniform elsewhere away form the jump. In the second case I took completely uniform field, but there is still nonzero gradient. I also have zerogradientBCs on the left and right side, wedge BCs on the top and bottom, front and back. Best regards, illya Last edited by linch; September 7, 2011 at 09:50. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Grid refinement study for Order of accuracy and GCI  Chander  CFX  5  May 3, 2011 19:13 
Taylor Vortex and Accuracy  ganesh  Main CFD Forum  0  April 7, 2010 22: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 09:19 
Large 3D tetrahedral meshes  Aldo Bonfiglioli  Main CFD Forum  4  August 27, 1999 03:33 