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

Get inlet flow angle for computing lift and drag coefficients

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 30, 2015, 16:25
Default Get inlet flow angle for computing lift and drag coefficients
  #1
Member
 
Jack
Join Date: May 2015
Posts: 98
Rep Power: 11
Jack001 is on a distinguished road
My problem should be simple: The lift of an airfoil is always in the direction normal to the free stream, and drag is in the opposite direction. I need a way of automatically getting the direction of the free stream velocity vector that is specified in myCase/0/U and read this into my system/controlDict file which computes the coefficients below:

myLiftDirection= (-sin(alpha) cos(alpha) 0 )
myDragDirection= (cos(alpha) sin(alpha) 0)

where alpha is obtained from the boundary condition file of the inlet velocity.

Code:
forceCoeffs
{
type forceCoeffs;
functionObjectLibs ("libforces.so");
patches (fixedWall);
// pName p;
// UName U;
rhoName rhoInf;
rhoInf 1000;
CofR (0 0 0);
liftDir myLiftDirection;
dragDir myDragDirection;
pitchAxis (0 0 0);
magUInf 0.05; // Free stream velocity
lRef 0.3; // Diameter of cylinder?
Aref 0.0707; // Ref. Area = cross sectional area?
outputControl timeStep;
outputInterval 1;
}
Jack001 is offline   Reply With Quote

Reply

Tags
controldict, force coefficients, get values


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
wrong SU2 calculation for lift and drag coefficient for NAC4421 mechy SU2 7 January 9, 2017 06:18
Unsteady Flow past circular cylinder-Re=100 (fluctuating drag and lift co-efficients) Vino Main CFD Forum 0 April 10, 2014 10:39
Effect of turbulence of flow on lift and drag coefficients akku Main CFD Forum 1 April 9, 2013 02:12
Drag & lift coefficients for a velocity inlet BC tsi07 FLUENT 4 May 30, 2012 09:59
why lift coefficients don't converge at high angle of attacks? mingersai Main CFD Forum 13 January 13, 2012 16:38


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