CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   reference area (https://www.cfd-online.com/Forums/openfoam/72666-reference-area.html)

andrea.pasquali February 13, 2010 07:53

reference area
 
Hi,
Is there in OF a code to calculate the frontal area "Aref" (for example the car frontal area) to calculate Cx and Cz using "forceCoeffs" function?

Thanks,
Andrea

andrea.pasquali February 14, 2010 09:33

liftDrag
 
Hello,
I found "liftDrag" application for OF1.4.
I try to compile it on my OF 1.6.x without success...
Does any version exist for OF1.6 or 1.6.x ?
Does this application calculate the frontal area "Aref" ?

Thanks for any help!

Andrea

louisgag May 5, 2010 10:41

Hi Andrea,

I am also looking for a way to easily calculate the frontal area of a complex 3D body. So far, it seems the only way to do it would be to sum the (area vectors dot the normal vector) on a whole physical surface and ignore negative values (to avoid having a zero total area!).

The code involved would look something like
Code:

mesh.Sf().boundaryField()
but I don't have time to do it at the moment.
and a loop like
Code:

forAllConstIter(labelHashSet, patchSet_, iter)
I'm just inspriring myself from the forces code....

Best regards,

-Louis

louisgag May 17, 2010 20:13

I have looked into it some more and here's the exact command that will give you the frontal area (in x-direction)...

Code:

Info << "***********" << ( sumMag(Sfb[patchi].component(vector::X))/2 ) << "***************" << endl;
I'll get back with an actualy utility for this if I find the time to make one,


-Louis

EDIT: that formula only works if the part has no concavity (ie: holes inside) because this would count areas that should not be counted...

bjornthe June 10, 2010 02:20

in the meantime, just do like this:
http://www.discretizer.org/node/20

Björn

louisgag August 4, 2010 16:55

thanks for this very useful link. Just a note, if your shape contains some concavities you need to select cells through (or actually skip the extract selection step) and then divide the final result by two.

Cheers,

-Louis

naveen August 5, 2010 04:31

reference area
 
hi louisgag,

Total area can be calculated using the liftdrag utility in OpenFOAM 1.4.1 by running liftDrag and put the same area at the end of controlDict of OpenFOAM 1.6....

Regards,

Naveen

louisgag August 5, 2010 13:00

Thanks Naveen.


All times are GMT -4. The time now is 07:54.