CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Question to liftDrag (http://www.cfd-online.com/Forums/openfoam-post-processing/61402-question-liftdrag.html)

 hoochie May 22, 2007 03:47

Hello all, im trying to cal

Hello all,

im trying to calculate some cases from fluent, to evaluate the results of OpenFOAM. The cases consist of a wing (2D) in a flow and Im interested in the forces in X and Y-direction. So I changed the liftDrag-tool to print the vectors from the pressure-, visous- and turbulenceforce. With this vectors, I hoped to get more or less the same results than from fluent. In fact they are not, the forces are much to low.
I filled in the right value of nue, because liftDrag is working with it. So, does anybody have a clue where could be the problem?

And a second question, I raed in the forum, that calculating incompressible means to compute p* but not p. To get the real pressure I have to multiply p* with rho.
But if p* isnt p, is the function

pressureForce = sum
(
p.boundaryField()[patchLabel]
*mesh.Sf().boundaryField()[patchLabel]
);

in liftDrag correct? Because p in this case is p* as far as I can see.

 msrinath80 June 2, 2007 02:45

There is a very detailed discu

There is a very detailed discussion on lift/drag on the "Running/Solving CFD" forum. Check it out. For the record, I have compared the lift and drag coefficients using both OpenFOAM and Fluent for the case of 2D laminar unsteady vortex shedding past a square cylinder. They compare quite well!

 lr103476 June 2, 2007 05:25

And I compared lift/drag for a

And I compared lift/drag for a 2D laminar flow around fixed and moving circular cylinders. Comparison with Fluent / Literature is quite good, and OpenFoam is faster, especially the new 1.4!

 ranjan_1947yahoocom June 2, 2007 11:27

hi, I am new for OpenCFD. Ac

hi,
I am new for OpenCFD. Actually I have to do the simulation for flow past fixed circular cylinder of radius 10cm in 2D incompressible viscous laminar unsteady flow in water. Lift/drag has to compare with the fluent result.
Can any one suggest that,which solver I have to use(simple or piso) and also which scheme and what value for other factor should be used or whole steps.
My reynolds number is 3000.
thanx
Rk

 lr103476 June 2, 2007 13:45

Hi Ranjan, Welcome OpenFoa

Hi Ranjan,

Welcome OpenFoam, it is a very good piece of code and perfectly suitable for your problem. I am also dealing with laminar flows and performed certain tests using circular cylinders in a freestream at Re=150. For detailed info, take a look at:

http://www.aero.lr.tudelft.nl/~frank/index.php?id=research/cfd/OpenFOAM/validati on/OpenFOAM

For the problem of a static cylinder in a freestream, you'll have to use icoFoam with PISO and central discretisation. For a static cylinder I use the fully Crank Nicholson timescheme and for moving cylinders I use the backward scheme (with icoDyMFoam). From my experience, OpenFoam 1.4 is a lot faster than 1.3, so try this new version.

One more question. You are aware that the flow around circular cylinders becomes turbulent at about Re=180, right? When you want to solve for turbulence you need the solver turbFoam.....

Regards, Frank

 msrinath80 June 2, 2007 16:35

Hi Frank, I will be giving

Hi Frank,

I will be giving a presentation in my university concerning the use of GNU/Linux clusters in solving CFD problems. I was wondering if I could use your CFD movies from your webpage as examples. I will reference your movies to your webpage. Would that be OK?

 lr103476 June 2, 2007 17:00

Hi pUI, It OK with me. Just

Hi pUI,

It OK with me. Just refer to my website and mention the Delft University of Technology. Btw, which movies are you referring to? And what is your university?

Frank

 msrinath80 June 2, 2007 17:05

Will do Frank. Thanks! I'm fro

Will do Frank. Thanks! I'm from University of Alberta (www.ualberta.ca), Chemical and Materials Engineering Department.

 hoochie June 2, 2007 17:58

Hello all, I asked the ques

Hello all,

I asked the questions in the beginning of this thread. Thanks for your replies! I worked through the "Running/Solving CFD"-discussion first, but it didnt answer my question, as I get it. Maybe it is answered and my english is to limitted http://www.cfd-online.com/OpenFOAM_D...part/happy.gif
My main-problem is the function for the pressure sum. In this function the pressureforce is calculated with p*. So the pressureforce is not a force, it is a force/rho. I solved the problem with multiplying rho to my pressurefield, with this I get p and not p*. After doing this, the results are looking good.
To clear things, Im not interested in the coefficients which are calculated, Im interested in the forces. I calculate the coefficients by myself. So I added the instruction to liftDrag to print out the force-vectors and as I get it they work "wrong" as they compute in the usual style force/rho instead of a force.
I hope you are able to understand what I meant.

BTW: Did anyone of you try computing an airfoil in 2D? I do right now and Im getting always a velocity in z-direction. I posted this problem in another thread and I dont want to activate the same topic here, but if you did, I would be interested in your setup of files. Some other people gave me hints, about possible causes, but all possible causes were absolutly ok in my case.

Anyway thank you
RW

 doug June 6, 2007 16:48

RW- I am also trying to get

RW-

I am also trying to get a 2D airfoil case running using a C-grid. I'm having a really tough time with the boundary conditions for some reason. I found this thread that suggests getting it running in potentialFoam first:
http://www.cfd-online.com/OpenFOAM_D...tml?1181162568
but I haven't had any luck with that either. I've posted in two other threads along the same lines:

http://www.cfd-online.com/OpenFOAM_D...tml?1179501415

and

http://www.cfd-online.com/OpenFOAM_D...tml?1181080719

If you get something running, I'd be very interested in knowing what your using for initial conditions, boundary conditions, and the other initial setup files for the case.

Thanks.

-Doug

 msrinath80 June 6, 2007 16:51

RW: Apologies for the delayed

RW: Apologies for the delayed reply. Can you rephrase your question if possible in a single sentence. I'm unable to follow it at present.

 doug June 6, 2007 17:02

Hello All- One more questio

Hello All-

One more question. OpenFOAM 1.4 doesn't come with a pre-compiled liftDrag executable. When I try to compile it, I get errors telling me:

make: *** No rule to make target '/blah/blah/blah.h' needed by 'liftDrag.dep'. Stop

I figured it wasn't finding the .h files and located a bunch of them. It seems that liftDrag.dep was written for 1.2 and that many of the files have been moved for 1.4. Locating the files alleviated the problem for most of the .h files. However, there are a bunch of .h files that I can't find anywhere in the OpenFOAM-1.4 installation. This includes liftDrag.h. I assume many of you are running liftDrag on 1.4 and just wondered how you got it to compile when so many of the .h files listed in liftDrag.dep don't even exist in the installation.

Thanks for you help.

-Doug

 msrinath80 June 6, 2007 17:23

Yes, liftDrag compiles trivial

Yes, liftDrag compiles trivially in OpenFOAM 1.4. I have given detailed instructions[1] in the forum on how to install it in OF 1.3. If you follow the same procedure for OF 1.4 it will work. I use it on OF 1.4 without any problems.

[1] http://www.cfd-online.com/OpenFOAM_D...es/1/2299.html

I read somewhere in the forum that it is on the TODO list for a future OpenFOAM version. So I'm guessing that we should have have native liftDrag support sooner or later.

Good Luck!!!!

 msrinath80 June 6, 2007 17:41

Yes, liftDrag compiles trivial

Yes, liftDrag compiles trivially in OpenFOAM 1.4. I have given detailed instructions[1] in the forum on how to install it in OF 1.3. If you follow the same procedure for OF 1.4 it will work. I use it on OF 1.4 without any problems.

[1] http://www.cfd-online.com/OpenFOAM_D...es/1/2299.html

I read somewhere in the forum that it is on the TODO list for a future OpenFOAM version. So I'm guessing that we should have have native liftDrag support sooner or later.

Good Luck!!!!

 doug June 6, 2007 18:30

Thank you! I just compiled lif

Thank you! I just compiled liftDrag in 1.4. Thanks for the detailed explanation of your other post in the other thread.

-Doug

 hoochie June 6, 2007 19:05

Hey there, pUI, no case to

Hey there,

pUI, no case to apologize, we all got our work to do.
My question in one sentence would be:
Did anyone of you tried to simulate an airfoil in 2D with simpleFoam or rhoSimpleFoam?

Im getting always a velocity in z-direction which makes it hard to qualify my values for liftdrag, allthough they look good. As I said, I wrote about it in another thread, so it isnt wise to discuss it here, but unless I tried a lot with no success Im interested in the setup files, for 2D-cases in case of an airfoil, which got no velocity in z-direction.

RW

 lakeat August 27, 2007 10:02

Hello, all I just compiled

Hello, all

I just compiled liftDrag in 1.4. And I found it is available for interFoam, but it cannot be applied to icoFoam and oodles, I guess the problem is around here:
--------------------------------------------------
scalar Aref = sum
(
(Uav & mesh.Sf().boundaryField()[patchI])*
pos(Uav & mesh.Sf().boundaryField()[patchI])
);

// Reference length
boundBox patchBounds
(
mesh.boundaryMesh()[patchI].localPoints()
);

scalar Lref =
mag(Uav & (patchBounds.max() - patchBounds.min()))
/(mag(Uav) + VSMALL);
--------------------------------------------------
could anyone give some comments on these lines that why I cannot use liftDrag here and how to modify it.
Thanks

Have a good day!

Daniel

 gtg627e October 29, 2007 03:47

Hello Forum, I just install

Hello Forum,

I just installed the utility liftDrag as suggested in:

http://www.cfd-online.com/OpenFOAM_D...es/1/2299.html

I am running a very simple case in simpleFoam. I have a naca0012 at 0 angle of attack, and k-epsilon for modeling turbulence. I get the analysis to converge nicely, pressure looks good, velocity, k, epsolin, etc. look very good. When I run liftDrag . naca0012 -time 700 for example, I get this output:

[gtg627eOpenFOAM@ruzzene03 simpleFoam]\$ liftDrag . naca0012 -time 700
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4.1 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : liftDrag . naca0012 -time 700
Date : Oct 29 2007
Time : 03:42:42
Host : ruzzene03
PID : 9647
Root : /home/gtg627eOpenFOAM/OpenFOAM/gtg627eOpenFOAM-1.4.1/run/tutorials/simpleFoam
Case : naca0012
Nprocs : 1
Create time

Create mesh for time = 700

Time = 700

Inlet velocity: (50 0 0)
Wall patch 1 named airfoiln :
Reference area: 0.297421 Reference length: 1 Drag coefficient: 0.00116109 Lift coefficient: (0 8.21932e-05 -1.32776e-21) Moment coefficient: (-2.05483e-06 2.90273e-05 -1.95907e-05)

This result seems to not include viscous forces. The drag for a naca0012 at 0 deg and Re ~ 3 million should be approximately 0.0058, from "theory of wing sections."

Alessandro

 gtg627e October 29, 2007 03:48

Sorry I meant to post the abov

Sorry I meant to post the above message in the following thread:

http://www.cfd-online.com/OpenFOAM_D...es/1/2299.html

 msrinath80 October 29, 2007 04:20

I have performed a validation

I have performed a validation for laminar flows and I am confident that the utility accounts for both components. For turbulence please see the other threads on liftDrag. You may have to add some features.

All times are GMT -4. The time now is 02:18.