CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   LiftDrag Utility for Compressible Flow Fields (

shaun January 11, 2008 01:55

Hello, has anyone have a modif
Hello, has anyone have a modified liftDrag utility for use with the compressible flow solvers such as rhopSonicFoam?

I note that the incompressible version uses nu and not mu. My C++ is not up to scratch. Any assistance would be appreciated.



bychkov January 14, 2008 08:24

Hello Shaun, Yes, I have mo
Hello Shaun,

Yes, I have modified liftDrag.

An enhanced version of liftDrag has the next features:
- support incompressible and compressible solvers (Euler equations, laminar, turbulent);
- user can specify drag force direction and reference values;
- forces and moments (not coefficients) printed when the option dimensioned is specified.

You can download it from this:

Be careful the new version overwrite old liftDrag files.

I also want to upload it to svn. Does anyone known Do I need registration on svn to upload files?


shaun January 14, 2008 22:53

Hello Ivan, Thanks for repl
Hello Ivan,

Thanks for replying and thank you for the updated tool.

I am not sure about the registration process.



lgriffiths March 25, 2008 13:25

Hi Ivan, thanks for sharing
Hi Ivan,

thanks for sharing the updated liftdrag tool.

I was just wondering what you've taken as the moment origin?


bychkov March 25, 2008 16:34

Hello Laurence, The moment
Hello Laurence,

The moment origin is the origin of the coordinate system. The same as in earlier liftDrag.

I also found that reference density, velocity and others reference values can be computed incorrectly for compressible flow. So you can use the option -dimensionless or manually set reference values for compressible flow.


simvun April 18, 2008 01:34

Hi Ivan, I'm a newbie at wr
Hi Ivan,

I'm a newbie at writing C++ code so forgive me if this is an obvious question but I was looking through the liftDrag utility you modified and was wondering how the "dragCoefficient" variable in incompressible.H finds the turbulent drag coefficient in liftDrag.H in the src/... folder. Why don't we have to change the "dragCoefficent" in the incompressible.H file to "turbDragCoefficient" to get the drag coefficient that includes turbulent effects?



axl July 15, 2008 11:24

Hey, I was stumbling over t

I was stumbling over the same thing. Any clues yet? I'm sure the turbLift/DragCoefficient function is never called...
I'll try fixing it, but don't know if I'll succeed.

My problem is that I have no idea how to find out which turbulence model is used, which is needed for the turbLiftCoefficient function as the first argument:
const autoPtr<turbulencemodel>& turbulence

And if you want to make this a smooth function, you have to find out automatically in advance whether it's a turbulent or laminar simulation, and which model is used.



gregorv July 16, 2008 07:53

Looking at the latest 1.5 rele
Looking at the latest 1.5 release, it seems the liftDrag utility is obsolete now, there is a new force postprocessor in 1.5. I haven't tested it yet but it might be just what you are looking for.

agrewal July 16, 2008 23:18

I followed the instructions fo
I followed the instructions for installing the enhanced version of the liftDrag utility on OF 1.4.1-dev, but got the following error when running wmake:

liftDrag.C: In function 'int main(int, char**)':
liftDrag.C:89: error: no match for 'operator=' in 'nu = transportProperties.Foam::IOdictionary::<anonymous >.Foam::dictionary::lookup(((c onst Foam::word&)(& Foam::word(((const char*)"nu")))))'

Any ideas?

mahendra September 16, 2008 05:36

Hello Friends
Hello Friends

I am curious to know how to get the values of lift and drag coefficients from log file for flow across a cylinder case in OpenFOam 1.5?

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