|
[Sponsors] |
![]() |
![]() |
#1 |
Member
srinath
Join Date: Mar 2009
Location: Champaign, USA
Posts: 91
Rep Power: 17 ![]() |
Hello
I have been trying to add the liftdrag utility from OpenFoam-1.2 as per the post, http://www.cfd-online.com/cgi-bin/Op...=8678#POST8678 The only change i have done is to use the latest dev version from http://openfoam-extend.svn.sourceforge.net/viewvc/openfoam-extend/trunk/Core/Ope nFOAM-1.4.1-dev/ and cp -r the directory /src/postProcessing to version 1.4.1/src/ I succesfully make the library libincompressiblePostProcessing.so 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 |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21 ![]() |
I think you are missing liftDrag.H where those coefficients are defined. See if you can find a liftDrag.H file.
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
srinath
Join Date: Mar 2009
Location: Champaign, USA
Posts: 91
Rep Power: 17 ![]() |
Hi Srinath
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 /applications/utilities/postProcessing/miscellaneous/liftDrag/Make/options 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 Reading U Reading p Inlet velocity: (1 0 0) #0 Foam::error::printStack(Foam: ![]() #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? Thanks Srinath |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21 ![]() |
Hi there,
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[1] 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 :-) [1] http://www.cfd-online.com/OpenFOAM_D...es/1/5181.html |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
srinath
Join Date: Mar 2009
Location: Champaign, USA
Posts: 91
Rep Power: 17 ![]() |
Hi Srinath
Thanks for pointing me to the link where you modified turbFoam, i will try to do the same with icoFoam. |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Member
Giovanni Caramia
Join Date: Mar 2009
Location: Bari, ITALY
Posts: 58
Rep Power: 17 ![]() |
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 src/postProcessing/incompressible/liftDrag 2- I copied it in OpenFOAM/OpenFOAM-1.4.1/src/postProcessing/incompressible 3- From http://openfoam-extend.svn.sourceforge.net/viewvc/openfoam-extend/trunk/Core/Ope nFOAM-1.4.1-dev/ I downloaded the directory applications/utilities/postProcessing/wall/liftDrag 4- I copied it in OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing/wall 5- I went in OpenFOAM/OpenFOAM-1.4.1/src/postProcessing 6- I executed ./Alwmake 7-I went in OpenFOAM/OpenFOAM-1.4.1/applications/utilities/postProcessing/wall/liftDrag 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 |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Member
John
Join Date: Aug 2009
Posts: 92
Rep Power: 16 ![]() |
Hi,
Does anybody know the whereabouts of the liftDrag tool for OpenFoam v1.6? Do I need to use the one from v1.2? Thanks |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Member
John
Join Date: Aug 2009
Posts: 92
Rep Power: 16 ![]() |
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.
|
|
![]() |
![]() |
![]() |
![]() |
#9 | |
Member
Paulo Alexandre Costa Rocha
Join Date: Mar 2009
Posts: 71
Rep Power: 17 ![]() |
Quote:
It is implemented inside the code. Look at: http://www.cfd-online.com/Forums/ope...es-of15-7.html Best Regards, Paulo Rocha |
||
![]() |
![]() |
![]() |
![]() |
#10 |
Member
John
Join Date: Aug 2009
Posts: 92
Rep Power: 16 ![]() |
Thanks Paulo.
|
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Gentoo ebuild for OpenFOAM141 | deepblue17 | OpenFOAM Installation | 3 | July 29, 2010 09:27 |
OpenFoam141 problem after installation | mateuszzb | OpenFOAM Installation | 1 | July 2, 2008 04:11 |
[OpenFOAM] Read native OpenFoam141 with Paraview321 | hjg911 | ParaView | 1 | March 10, 2008 16:57 |
OpenFOAM141 installation problem on Itanium machine | skabilan | OpenFOAM Installation | 3 | February 6, 2008 09:05 |
Trying to install OpenFoam141 | jam | OpenFOAM Installation | 5 | December 22, 2007 11:16 |