CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

How to find Lift and Drag in postprocessing step once the simulation is done

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 11, 2008, 10:18
Default Hi guys Would you tell me h
  #1
Member
 
mohd mojab
Join Date: Mar 2009
Posts: 31
Rep Power: 17
mou_mi is on a distinguished road
Hi guys

Would you tell me how I can find Lift and Drag in post-processing step once the simulation is done?

Thank you
mou
mou_mi is offline   Reply With Quote

Old   June 11, 2008, 12:41
Default Mou, There's a really good
  #2
deeprgreen
Guest
 
Posts: n/a
Mou,

There's a really good thread over at http://www.cfd-online.com/OpenFOAM_D...tml?1208133899 that should tell you what you need to know, especially if you're using turbFoam.

In my own experience with turbFoam_1, I've noticed that lift and drag coefficients that turbFoam_1 will generate are on a time slice and per-patch basis. I'm not sure how to aggregate those together but it shouldn't be too hard (I hope).

JM
  Reply With Quote

Old   June 11, 2008, 12:43
Default Mou, There's a really good
  #3
deeprgreen
Guest
 
Posts: n/a
Mou,

There's a really good thread over at http://www.cfd-online.com/OpenFOAM_D...tml?1208133899 that should tell you what you need to know, especially if you're using turbFoam. I've managed to get the custom turbFoam solver working and exporting the right lift/drag entries.

In my own experience with turbFoam_1, I've noticed that lift and drag coefficients that turbFoam_1 will generate are on a time slice and per-patch basis. I'm not sure how to aggregate those together but it shouldn't be too hard (I hope).

If anyone has a process for how to aggregate lift and drag over all the patches in a given model, I'd be very happy to hear about it.

JM
  Reply With Quote

Old   June 11, 2008, 12:46
Default Mou, There's a really good
  #4
deeprgreen
Guest
 
Posts: n/a
Mou,

There's a really good thread over at http://www.cfd-online.com/OpenFOAM_D...tml?1208133899 that should tell you what you need to know, especially if you're using turbFoam. I've managed to get the custom turbFoam solver working and exporting the right lift/drag entries.

In my own experience with turbFoam_1, I've noticed that lift and drag coefficients that turbFoam_1 will generate are on a time slice and per-patch basis. I'm not sure how to aggregate those together but it shouldn't be too hard (I hope).

If anyone has a process for how to aggregate lift and drag over all the patches in a given model, I'd be very happy to hear about it.

JM
  Reply With Quote

Old   June 11, 2008, 13:15
Default Hi Joe Thank you for your r
  #5
Member
 
mohd mojab
Join Date: Mar 2009
Posts: 31
Rep Power: 17
mou_mi is on a distinguished road
Hi Joe

Thank you for your reply. This thread is for finding Lift and Drag during simulation. But I need that after simulation (Post Processing). Is there any code that do that for me?

Mou
mou_mi is offline   Reply With Quote

Old   June 11, 2008, 13:27
Default If you have a steady simulatio
  #6
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
If you have a steady simulation, just run liftDrag. When you have an unsteady simulation, you should include some liftDrag code in your solver such that it writes the forces to files/screen every timestep.

If this answer is still not enough, try to give more details about your problem.

Goodluck, Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   June 12, 2008, 11:39
Default Hi Thank you for your help
  #7
Member
 
mohd mojab
Join Date: Mar 2009
Posts: 31
Rep Power: 17
mou_mi is on a distinguished road
Hi

Thank you for your help, Frank. for adding liftDrag to OF1.4.1, I compiled the /src/postProcessing/incompressible directory and the file libincompressiblePostProcessing.so added to my $FOAM_USER_LIB. but for compiling liftDrag in applications/utilities/postProcessing/wall/liftDrag, after I changed my Make/files to

liftDrag.C

EXE = $(FOAM_USER_APPBIN)/liftDrag

then, wclean&&wmake, I got this error

Making dependency list for source file liftDrag.C
could not open file liftDrag.H for source file liftDrag.C
SOURCE=liftDrag.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository - template-depth-40 -I/usr/local/OpenFOAM/OpenFOAM-1.4.1/src/postProcessing/incompressible/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-1.4.1/src/transportModels -I/usr/local/OpenFOAM/OpenFOAM-1.4.1/src/turbulenceModels -I/usr/local/OpenFOAM/OpenFOAM- .4.1/src/LESmodels -I/usr/local/OpenFOAM/OpenFOAM-1.4.1/src/LESmodels/LESdeltas/lnInclude -IlnInclude -I. -I/usr/local/OpenFOAM/OpenFOAM- .4.1/src/OpenFOAM/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/liftDrag.o
liftDrag.C:34:22: error: liftDrag.H: No such file or directory
liftDrag.C: In function â:
liftDrag.C:132: error: â has not been declared
liftDrag.C:142: error: â has not been declared
liftDrag.C:152: error: â has not been declared
make: *** [Make/linux64GccDPOpt/liftDrag.o] Error 1

Would anyone tell me what is my problem?

Thank you
mou
mou_mi is offline   Reply With Quote

Old   June 12, 2008, 12:17
Default OK, I found that what was my p
  #8
Member
 
mohd mojab
Join Date: Mar 2009
Posts: 31
Rep Power: 17
mou_mi is on a distinguished road
OK, I found that what was my problem. I needed to change Make/option file also. now it compiled.

mou
mou_mi is offline   Reply With Quote

Old   June 12, 2008, 13:10
Default I face another problem for usi
  #9
Member
 
mohd mojab
Join Date: Mar 2009
Posts: 31
Rep Power: 17
mou_mi is on a distinguished road
I face another problem for using liftDrag.
When I implement the liftDrag to solver, that give me Lift and Drag in each timestep during running, it work perfect. But I do not know when I want to use the liftDrag command separately after finishing my run for a time step, it give me error

>>liftDrag . cavity -time 1

/*---------------------------------------------------------------------------*\
| ========= | |
| \ / 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 . cavity -time 1
Date : Jun 12 2008
Time : 13:01:40
Host : master
PID : 344
Root : /home/mou/OpenFOAM/mou-1.4.1/run/tutorials/turbFoam
Case : cavity
Nprocs : 1
Create time

Create mesh for time = 1

Time = 1
Reading U

Reading p

Inlet velocity: (1 0 0)
#0 Foam::error::printStack(Foam:stream&) in "/usr/local/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/usr/local/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 __restore_rt in "/lib64/tls/libc.so.6"
#3 Foam::liftDrag::momentCoefficient(Foam::GeometricF ield<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricFie
ld<double,> const&, Foam::dimensioned<double> const&, Foam::word const&, Foam::Vector<double> const&, double
const&, double const&) in "/home/mou/OpenFOAM/mou-1.4.1/lib/linux64GccDPOpt/libliftDrag.so"
#4 main in "/home/mou/OpenFOAM/mou-1.4.1/applications/bin/linux64GccDPOpt/liftDrag"
#5 __libc_start_main in "/lib64/tls/libc.so.6"
#6 __gxx_personality_v0 in "/home/mou/OpenFOAM/mou-1.4.1/applications/bin/linux64GccDPOpt/liftDrag"
Floating exception

do you have any idea about this error?

Thank you
mou
mou_mi is offline   Reply With Quote

Old   April 9, 2010, 02:29
Default
  #10
Senior Member
 
Pavan
Join Date: May 2009
Location: Melbourne
Posts: 101
Rep Power: 16
rieuk is on a distinguished road
Hey, same problem as Mohd. I'm looking for something that will give me lift and drag values for my transient simulation results. Anyone got this working yet?
rieuk is offline   Reply With Quote

Old   June 19, 2010, 13:23
Default
  #11
Senior Member
 
Pavan
Join Date: May 2009
Location: Melbourne
Posts: 101
Rep Power: 16
rieuk is on a distinguished road
well got it done using execFlowFunctionObjects. Now to plot the lift and drag values...
These are placed in a separate directory for each timestep...does anyone have a useful script utility that will extract the forces and force coefficients into one file??? Can foamLog do this?? Not that I can see
rieuk is offline   Reply With Quote

Old   August 8, 2013, 00:48
Default
  #12
Member
 
Amin
Join Date: May 2013
Posts: 76
Rep Power: 12
Mirage12 is on a distinguished road
Hello


I would like to refresh this topic and ask the same question :

Would you tell me how I can find Lift and Drag in post-processing step once the simulation is done?


Thanks for your support
Mirage12 is offline   Reply With Quote

Reply


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
Lift and Drag Pedro Lopes CFX 1 February 19, 2007 08:18
Find Mean Drag and Mean lift using LES Cfd-Student FLUENT 1 January 9, 2006 11:03
Drag and Lift Daniel Fisher Phoenics 2 April 8, 2005 03:51
Help:lift and drag Yap Wen Jiun Main CFD Forum 5 April 2, 2000 17:13
Lift and drag Karim Ozar Main CFD Forum 4 March 9, 2000 02:35


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