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

Obtaining Forces and Force Coefficients

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 23, 2012, 23:08
Default Obtaining Forces and Force Coefficients
  #1
New Member
 
Steven Chew
Join Date: Jul 2012
Posts: 4
Rep Power: 13
ShuToshio is on a distinguished road
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?
ShuToshio is offline   Reply With Quote

Old   July 24, 2012, 04:20
Default
  #2
Senior Member
 
niaz's Avatar
 
A_R
Join Date: Jun 2009
Posts: 122
Rep Power: 16
niaz is on a distinguished road
I think you should add something like this to your function lines
outputControl timeStep;
outputInterval 10;
niaz is offline   Reply With Quote

Old   July 24, 2012, 21:35
Default
  #3
New Member
 
Steven Chew
Join Date: Jul 2012
Posts: 4
Rep Power: 13
ShuToshio is on a distinguished road
I tried, doesnt work
ShuToshio is offline   Reply With Quote

Old   July 25, 2012, 00:05
Default
  #4
Senior Member
 
niaz's Avatar
 
A_R
Join Date: Jun 2009
Posts: 122
Rep Power: 16
niaz is on a distinguished road
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;
}

}
niaz 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
ActuatorDiskExplicitForce in OF2.1. Help be_inspired OpenFOAM Programming & Development 10 September 14, 2018 11:12
Forces for airfoil test case Martin_ OpenFOAM Running, Solving & CFD 1 July 2, 2012 11:58
Forces and Coefficients jferrari OpenFOAM Running, Solving & CFD 8 June 13, 2012 06:23
using forces for geting drag and lift force magnitude? 510_ Main CFD Forum 2 October 28, 2010 11:42
Lift and Drag force coefficients vkrastev OpenFOAM 0 January 28, 2010 17:04


All times are GMT -4. The time now is 08:28.