CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   How to find Lift and Drag in postprocessing step once the simulation is done (http://www.cfd-online.com/Forums/openfoam-post-processing/61383-how-find-lift-drag-postprocessing-step-once-simulation-done.html)

mou_mi June 11, 2008 10:18

Hi guys Would you tell me h
 
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

deeprgreen June 11, 2008 12:41

Mou, There's a really good
 
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

deeprgreen June 11, 2008 12:43

Mou, There's a really good
 
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

deeprgreen June 11, 2008 12:46

Mou, There's a really good
 
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

mou_mi June 11, 2008 13:15

Hi Joe Thank you for your r
 
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

lr103476 June 11, 2008 13:27

If you have a steady simulatio
 
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

mou_mi June 12, 2008 11:39

Hi Thank you for your help
 
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 June 12, 2008 12:17

OK, I found that what was my p
 
OK, I found that what was my problem. I needed to change Make/option file also. now it compiled.

mou

mou_mi June 12, 2008 13:10

I face another problem for usi
 
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:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) 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

rieuk April 9, 2010 02:29

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 June 19, 2010 13:23

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

Mirage12 August 8, 2013 00:48

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


All times are GMT -4. The time now is 09:59.