# How does libforces.so work? Forces and Coefficients

 Register Blogs Members List Search Today's Posts Mark Forums Read

 August 1, 2013, 11:09 How does libforces.so work? Forces and Coefficients #1 Member   Join Date: Jul 2013 Posts: 85 Rep Power: 12 Hello; I am just trying to understand how OpenFOAM works and I started with the calculation of Forces and Drag and Lift coefficients, which is pretty common thing, I guess. When I set up a case in Fluent, I plot the drag and lift coefficients, but I "cheat" the software, so to speak, changing the Reference values so that the Coefficient is the same as the force and I can monitor directly the forces easily. So I tried the same in OpenFOAM, changing the Rho=1, lref=1, Aref=2 and so on, and even if the results are really close regarding the number, the exponent doesn't fit, so I am wondering if I have done some kind of mistake in another simulations... The difference is 1000, so... What I got: Cd 9.61567598E-08 Fx 9.598367763E-05 Cl 4.250502218E-10 Fy 4.2428513135E-07 Let's see if someone has ever thought about it

 August 1, 2013, 11:43 #2 Senior Member     Artur Join Date: May 2013 Location: Southampton, UK Posts: 372 Rep Power: 20 Depending on the solver you are using, the rhoInf might not be used by the calculator but rather you will be shown force/unit density (calculated from the pressure/density) if I am not mistaken. So if you are, for instance, using simple algorithm for an incompressible fluid then that could explain the difference.

 August 2, 2013, 02:39 #3 Member   Join Date: Jul 2013 Posts: 85 Rep Power: 12 Well, since the fluid that I am using is water, I have thought about that, but the results that I have from a previous calculation seem to fit perfectly with those that I got in Fluent, which are for sure in Newtons. Code: ``` Pressure Forces Viscous Forces --------------------------------------------- --------------------------------------------- CALCULATED WITH FLUENT (7.1568559e-07 -2.1600499e-12 -4.6092907e-11) (1.0075142e-06 6.5814021e-13 6.7834627e-12) AFTER 10000 ITERATIONS WITH OPENFOAM (7.4138412e-07 -1.54826353-12 -4.8549109e-11) (1.0146894e-06 6.8149384e-13 -4.520761e-11)``` The only difference between the cases, is that in the one that fits I set up a laminar flow, and in the other one I set it up with the Spalart-Almaras... But in both cases the solver was "simpleFoam", so, something doesn't make too much sense here... I hope that OpenFOAM gives the results in the same units, whichever they are!!!