CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   VWT Unable to get reasonable results (

dyroffk February 6, 2009 12:40

Hello. I'm pretty new to OF bu
Hello. I'm pretty new to OF but I've been browsing the forums for some time now. I am doing some research on an airship and I want to get lift, drag, moment coefficients for it in various configurations.

I've borrowed Mr. Barnaby's vwt setup and I'm trying to apply it to my own models. I have been trying to run simpleFoam on the model "solarship.stl" in the directory, but was consistently getting really unreasonable results, with drag orders of magnitude larger than lift.

I then made a model of a 3d airfoil (e197) section with high aspect ratio and the results again are consistently wrong compared to XFOIL (even with 2D->3D errors expected) OF ended up stabilizing with a
Cd = 0.2908 and
CL = 0.0754
but XFOIL gives roughly
Re = 150000
Cl = 0.2741
Cd = 0.01423

So I'm obviously doing something wrong. I was wondering if someone would have a look at my setup and let me know if there's something obvious and stupid that I have wrong?

Thanks for the help vwt-airship.tar.gz

dyroffk February 6, 2009 12:44

PS. Sorry, the stl of the airs
PS. Sorry, the stl of the airship was too large to post, but the airfoil is present.

The problem was present with both models so perhaps it's an error in my setup.

sachin February 9, 2009 01:51

Hi Kyle Well just a suggesti
Hi Kyle
Well just a suggestion... reduce grid size...check might need to run for longer no. iterations...
Just suggestion might not be correct...

dmoroian February 9, 2009 02:17

Hello Kyle, I see that you us
Hello Kyle,
I see that you used a low Re k-e turbulence model. The first paper I found on the internet regarding turbulence models comparison says that a high Re turbulence model with one equation gives a better prediction of the transition point than a high Re k-e or a low Re k-e (like Launder and Sharma).
As far as I know, OpenFOAM has such a model implemented (Spalart Allmaras), why don't you give it a try?

I hope this is helpful,

sachin February 9, 2009 02:41

Hello Dragos thanks for that
Dragos thanks for that paper but to what i read i didnt find it opposed high k-eps model but combines high k-eps model with one equation model
Correct me if i am wrong...
does OpenFOAM have Spalart Allmaras combined with high k-eps model....if so
Please can you give me some details about it?


dmoroian February 9, 2009 02:56

No, you're right. They are usi
No, you're right. They are using a high Re k-e in the bulk flow and a one equation model near wall.
I misread the paper, and I don't think there is a similar implementation in the current OpenFOAM release.
However, my point was that one equation turbulence models (like Spalart Allmaras) usually gives better results for airfoils like bodies, than two equation models (or at least fluent manual claims that, if I remember correctly).


sachin February 9, 2009 03:15

thanks dragos... was about it
thanks dragos...
was about it implement in my case

dyroffk February 10, 2009 23:51

Thanks very much for the input
Thanks very much for the input, everyone. I did realize that the problem was in the turbulence because the viscous forces were much higher than they should've been. Because my test case should not need turbulence I ended up disabling it.

Afterwards, using simpleFoam without turbulence I was able to get results very close to the predicted values, but I am having trouble achieving convergence. I also cannot get convergence on my airship model. Any suggestions for improving the convergence speed in simpleFoam?

The results stabilize around 40 iterations and the residuals decrease for the next 100 or 200 and then start to drift and eventually the solution explodes.

Thanks for the help!

dyroffk February 13, 2009 02:55

So I am still unable to get an
So I am still unable to get any decent convergence. The residuals get down on the order of 10^-3 and will hover there until the end of my 1000 iterations.

I'll attach my fvSolutions and fvSchemes and a log of the most recent run. I used blockmesh at a resolution of (25,25,25) for a test section of (+-25,28,20) and then used snappyHexMesh to create a mesh around the airship. Here is the checkMesh output:

| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.5 |
| \ / A nd | Web: |
| \/ M anipulation | |
Exec : checkMesh
Date : Feb 13 2009
Time : 01:52:56
Host : Orion
PID : 12753
Case : /home/kyle/OpenFOAM/kyle-1.5/run/solarShip
nProcs : 1

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = constant

Time = constant

Mesh stats
points: 266591
faces: 596209
internal faces: 502073
cells: 165657
boundary patches: 4
point zones: 0
face zones: 0
cell zones: 1

Number of cells of each type:
hexahedra: 132556
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 33101

Checking topology...
Boundary definition OK.
Point usage OK.
Upper triangular ordering OK.
Topological cell zip-up check OK.
Face vertices OK.
Face-face connectivity OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface
inlet 625 676 ok (not multiply connected)
outlet 625 676 ok (not multiply connected)
channelWalls 2500 2600 ok (not multiply connected)
car_Mesh 90386 92000 ok (closed singly connected surface)

Checking geometry...
Domain bounding box: (-25 -28 -20) (25 28 20)
Boundary openness (-1.8302e-17 7.9149e-18 1.07047e-16) OK.
Max cell openness = 1.85863e-16 OK.
Max aspect ratio = 1.4 OK.
Minumum face area = 0.003125. Maximum face area = 4.48. Face area magnitudes OK.
Min volume = 0.00021875. Max volume = 7.168. Total volume = 111076. Cell volumes OK.
Mesh non-orthogonality Max: 32.0305 average: 14.0889
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 1 OK.
All angles in faces OK.
Face flatness (1 = flat, 0 = butterfly) : average = 1 min = 1
All face flatness OK.

Mesh OK.

And the files: fvSolution fvSchemes log-truncated-relaxed.txt

Any help getting this to converge is most appreciated. Thanks!

dyroffk February 16, 2009 15:21

Sorry to keep posting, but I a
Sorry to keep posting, but I am still completely unable to get any convergence on these test cases. I've tried increasing the mesh resolution significantly (up to ~1.5m cells)

I've tried initializing the flow field with potentialFoam. This seems to bring the residuals down to 10^-3 in fewer iterations but it still will not go to convergence.

I also tried playing around with the relaxation factors and orthogonality correctors, which did not seem to help much.

I just want to get the forces for an airship in incompressible, viscid, steady, non-turbulent flow. Any suggestions are most appreciated!

dyroffk February 16, 2009 15:31

Also, I just want to verify th
Also, I just want to verify that these boundary conditions make sense for a "virtual wind tunnel"

For 0/U:
version 2.0;
format ascii;

root "";
case "3d";
instance "0";
local "";

class volVectorField;
object U;

dimensions [0 1 -1 0 0 0 0];

internalField uniform (-12.803 0 2.257);

type fixedValue;
value uniform (-12.803 0 2.257);

type zeroGradient;

type fixedValue;
value uniform (0 0 0);

type fixedValue;
value uniform (0 0 0);

and for 0/p:
version 2.0;
format ascii;

root "";
case "3d";
instance "0";
local "";

class volScalarField;
object p;

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

type zeroGradient;

type fixedValue;
value uniform 0;

type zeroGradient;

type zeroGradient;

As you can see, I wanted the ship to be flying at an angle of attack of 10deg at V(magnitude)=13m/s.

Is this the proper way to set up an angle of attack flight? Because when I look at the flow in paraView after some iterations it seems like the flow levels off and decreases the angle of attack. Also, when I initialize the flow with potentialFoam it "levels off" the flow. Is this a boundary condition issue?


dyroffk February 16, 2009 18:57

Hello again. I think there is
Hello again. I think there is something wrong with my boundary conditions. After running another simulation I am looking at how the flow develops with the iterations, and it strangely produces a region of flow reversal in the tunnel. Check out the images:

Now it's pretty obvious that this is not going to reach a steady state solution, or at least it will not be what I want. Any ideas how I can fix this so that it actually represents my model flying at an angle of attack?


dyroffk February 16, 2009 19:01

Sorry. Images didn't get uploa
Sorry. Images didn't get uploaded.

sachin February 17, 2009 00:47

Hello I am not very sure...j
I am not very sure...just a thought if channel wall is the outer wall of wind should be considered that it plays no role in your flow field...maybe 0 0 0 for channel wall is not correct....try with zeroGradient...which just puts the value whatever is in the cell next to it
Hope this helps...

maddalena February 17, 2009 04:21

Hello Hyle, I had a problem s
Hello Hyle,
I had a problem similar to yours a couple of days ago... The solution was to impose in the upper, lower, front and rear surface the same bc you have at the inlet. This will simulate better a freestream condition. For some more information, have a look here!
Good luck!


dyroffk February 17, 2009 06:16

Thanks very much for the input
Thanks very much for the input. It did end up being a problem of the boundary conditions.

I ended up setting the front, top, back and bottom all to the same constant velocity, and had zero pressure gradient across all these faces. This has given me a flow like this:

Now I think I will be able to get most of the data I need. I have two questions though--

1) Is it possible to record multiple moments on a patch? I want to get Mx, My, Mz all referenced at the same point, and obviously don't want to run the simulation three times to do so.

2) I want to find the dynamic stability derivatives and to do this I will need to accelerate the flow field. Is there a way to do this? Any suggestions on setting up a time varying flow field?

Thanks so much for your help!

sachin February 18, 2009 06:19

hello, 1. not much idea...but
1. not much idea...but guess should be possible
2. time varying flow field ...change the solver to transient solver

dyroffk February 19, 2009 03:02

So far I am just going to reco
So far I am just going to record the force data and go back to calculate the other moments later. Not too worried about that.

I am however, worried about setting up a time dependent flow field. I need to find the stability derivatives of the aircraft and so, for example, Cxq will be how the x force on the aircraft varies with respect to rolling rate. Or Cxu(dot) is how the x-force varies with respect to acceleration of the flow.

If anyone can point me in the direction of how to do this I'd be much appreciative. I feel like I need to set up some flow source that has a variation in time, but have no idea how to do this.


All times are GMT -4. The time now is 12:30.