|
[Sponsors] |
July 24, 2012, 00:08 |
Obtaining Forces and Force Coefficients
|
#1 |
New Member
Steven Chew
Join Date: Jul 2012
Posts: 4
Rep Power: 14 |
Hi,
I have been trying to run icoFoam for a bluff body flow, and I have just included the forces and forceCoeffs functions, but I wasn't able to get any results when I ran icoFoam. There were no new directories created. I read in some previous threads that it worked in OF 1.5 or 1.6. I am using 2.1.x, has there been any changes? My controlDict functions goes like this functions{ forces{ type forces; functionObjectLibs ("libforces.so"); patches ( carfront ); rhoInf 1.204; CofR (0 0 0); } forceCoeffs { type forceCoeffs; functionObjectLibs ("libforces.so"); patches ( carfront ); rhoInf 1.204; CofR (0 0 0); liftDir (0 0 1); dragDir (1 0 0); pitchAxis (0 0 0); magUInf 1.0; lRef 5; Aref 6; } }; Also, is it true that I can only include one patch? |
|
July 24, 2012, 05:20 |
|
#2 |
Senior Member
A_R
Join Date: Jun 2009
Posts: 122
Rep Power: 17 |
I think you should add something like this to your function lines
outputControl timeStep; outputInterval 10; |
|
July 24, 2012, 22:35 |
|
#3 |
New Member
Steven Chew
Join Date: Jul 2012
Posts: 4
Rep Power: 14 |
I tried, doesnt work
|
|
July 25, 2012, 01:05 |
|
#4 |
Senior Member
A_R
Join Date: Jun 2009
Posts: 122
Rep Power: 17 |
I used it for my project in OF2.1.1. it works, try it.
libs ( "libOpenFOAM.so" "libforces.so" ); functions { forces { type forces; functionObjectLibs ("libforces.so"); outputControl timeStep; outputInterval 10; patches (wall); pName p; UName U; rhoName rhoInf; log true; rhoInf 1; CofR (5 6 0.5); } forces1 { type forceCoeffs; functionObjectLibs ( "libforces.so" ); outputControl timeStep; outputInterval 10; patches ( wall ); pName p; UName U; rhoName rhoInf; log true; rhoInf 1; CofR ( 5 6 0.5 ); liftDir ( 0 1 0 ); dragDir ( 1 0 0 ); pitchAxis ( 0 0 1 ); magUInf 1; lRef 1; Aref 1; } } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ActuatorDiskExplicitForce in OF2.1. Help | be_inspired | OpenFOAM Programming & Development | 10 | September 14, 2018 12:12 |
Forces for airfoil test case | Martin_ | OpenFOAM Running, Solving & CFD | 1 | July 2, 2012 12:58 |
Forces and Coefficients | jferrari | OpenFOAM Running, Solving & CFD | 8 | June 13, 2012 07:23 |
using forces for geting drag and lift force magnitude? | 510_ | Main CFD Forum | 2 | October 28, 2010 12:42 |
Lift and Drag force coefficients | vkrastev | OpenFOAM | 0 | January 28, 2010 18:04 |