Hello I have been trying to
I have been trying to add the liftdrag utility from OpenFoam-1.2 as per the post,
The only change i have done is to use the latest dev version from
and cp -r the directory
/src/postProcessing to version 1.4.1/src/
I succesfully make the library
My problem comes when i try to make the liftDrag binary
This is the error i get
srinath@dell:~/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing/miscellaneous/l iftDrag$ wclean && wmake
Making dependency list for source file liftDrag.C
SOURCE=liftDrag.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/srinath/OpenFOAM/OpenFOAM-1.4.1/src/postProcessing/incompressible/lnIncl ude -I/home/srinath/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -I/home/srinath/OpenFOAM/OpenFOAM-1.4.1/src/transportModels -I/home/srinath/OpenFOAM/OpenFOAM-1.4.1/src/turbulenceModels -I/home/srinath/OpenFOAM/OpenFOAM-1.4.1/src/LESmodels -I/home/srinath/OpenFOAM/OpenFOAM-1.4.1/src/LESmodels/LESdeltas/lnInclude -IlnInclude -I. -I/home/srinath/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPOpt/liftDrag.o
liftDrag.C: In function 'int main(int, char**)':
liftDrag.C:140: error: 'dragCoefficient' was not declared in this scope
liftDrag.C:150: error: 'liftCoefficient' was not declared in this scope
liftDrag.C:161: error: 'momentCoefficient' was not declared in this scope
make: *** [Make/linuxGccDPOpt/liftDrag.o] Error 1
Has anyone tried adding the liftDrag utility to 1.4.1?
Any help will be much appreciated
I think you are missing liftDr
I think you are missing liftDrag.H where those coefficients are defined. See if you can find a liftDrag.H file.
Hi Srinath I found that it
I found that it is picking up liftDrag.H. The problem was that liftDrag in version 1.4 is in a different namespace, so i did the following
I added the line
using namespace Foam::liftDrag to the liftDrag.C, found in /applications/utilities/postProcessing/miscellaneous/liftDrag$
It compiles then, but fails in the linking stage because it can't find libfoamUtil.so
A find command didn't locate such a library, so i assumed ver1.4 has done away with it and removed the line -lfoamUtils found in
Now everything compiles and links properly.
Unfortunately things don't seem to be as good as they seem.
When i go to FoamX and execute
foamUtilities->postProcessing->miscellaneous->liftDrag, i get the following error.(I am running it on icofoam/cavity)
Time = 0
Inlet velocity: (1 0 0)
#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/home/srinath/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/srinath/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted: [0xffffe420]
#3 Foam::liftDrag::momentCoefficient(Foam::GeometricF ield<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double,> const&, Foam::dimensioned<double> const&, Foam::word const&, Foam::Vector<double> const&, double const&, double const&) in "/home/srinath/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libincompressiblePostPr ocessing.so"
#4 main in "/home/srinath/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/liftDrag"
#5 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#6 Foam::regIOobject::readIfModified() in "/home/srinath/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/liftDrag"
Am i executing the liftDrag command correctly? Does it need other options?
Hi there, If you search the
If you search the forum, you'll find that most of us who are interested in dimensionless force coefficients have picked out the required code from the liftDrag utility (Thanks to Frank Bos) and modified the solver (such as icoFoam) to calculate them and print them directly to the log file. I suggest that you do the same. Instructions for modifying the solver are available in some of the forum threads. Check this thread for an example of the same using the turbFoam solver.
Of course, if this isn't a high priority at this point, you could always wait for OpenFOAM 1.5, which I believe will calculate lift and drag coefficients natively.
Hope this helps :-)
Hi Srinath Thanks for point
Thanks for pointing me to the link where you modified turbFoam, i will try to do the same with icoFoam.
I added the liftDrag utility t
I added the liftDrag utility to 1.4.1, here there is what I have done:
1- From http://openfoam-extend.svn.sourceforge.net/viewvc/openfoam-extend/trunk/Core/Ope nFOAM-1.4.1-dev/
I downloaded the directory
2- I copied it in
I downloaded the directory
4- I copied it in
5- I went in
6- I executed
7-I went in
8- I executed
wclean && wmake
I did not use liftDrag in FoamX but it seem to work if I use the command line.
Hope this helps
liftDrag OpenFOAM 1.6
Does anybody know the whereabouts of the liftDrag tool for OpenFoam v1.6?
Do I need to use the one from v1.2?
The liftDrag utility from v1.2 doesn't work with v1.6. I'm referring to the wclean && wmake in Step 7 of the trivial compile.
It is implemented inside the code. Look at:
|All times are GMT -4. The time now is 17:10.|