CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Adding liftDrag to Openfoam141

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 31, 2008, 22:46
Default Hello I have been trying to
  #1
Member
 
srinath
Join Date: Mar 2009
Location: Champaign, USA
Posts: 91
Rep Power: 17
srinath is on a distinguished road
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
srinath is offline   Reply With Quote

Old   June 1, 2008, 15:34
Default I think you are missing liftDr
  #2
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
I think you are missing liftDrag.H where those coefficients are defined. See if you can find a liftDrag.H file.
msrinath80 is offline   Reply With Quote

Old   June 1, 2008, 21:48
Default Hi Srinath I found that it
  #3
Member
 
srinath
Join Date: Mar 2009
Location: Champaign, USA
Posts: 91
Rep Power: 17
srinath is on a distinguished road
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:stream&) 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?

Thanks
Srinath
srinath is offline   Reply With Quote

Old   June 1, 2008, 23:38
Default Hi there, If you search the
  #4
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
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
msrinath80 is offline   Reply With Quote

Old   June 2, 2008, 09:39
Default Hi Srinath Thanks for point
  #5
Member
 
srinath
Join Date: Mar 2009
Location: Champaign, USA
Posts: 91
Rep Power: 17
srinath is on a distinguished road
Hi Srinath

Thanks for pointing me to the link where you modified turbFoam, i will try to do the same with icoFoam.
srinath is offline   Reply With Quote

Old   June 3, 2008, 11:32
Default I added the liftDrag utility t
  #6
Member
 
Giovanni Caramia
Join Date: Mar 2009
Location: Bari, ITALY
Posts: 58
Rep Power: 17
karamiag is on a distinguished road
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
karamiag is offline   Reply With Quote

Old   August 24, 2009, 19:04
Default liftDrag OpenFOAM 1.6
  #7
Member
 
John
Join Date: Aug 2009
Posts: 92
Rep Power: 16
nomad is on a distinguished road
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
nomad is offline   Reply With Quote

Old   August 24, 2009, 23:36
Default
  #8
Member
 
John
Join Date: Aug 2009
Posts: 92
Rep Power: 16
nomad is on a distinguished road
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.
nomad is offline   Reply With Quote

Old   August 25, 2009, 10:43
Default
  #9
Member
 
Paulo Alexandre Costa Rocha
Join Date: Mar 2009
Posts: 71
Rep Power: 17
paulo is on a distinguished road
Quote:
Originally Posted by nomad View Post
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
No, you don't need.

It is implemented inside the code. Look at:

http://www.cfd-online.com/Forums/ope...es-of15-7.html

Best Regards,

Paulo Rocha
paulo is offline   Reply With Quote

Old   August 25, 2009, 13:39
Default
  #10
Member
 
John
Join Date: Aug 2009
Posts: 92
Rep Power: 16
nomad is on a distinguished road
Thanks Paulo.
nomad is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
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


All times are GMT -4. The time now is 16:56.