CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Drag Coefficient dont convergate. (

Porisel October 23, 2013 10:40

Drag Coefficient dont convergate.
3 Attachment(s)

i try to simulate a flow around a fishlike body.
a want to have the drag coefficient. the stream should be from the front, no walls. the drag coefficient is under zero and the value tramps to zero.

so i created a inlet patch with bounery condition for U are fixedValue (uniform (2 0 0) and for p are zeroGradient.
the outletpatch boundery condition for U are inletOutlet with a InletValue (0 0 0) and a value uniform (2 0 0) and for p with fixedValue uniform 0.
the other bounderieconditions are slip.
please look at the txt-files for more.

to the solvers:
i use the simplefoam (SIMPLE solver) and the k-Omega SST model.
the flow is incompressible, steady with k of 1.5*10-6 (water) with turbolences.
timesteps are 0.005s long. end is 10s.

what i do wrong?
please look at the paraview picture. somethink wrong with the stream? i orientatet on the motorbike tuto.

Artur October 24, 2013 11:29


Your p and U boundary conditions seem OK on the first glance. It seems to me that your domain is far too small with relation to the size of your AUV and so will give you unpredictable results. My advice would be to make it at least 1xlength of your body (L) upstream, 1.5xL up and down of the centreline and 3xL downstream (this will still be a bit too small but it's a start).

If your viscous drag will still be wrong I'd recommend checking your nut, k, omega/epsilon boundary conditions.

Good luck,


Porisel October 25, 2013 07:06

thanks for the answer. i will test your advice.

kind regards

Porisel October 28, 2013 03:25

ok, the drag coeffient turns from positiv to zero, now. but the stream is the same. after 1-2 cells, it turns from 2 m/s to 0 m/s after some secondes. a dont know, whats wrong there. the hole stream should have a velocity from 2 m/s to calculate the drag coefficient, i think.

Artur October 28, 2013 05:55

Can you please post a picture of the flow features that trouble you and provide a bit more accurate description so it's easier for me to try and help you out?



Porisel October 28, 2013 06:05

it looks similar like in the picture of the first post. you see the red strip on the front? thats a velocity of 2m/s. blue ist 0m/s. now i try some other patchconditions for U. i done no picture. but i changed the streamrange or the mesh around the object. the simulation runs crucial faster. :)

E: now is run with to patches fixedValue uniform (2 0 0) and 2 slip one the sides. inlet or outlet i dont changed. if i change the outlet value to fixedValue uniform (2 0 0) there is a stream on the outlet (red stripe like on the inlet). dont no which order the streams follows. (in or out).
if i put all patches fixedValue uniform (2 0 0) except the outlet, i get a stream in a wrong order. so i try now with other conditions :P

olivierG October 28, 2013 06:43


Your BC are wrong, in the physical sense.
You set a 2m/s velocity inlet, strict all uniform, and a zeroGradient for the pressure, just in front of your "fishlike" !
Same at outlet ...
NB: if you say "zeroGradient", OF apply zero gradient, not "almost zero Gradient".

So increase your box(at least 10x the size of your object in front, 20x in back) if you would stay with this BC, or/and take a look at other more "realistic" BC. (see the airfol tutorial at least).


Porisel October 28, 2013 08:47

2 Attachment(s)
thank you for your comment.
the airfoil tutorial is 2D, isnt it? my object is 3D. so i cannot use conditions like empty oder freestream?
may there are analogies for 3D, i dont know.

i want a pressure, thats all the same around, because i dont want to have influence to the streaming. what condition should i choose. im a littlebit confused.
i think i dont get all the meanings of the boundery condition.

E: i added two pictures. one with the same condition as in the first post, but with a bigger mesh.
in the secound picture, a changed the condition from low, up, front and backside to wall. its a interesting streaming to the backwall.

Porisel October 29, 2013 11:12

uff, i've done a huge mistake. for the streamvelocity i choosed the wrong direction. embarrassing. dont tell my mom, please. :D

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