
[Sponsors] 
May 31, 2007, 03:22 
Hello there,
Im computing s

#1 
Guest
Posts: n/a

Sponsored Links
Im computing some cases of an airfoil in 2D. My results are looking terrible, because OpenFoam seems to compute a velocity in zdirection which shouldnt be there. This can be seen in paraFoam. So I changed my boundary conditions from empty to symmetry plane, in hope to fix this problem. It didnt. Do you have any clue why this mistake appears? Or did you have problems of the same kind in past and solved them? Thx in advance 

Sponsored Links 
May 31, 2007, 03:35 
Is your mesh flat? Are the bo

#2 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,802
Rep Power: 24 
Is your mesh flat? Are the boundary conditions OK?
If you want an example where everything works fine in 2D to start comparing against, have a look at the liddriven cavity tutorial. Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

May 31, 2007, 04:11 
Hello Hrvoje,
thx for your

#3 
Guest
Posts: n/a

Hello Hrvoje,
thx for your answer. I converted a 2D mesh from fluent to OpenFOAM. OpenFOAM put a front and back patch as empty in my mesh and it got a thickness of 1 cell. Like in the liddriven cavity too. My boundary conditions are very sipmle for this case, so I dont think they will be wrong. On the left I got a velocity inlet, on the right a pressure outlet, top and down patches are symmetry planes and in the middle I got my airfoil as a wall with wallfunctions. By the way, computing it first order with upwind isn't causing any problems. But I need it second order computed to get realistic results. Whenever I compute it second order with linear I get a high value of velocity in zdirection. For example, my inlet velocity is 29.21 m/s in xdirection, after 5000 Iterationsteps I have got a velocity in z about 54 m/s. Any suggestions? 

May 31, 2007, 16:39 
Well, you are using fully impl

#4 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,802
Rep Power: 24 
Well, you are using fully implicit central differencing on a case with very little damping. I would recommend starting with a stabilised second order differencing scheme like
GammaV 0.2 This will still give you second order and should get rid of the zvelocity. What is your max Co number? With full central differencing you have to be very careful, i.e. keep it below 1. Good hunting, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

June 1, 2007, 06:07 
Hello Hrv,
I computed now m

#5 
Guest
Posts: n/a

Hello Hrv,
I computed now my case with different schemes for div(phi, u), i tried: linearLimitedV 1.0 vanLeerV 1.0 SFCD GammaV 0.2 and 1.0 The results are looking good, but I get always a velocity in zdirection which is growing during iterations. Of course they are not as high as with linear, but they are still present and increasing. Beyond that, I computed theese cases also with "symmetry plane" instead of "empty" at front and back plane. With "symmetry plane" the convergence looks much better and the zvelocity is much lower than with "empty" (After 2000 iterationsteps, empty: about 1.5 m/s, symmetry plane: about 0.05 m/s). But still there is a velocity in zdirection Edit: I forgot to mention, that Im working with simpleFoam, so steadystate and incompressible greetings RW 

June 1, 2007, 06:20 
In that case, I know what your

#6 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,802
Rep Power: 24 
In that case, I know what your problem is: your geometry is not perfectly flat.
Try running checkMesh and see what it says. I think we also have an application called flattenMesh, which may help sort this out. Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

June 1, 2007, 06:27 
Hello Hrv,
this is my check

#7 
Guest
Posts: n/a

Hello Hrv,
this is my checkMesh Result: Checking geometry... Boundary openness in xdirection = 6.10623e16 Boundary openness in ydirection = 2.72005e15 Boundary openness in zdirection = 0 Boundary closed (OK). Max cell openness = 1.11022e16 Max aspect ratio = 10.812. All cells OK. Minumum face area = 1.09727e06. Maximum face area = 0.549449. Face area magnit udes OK. Min volume = 6.82782e07. Max volume = 0.159888. Total volume = 301.103. Cell volumes OK. Mesh nonorthogonality Max: 42.4074 average: 5.76578 Nonorthogonality check OK. Face pyramids OK. Max skewness = 41.9705 percent. Face skewness OK. Minumum edge length = 0.000827862. Maximum edge length = 0.882998. All angles in faces are convex or less than 10 degrees concave. Face flatness (1 = flat, 0 = butterfly) : average = 1 min = 1 All faces are flat in that the ratio between projected and actual area is > 0.8 Geometry check done. Looks fine to me, or did I miss something? RW 

June 1, 2007, 06:59 
Hmm, looks fine. There may be

#8 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,802
Rep Power: 24 
Hmm, looks fine. There may be an instability in the way you prescribed boundary conditions, but now I'm really clutching at straws. Are you using Gauss gradients or least squares?
Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

June 1, 2007, 07:19 
Im using Gauss gradients, but

#9 
Guest
Posts: n/a

Im using Gauss gradients, but upwind for turbulence:
grad(p) Gauss linear; grad(U) Gauss linear; grad(epsilon) Gauss upwind phi; grad(k) Gauss upwind phi; snGradCorr(U) Gauss linear; snGradCorr(p) Gauss linear; grad(magSqr(U)) Gauss linear; grad(magSqr(p)) Gauss linear; snGradCorr(epsilon) Gauss upwind phi; snGradCorr(k) Gauss upwind phi; RW 

June 1, 2007, 07:29 
Not good: in ALL gradients you

#10 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,802
Rep Power: 24 
Not good: in ALL gradients you should be using either linear or harmonic interpolation. This is not a convection term, where you need to stabilise the scheme with respect to the flux  that lot will be under divSchemes.
Try again and please let me know what happened. Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

June 1, 2007, 07:54 
Mmm I cant find a way to set u

#11 
Guest
Posts: n/a

Mmm I cant find a way to set up "harmonic" in gradschemes. OpenFOAM tells me it is not available.
Harmonic is neither in the list of Gauss nor in the list of gradschemes. RW 

June 1, 2007, 07:58 
Edit: Running the case with al

#12 
Guest
Posts: n/a

Edit: Running the case with all gradschemes to linear is having no effect on the Uz. After 1000 Iterationsteps I have got 3 m/s in zdirection
RW 

June 1, 2007, 08:26 
Do you use an older version of

#13 
Member
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 10 
Do you use an older version of OpenFoam?
Are you sure, that your empty boundaries are REALLY orthogonal to the zdirection? Rolando 

June 1, 2007, 08:37 
Hello Roland,
Im using OF 1

#14 
Guest
Posts: n/a

Hello Roland,
Im using OF 1.4. All I can say is, that checkMesh is telling me my mesh is flat and in the conversion from Fluentmesh to OpenFOAMmesh both emptyplanes were created, so I assume they are orthogonal to the z direction. Is there any special tool apart from checkMesh which will give more information about that? RW 

June 1, 2007, 09:03 
I donīt think there is an othe

#15 
Member
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 10 
I donīt think there is an other tool to do this checking.
What does your mesh look like? Is it a planar mesh with only one cell in zdirection? This would exclude cells of tetraeder and pyramid types. Rolando 

June 1, 2007, 09:26 
Yes my mesh is a mesh with one

#16 
Guest
Posts: n/a

Yes my mesh is a mesh with one cell in zdirection. It has been an unstructured 2Dmesh and was converted into the OpenFOAMmesh.
RW 

June 6, 2007, 19:21 
This could be an issue with yo

#17 
Senior Member
Srinath Madhavan (a.k.a pUl)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 14 
This could be an issue with your geometry import. The simplest way to test it is to put in a little extra effort and try to build your airfoil using blockMesh. If the Uz velocity problem goes away, that's your clue!
I trust blockMesh more than any other converter no matter how extensively they have been tested because it was written specifically with OpenFOAM in mind. Since yours is a fairly simple 2D airfoil you could get away with blockMesh. Check this thread for some blockMesh Airfoil hints: http://www.cfdonline.com/OpenFOAM_D...es/1/3508.html 

June 7, 2007, 12:02 
Hello pUI
thank you for you

#18 
Guest
Posts: n/a

Hello pUI
thank you for your idea, its a good one, I will check this out! RW 

June 7, 2007, 13:25 
Hello again,
by the way ano

#19 
Guest
Posts: n/a

Hello again,
by the way another question, if Im computing my case with front and backplane as empty, no Uz is calculated in the computation, but in the end it is still present, with high values. Does this Uz will have an effect on my other results for Ux, Uy and p, or is it possible to ignore those Uz values and take the rest for 100 percent accuracy? Maybe a programmer can answer this. I really dont get, how a velocity in zdirection can exist, if it is not calculated, maybe some error during interpolation? Thx in advance RW 

June 7, 2007, 14:14 
No interpolation: what is your

#20 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,802
Rep Power: 24 
No interpolation: what is your zvelocity in the initial field for U? Throw aweay all results and try again.
Please let me know, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Steady pipe flow mean velocity higher than inlet velocity  anita  OpenFOAM Running, Solving & CFD  7  September 25, 2012 05:35 
Velocity profile as an velocity intlet condition  kees  FLUENT  3  April 16, 2008 18:35 
velocity profile as an velocity inlet condition  KEES  Main CFD Forum  0  April 15, 2008 11:26 
Head loss function of velocity^2 or velocity^1?  jrg  Main CFD Forum  1  November 19, 2007 14:09 
how to plot RMS velocity (fluctuating velocity)  nash  Main CFD Forum  0  October 18, 2006 16:37 
Sponsored Links 