
[Sponsors] 
March 8, 2013, 05:26 
[OpenFOAM] Forces Calculation

#1 
Member
M
Join Date: Jul 2012
Posts: 33
Rep Power: 7 
Hello everyone,
I am realizing since few days the aerodynamic study of a building, in a flow (wind) at 100 km/h. I realized the same study with CFX. I want to finally compare the two results. The problem is that finally, with approximate the same mesh, the same turbulence model and same parameters, I don't obtain the same field of pressure on the surface of the building. So, I want to calculate the total pressure force which is on the building surface. Does a function exist in OpenFOAM which can realize this kind of calculation ? A kind of "F=sum(CellAera*scalar(p))" I tried putting "forces" key word and parameters in control dict, but it seemed not working, i don't know how to use it well. . .. Thanks by advance, Please ask question if I am not clear. m_f 

March 8, 2013, 14:43 

#2 
Member
Pengchuan Wang
Join Date: Nov 2012
Location: Michigan USA
Posts: 57
Rep Power: 6 
Hi m_f,
I'm new to OpenFOAM as well, so I don't know whether this will helps you. But you can try this. I use force library to calculate torque. Just add the following command in the controlDict file. functions ( forces_fixedWall (patch name, in my case is fixedwall) { type forces; functionObjectLibs ("libforces.so"); outputControl timeStep; outputInterval 1; (write torque output, I write every time step) patches (fixedWall); (patch name) // pname p; // Uname U; rhoName rhoInf; log true; rhoInf 798; (798 is the density of the fluid, you need to change it) CofR (0 0 0); } ) Again, I'm not sure whether this works, you can try it. Pengchuan 

March 9, 2013, 01:01 

#3 
Member
M
Join Date: Jul 2012
Posts: 33
Rep Power: 7 
Hi,
Thanks for your answer. I think I had already try this funtion, but I didn't use the same syntaxe...maybe that explain why it didn't work . Unfortunately, even if your function seems worked (I obtain some results during calculation), there is a big difference between the value given by OpenFOAM (with this function) and the value given CFX. CFX Forces (Xdirection) is around 2.5e+09 N OpenFOAM Forces (sum pressure + viscous) is around 1.89e+013 N. Update : My mistake, it was 2.1e+07 N for CFX Forces (XDirection), that's mean OpenFOAM Forces are 2 times bigger CFX Forces, I really don't understand . . . It is approximately the same mesh, the same parameters, so i can't explain this difference. Moreover, the two results are totally converged. So, is there others parameters to give to "forces function" of OpenFOAM, as Area or something else, which can give me betters results ? Thanks again for your last answer Last edited by m_f; March 11, 2013 at 09:24. 

March 12, 2013, 09:26 

#4 
Member
M
Join Date: Jul 2012
Posts: 33
Rep Power: 7 
Nobody has encounter this problem or can help me ?


March 12, 2013, 11:01 

#5 
Senior Member
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 265
Rep Power: 11 
hello,
I don't have encounter this problem before, but something is suspicious:  You get 2.1e+07 N with CFX.  You get 1.89e+013 N with openfoam, so there is a 1e6 factor. This is a too nice number for me. My inclination would be a mistake in the force calculation, with a viscosity factor, or even a mesh not in m, .... regards, olivier 

March 13, 2013, 04:18 

#6  
Member
M
Join Date: Jul 2012
Posts: 33
Rep Power: 7 
Quote:
But you make me in the doubt again, so I checked with another point of view. blockMeshDict is in meter, right ? I use CATIAV5R17 to export STL file, but CATIA works with mm. SnappyHexMesh need STL in meters by default ? I will checked with a 0.001 scale of my stl file. I was pretty sure that was a stupid mistake....! Edit : Problem solved ! Shame on me _, Thanks for your helped. . . I thought STL file was exported in meters by CATIA, not in mm. . . even if CATIA works in mm . . . 

January 13, 2015, 04:27 

#7 
Member
Emad Tandis
Join Date: Sep 2010
Posts: 32
Rep Power: 9 
hello
I have a same problem with studying lift for NACA0012 airfoil at 4 degree angle of attact. Re=3e6 and C=1 m and span=0.1, then I put this function in controlDict: forceCoeffs { type forceCoeffs; functionObjectLibs ( "libforces.so" ); outputControl timeStep; outputInterval 50; patches ("walls"); pName p; UName U; rhoName rhoInf; log true; liftDir (.0349 .9976 0); dragDir (.9976 .0349 0); CofR (0 0 0); pitchAxis (0 1 0); magUInf 30.00; rhoInf 1.00; lRef 1.00; Aref 0.1; } i used simplefoam to solve the case. and different sizes of mesh has been tested. and Cl is calculated 0.18. but I expect Cl~0.4 . what's the problem?? Last edited by EmadTandis; January 13, 2015 at 18:15. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Calculation of forces  sreekargomatam  FLUENT  0  July 13, 2011 12:43 
Forces calculation  fusij  OpenFOAM  4  October 29, 2010 11:38 
Forces viscous calculation in VWT with OpenFOAM 15x  terrybarnaby  OpenFOAM Running, Solving & CFD  0  November 28, 2008 09:39 
forces calculation  Chien  CFX  10  June 29, 2005 09:25 
Warning 097  AB  Siemens  6  November 15, 2004 05:41 