
[Sponsors] 
August 6, 2009, 08:22 

#121 
Super Moderator
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 3,135
Rep Power: 32 
Hello,
I have one question regarding forces utility. I would like to monitor the forces on 3 bodies BUT separately. I'd like to have 3 monitorings. (I have a system and 3 different pistons > 3 different patches) Is it possible? Thanx a lot
__________________
In memory of my friend Hervé: CFD engineer & freerider 

August 7, 2009, 08:09 

#122 
Super Moderator
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 3,135
Rep Power: 32 
ok I just needed to add other forces functions...
forces_1 { type forces; functionObjectLibs ("libforces.so"); patches (A); rhoInf 870; CofR (0 0 0); } forces_2 { type forces; functionObjectLibs ("libforces.so"); patches (B); rhoInf 870; CofR (0 0 0); } forces_3 { type forces; functionObjectLibs ("libforces.so"); patches (C); rhoInf 870; CofR (0 0 0); }
__________________
In memory of my friend Hervé: CFD engineer & freerider 

August 28, 2009, 13:02 
OF1.6 forces error

#123 
Member
John
Join Date: Aug 2009
Posts: 93
Rep Power: 8 
Hi, I'm using OpenFOAM 1.6 and trying to calculate the forces on an airfoil. I have the following lines at the end of my controlDict file:
functions ( forces { type forces; functionObjectLibs ("libforces.so"); patches (patch6); rhoInf 1.225; CofR (0.15 0 0); } ); This is the error I get: keyword outputControl is undefined in dictionary "::functions::forces" Please help. Thanks. 

August 28, 2009, 14:28 

#124 
Member
John
Join Date: Aug 2009
Posts: 93
Rep Power: 8 
It works after adding the following lines :
outputControl timeStep; outputInterval 1; Last edited by nomad; August 28, 2009 at 15:47. 

September 1, 2009, 03:21 

#125 
Senior Member
Mads Reck
Join Date: Aug 2009
Location: Copenhagen, Denmark
Posts: 175
Rep Power: 9 
Hi.
Great thread, but I struggle a bit with getting forces out. What I can do: I can get tutorial nacaAirfoil to work (with sonicFoam)  this tutorial already has forceoutput setup in controlDict. Works great. What I can't do: If I try to add the forceoutput stuff from the abovementioned sonicFoamtutorial, into the simpleFoam tutorial airfoil2D, I get errors: > FOAM Warning : From function void forces::read(const dictionary& dict) in file forces/forces.C at line 277 Could not find U, p or rho in database. Deactivating forces. this seems to be something obvious (?) as velocities etc. would certainly be great to have available if OF is to compute forces and I am sure they are in there somewhere :) Help would be appreciated, thanks! /Mads 

September 1, 2009, 16:51 
incorrect forces on symmetric airfoil

#126 
Member
John
Join Date: Aug 2009
Posts: 93
Rep Power: 8 
Hi,
I'm trying to calculate forces on a symmetric airfoil. I've set lref to the chord length and Aref to the reference area based on the span (these have been converted from imperial to metric units). I also have two separate patches, one for the top surface and one for the lower surface. However, i get high Cl values (which should be zero) and Cd values that don't really make sense. here's my last time step: Time = 2 DILUPBiCG: Solving for Ux, Initial residual = 0.0209504, Final residual = 2.13957e07, No Iterations 9 DILUPBiCG: Solving for Uy, Initial residual = 0.0586488, Final residual = 3.39781e07, No Iterations 9 DILUPBiCG: Solving for Uz, Initial residual = 0.0873523, Final residual = 4.68623e07, No Iterations 9 DICPCG: Solving for p, Initial residual = 0.213432, Final residual = 9.62741e10, No Iterations 296 DICPCG: Solving for p, Initial residual = 0.368842, Final residual = 9.65877e10, No Iterations 284 DICPCG: Solving for p, Initial residual = 0.118823, Final residual = 9.0931e10, No Iterations 278 DICPCG: Solving for p, Initial residual = 0.0732968, Final residual = 9.25933e10, No Iterations 258 time step continuity errors : sum local = 6.07097e11, global = 5.91392e19, cumulative = 2.59606e18 smoothSolver: Solving for nuTilda, Initial residual = 0.0120958, Final residual = 0.00101485, No Iterations 2 ExecutionTime = 23.62 s ClockTime = 31 s forces output: forces(pressure, viscous)((8026.46 0 0) (11.1053 7.92581 8.84242)) moment(pressure, viscous)((0 10186.1 112963) (974.88 3443.99 426.025)) forces output: forces(pressure, viscous)((1910.11 0 0) (1.60656 0.792914 21.378)) moment(pressure, viscous)((0 2420.21 39146.1) (301.654 1457.53 38.3032)) forceCoeffs output: Cd = 1308.63 Cl = 1.29401 Cm = 0 forceCoeffs output: Cd = 12267.4 Cl = 5.09667 Cm = 0 End Any help would be highly appreciated. Thanks. 

September 2, 2009, 01:19 

#127 
Senior Member
Mads Reck
Join Date: Aug 2009
Location: Copenhagen, Denmark
Posts: 175
Rep Power: 9 
Hi Nomad.
I am running OF1.6.x and am trying to get this to work with simpleFoam and pisoFoam  what solver/version are you running (so I can verify that this will work under simpleFoam/pisoFoam)? /Mads
__________________
Online free airfoilmesher for OpenFOAM here 

September 2, 2009, 14:22 

#128 
Member
John
Join Date: Aug 2009
Posts: 93
Rep Power: 8 
Hey,
I'm running OpenFOAM 1.6. The flow looks reasonable around a symmetric airfoil, but Cl and Cd values are just wrong. Also, solutions don't converge for angled airfoils (5 degrees). I'm running at low Re numbers, although I have turbulence turned on. I'm guessing my mesh is just crappy, I use NGSolve and gmsh to generate and refine tet meshes. 

September 3, 2009, 02:47 

#129 
Senior Member
Mads Reck
Join Date: Aug 2009
Location: Copenhagen, Denmark
Posts: 175
Rep Power: 9 
Okay, so you are running simpleFoam or pisoFoam? I'm just trying to narrow down my problem  and if you can get forces out under simple/pisoFoam, I guess I should be able to do so also.
With regards to your problem, just from the top of my head: tetcells and forces on walls easily result in wrong results, as you also imply. If your lift is ydirected then your yforces obviously should be zero (for flow parallel to your symmetric airfoil). It seems that your ypressureforces indeed are zero, but the viscous ones aren't  this emphasises our suspicion that there is some unfortunate resolution of the cells adjacent to the wall. Maybe you could insert some prismlayers? Or better yet (given this simple, yet hardtosolve, geometry): go completely hex. /Mads
__________________
Online free airfoilmesher for OpenFOAM here 

September 3, 2009, 20:42 

#130 
Member
John
Join Date: Aug 2009
Posts: 93
Rep Power: 8 
I'm using SimpleFoam, here's my controlDict file:
/** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 1.6   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application simpleFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 0.05; deltaT 0.001; writeControl timeStep; writeInterval 1; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; runTimeModifiable yes; functions { forces_1 { type forces; functionObjectLibs ("libforces.so"); log yes; outputControl timeStep; outputInterval 1; patches (patch6); rhoInf 1.225; CofR (0 0 0); } forces_2 { type forces; functionObjectLibs ("libforces.so"); log yes; outputControl timeStep; outputInterval 1; patches (patch7); rhoInf 1.225; CofR (0 0 0); } forceCoeffs_1 { type forceCoeffs; functionObjectLibs ("libforces.so"); log yes; outputControl timeStep; outputInterval 1; patches (patch6); rhoInf 1.225; CofR (0 0 0); liftDir (0 1 0); dragDir (1 0 0); pitchAxis (0 0 0); magUInf 50; lRef 1; Aref 0.1; } forceCoeffs_2 { type forceCoeffs; functionObjectLibs ("libforces.so"); log yes; outputControl timeStep; outputInterval 1; patches (patch7); rhoInf 1.225; CofR (0 0 0); liftDir (0 1 0); dragDir (1 0 0); pitchAxis (0 0 0); magUInf 50; lRef 1; Aref 0.1; writePrecision 3; } }; Also, I'm using NGSolve and gmsh and I'm not sure they do tets, hex, or prisms in the same mesh. You can pick either and then refine it near the walls. 

September 4, 2009, 02:30 

#131 
Senior Member
Mads Reck
Join Date: Aug 2009
Location: Copenhagen, Denmark
Posts: 175
Rep Power: 9 
Thannks nomad.
Just to wrap up on my question. This thread provides the answer. If you are running OpenFOAM1.6, as I am, the entry rhoName rhoInf; is needed in the forces section of the controlDict. /Mads
__________________
Online free airfoilmesher for OpenFOAM here 

September 6, 2009, 04:51 

#132 
Member
toto
Join Date: Jun 2009
Posts: 71
Rep Power: 9 
please could you tell me! What is
magUInf 55.5; lRef 0.6; Aref 1; Tanks 

September 6, 2009, 05:51 

#133 
Member
John
Join Date: Aug 2009
Posts: 93
Rep Power: 8 
magUInf 55.5  freestream velocity
lRef 0.6  chord length of airfoil or diameter of cylinder Aref 1  surface area, or chord*span 

September 6, 2009, 07:07 

#134 
Member
toto
Join Date: Jun 2009
Posts: 71
Rep Power: 9 
Thank you nomad!
please I would like to monitor the friction forces ( X Direction: Vector(1,0,0) in case "Flow Around a Cylinder 2D". Any help would be highly appreciated. Thanks. 

September 7, 2009, 07:45 
forcesCoeffs

#135 
Member
toto
Join Date: Jun 2009
Posts: 71
Rep Power: 9 
Thank you nomad!
I used the source code from aboveto monitor the forcesCoffs and I can understand why the drag should be so higher and the lift negative (output below). I set it as follow: CofR (0.08 0.055 0);// Cylinderorigin liftDir (0 1 0); dragDir (1 0 0); pitchAxis (0 0.08 0);// Axis across the Cylinder magUInf 2;// equal =Inlet_Velocity=2m/s lRef 1; output Time = 1.0172 Cm = 0Courant Number mean: 0.000625676 max: 0.0181103 DILUPBiCG: Solving for Ux, Initial residual = 9.29756e05, Final residual = 1.43061e11, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.000133566, Final residual = 3.20209e11, No Iterations 1 DICPCG: Solving for p, Initial residual = 0.00116615, Final residual = 9.66575e07, No Iterations 50 DICPCG: Solving for p, Initial residual = 2.41027e05, Final residual = 9.31728e07, No Iterations 6 DICPCG: Solving for p, Initial residual = 1.72683e06, Final residual = 6.66295e07, No Iterations 1 DICPCG: Solving for p, Initial residual = 6.8258e07, Final residual = 6.8258e07, No Iterations 0 time step continuity errors : sum local = 1.55452e14, global = 8.96216e16, cumulative = 1.36155e14 DICPCG: Solving for p, Initial residual = 8.42778e07, Final residual = 8.42778e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 8.42778e07, Final residual = 8.42778e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 8.42778e07, Final residual = 8.42778e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 8.42778e07, Final residual = 8.42778e07, No Iterations 0 time step continuity errors : sum local = 1.91935e14, global =  8.9659e16, cumulative = 1.27189e14 ExecutionTime = 117.44 s ClockTime = 120 s forces output: forces(pressure, viscous)((1.66969 1.40143 1.61795e19) (0.384086 0.000228929 2.21498e22)) moment(pressure, viscous)((3.67135e19 1.16523e17 111.911) (9.2515e22 1.8447e20 0.000382369)) forceCoeffs output: Cd = 83.8275 Cl = 57.2107 I would like to no what i did Wrong! Could someone please help me! It is very important Thanks 

September 7, 2009, 15:37 

#136  
Member
Paulo Alexandre Costa Rocha
Join Date: Mar 2009
Posts: 71
Rep Power: 9 
Hi Nomad,
Let me give my two cents:  At a first glance, your problem seems like it has not converged yet. The residuals are still high; Quote:
Quote:
The non zero sum of the viscous forces are apparently due to the non converged solution (boundary layer not yet solved). Try to follow the results until they don't change in a small range. Hope that helps. Best Regards, Paulo Rocha. 

September 8, 2009, 04:30 

#137 
Member
toto
Join Date: Jun 2009
Posts: 71
Rep Power: 9 
Thank you Paulo!
I have followed the results until they don't change in a small range and post it here. The forces Coefficient are still so high! (I need Help) Time = 2.4164 Cl = 0.165625Courant Number mean: 0.000625962 max: 0.018118 DILUPBiCG: Solving for Ux, Initial residual = 8.58266e05, Final residual = 5.68787e12, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.000135717, Final residual = 1.58934e11, No Iterations 1 DICPCG: Solving for p, Initial residual = 0.000318544, Final residual = 2.92359e06, No Iterations 10 DICPCG: Solving for p, Initial residual = 6.1916e06, Final residual = 9.84286e07, No Iterations 47 DICPCG: Solving for p, Initial residual = 1.54247e06, Final residual = 7.8343e07, No Iterations 1 DICPCG: Solving for p, Initial residual = 7.89665e07, Final residual = 7.89665e07, No Iterations 0 time step continuity errors : sum local = 8.41203e15, global = 1.5953e15, cumulative = 1.07022e10 DICPCG: Solving for p, Initial residual = 8.12457e07, Final residual = 8.12457e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 8.12457e07, Final residual = 8.12457e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 8.12457e07, Final residual = 8.12457e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 8.12457e07, Final residual = 8.12457e07, No Iterations 0 time step continuity errors : sum local = 8.65482e15, global = 1.59517e15, cumulative = 1.0702e10 ExecutionTime = 25803.5 s ClockTime = 77443 s forces output: forces(pressure, viscous)((3.36771 0.00561273 9.48494e20) (0.365782 2.56185e05 1.76796e22)) moment(pressure, viscous)((3.44194e19 8.53456e18 0.263345) (8.875e22 1.48343e20 0.0157597)) forceCoeffs output: Cd = 152.388 Cl = 0.230137 Cm = 1.91412e17 Time = 2.4166 Courant Number mean: 0.000625962 max: 0.0181183 DILUPBiCG: Solving for Ux, Initial residual = 8.58272e05, Final residual = 5.68766e12, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.000135717, Final residual = 1.5893e11, No Iterations 1 DICPCG: Solving for p, Initial residual = 0.000307771, Final residual = 3.04239e06, No Iterations 14 DICPCG: Solving for p, Initial residual = 5.71835e06, Final residual = 9.44935e07, No Iterations 174 DICPCG: Solving for p, Initial residual = 1.83437e06, Final residual = 8.73055e07, No Iterations 1 DICPCG: Solving for p, Initial residual = 8.84112e07, Final residual = 8.84112e07, No Iterations 0 time step continuity errors : sum local = 9.41649e15, global = 2.7658e16, cumulative = 1.0702e10 DICPCG: Solving for p, Initial residual = 8.94637e07, Final residual = 8.94637e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 8.94637e07, Final residual = 8.94637e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 8.94637e07, Final residual = 8.94637e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 8.94637e07, Final residual = 8.94637e07, No Iterations 0 time step continuity errors : sum local = 9.5286e15, global = 2.7731e16, cumulative = 1.07021e10 ExecutionTime = 25806.4 s ClockTime = 77452 s forces output: forces(pressure, viscous)((3.37787 0.0101397 9.47906e20) (0.365779 2.56295e05 1.76913e22)) moment(pressure, viscous)((3.4472e19 8.52938e18 0.624579) (8.87876e22 1.48437e20 0.0157587)) forceCoeffs output: Cd = 152.802 Cl = 0.41491 Cm = 1.91296e17 Time = 2.4168 Courant Number mean: 0.000625962 max: 0.0181186 DILUPBiCG: Solving for Ux, Initial residual = 8.58271e05, Final residual = 5.68736e12, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.000135717, Final residual = 1.58931e11, No Iterations 1 DICPCG: Solving for p, Initial residual = 0.000308555, Final residual = 2.98446e06, No Iterations 6 DICPCG: Solving for p, Initial residual = 5.6599e06, Final residual = 9.87842e07, No Iterations 193 DICPCG: Solving for p, Initial residual = 1.97131e06, Final residual = 8.93472e07, No Iterations 1 DICPCG: Solving for p, Initial residual = 9.0792e07, Final residual = 9.0792e07, No Iterations 0 time step continuity errors : sum local = 9.67148e15, global = 1.15687e16, cumulative = 1.07021e10 DICPCG: Solving for p, Initial residual = 9.19959e07, Final residual = 9.19959e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 9.19959e07, Final residual = 9.19959e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 9.19959e07, Final residual = 9.19959e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 9.19959e07, Final residual = 9.19959e07, No Iterations 0 time step continuity errors : sum local = 9.79972e15, global = 1.14472e16, cumulative = 1.07021e10 ExecutionTime = 25809.3 s ClockTime = 77462 s forces output: forces(pressure, viscous)((3.36459 0.00234243 9.49148e20) (0.365777 2.56403e05 1.76832e22)) moment(pressure, viscous)((3.41853e19 8.54044e18 0.00215479) (8.87561e22 1.48373e20 0.0157578)) forceCoeffs output: Cd = 152.26 Cl = 0.0966561 Cm = 1.91544e17 Time = 2.417 Courant Number mean: 0.000625962 max: 0.018119 DILUPBiCG: Solving for Ux, Initial residual = 8.58282e05, Final residual = 5.68722e12, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.000135717, Final residual = 1.58931e11, No Iterations 1 DICPCG: Solving for p, Initial residual = 0.000315884, Final residual = 2.95918e06, No Iterations 8 DICPCG: Solving for p, Initial residual = 6.17492e06, Final residual = 9.82022e07, No Iterations 76 DICPCG: Solving for p, Initial residual = 1.57902e06, Final residual = 7.6317e07, No Iterations 1 DICPCG: Solving for p, Initial residual = 7.70554e07, Final residual = 7.70554e07, No Iterations 0 time step continuity errors : sum local = 8.20779e15, global = 9.71976e16, cumulative = 1.0702e10 DICPCG: Solving for p, Initial residual = 7.8575e07, Final residual = 7.8575e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 7.8575e07, Final residual = 7.8575e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 7.8575e07, Final residual = 7.8575e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 7.8575e07, Final residual = 7.8575e07, No Iterations 0 time step continuity errors : sum local = 8.36965e15, global = 9.71832e16, cumulative = 1.07019e10 ExecutionTime = 25811 s ClockTime = 77468 s forces output: forces(pressure, viscous)((3.37494 0.0119856 9.47646e20) (0.365774 2.56513e05 1.76846e22)) moment(pressure, viscous)((3.43041e19 8.5271e18 0.772271) (8.87594e22 1.48385e20 0.0157568)) forceCoeffs output: Cd = 152.682 Cl = 0.490257 Cm = 1.91245e17 Time = 2.4172 Courant Number mean: 0.000625962 max: 0.0181193 DILUPBiCG: Solving for Ux, Initial residual = 8.58281e05, Final residual = 5.68692e12, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.000135718, Final residual = 1.58931e11, No Iterations 1 DICPCG: Solving for p, Initial residual = 0.000308469, Final residual = 2.89403e06, No Iterations 6 DICPCG: Solving for p, Initial residual = 5.61796e06, Final residual = 9.72727e07, No Iterations 52 DICPCG: Solving for p, Initial residual = 1.42823e06, Final residual = 6.66354e07, No Iterations 1 DICPCG: Solving for p, Initial residual = 6.7216e07, Final residual = 6.7216e07, No Iterations 0 time step continuity errors : sum local = 7.1595e15, global = 1.21748e15, cumulative = 1.07018e10 DICPCG: Solving for p, Initial residual = 6.85686e07, Final residual = 6.85686e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 6.85686e07, Final residual = 6.85686e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 6.85686e07, Final residual = 6.85686e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 6.85686e07, Final residual = 6.85686e07, No Iterations 0 time step continuity errors : sum local = 7.30358e15, global = 1.21697e15, cumulative = 1.07017e10 ExecutionTime = 25812.6 s ClockTime = 77472 s forces output: forces(pressure, viscous)((3.37343 0.00605809 9.48554e20) (0.365771 2.56622e05 1.76854e22)) moment(pressure, viscous)((3.41449e19 8.5356e18 0.298624) (8.87587e22 1.48391e20 0.0157559)) forceCoeffs output: Cd = 152.621 Cl = 0.248316 Cm = 1.91435e17 Time = 2.4174 Courant Number mean: 0.000625962 max: 0.0181196 DILUPBiCG: Solving for Ux, Initial residual = 8.58283e05, Final residual = 5.68666e12, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.000135718, Final residual = 1.58931e11, No Iterations 1 DICPCG: Solving for p, Initial residual = 0.000310674, Final residual = 2.96383e06, No Iterations 6 DICPCG: Solving for p, Initial residual = 5.80902e06, Final residual = 9.64652e07, No Iterations 179 DICPCG: Solving for p, Initial residual = 1.91265e06, Final residual = 8.68626e07, No Iterations 1 DICPCG: Solving for p, Initial residual = 8.80374e07, Final residual = 8.80374e07, No Iterations 0 time step continuity errors : sum local = 9.37581e15, global = 7.32662e17, cumulative = 1.07017e10 DICPCG: Solving for p, Initial residual = 8.93729e07, Final residual = 8.93729e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 8.93729e07, Final residual = 8.93729e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 8.93729e07, Final residual = 8.93729e07, No Iterations 0 DICPCG: Solving for p, Initial residual = 8.93729e07, Final residual = 8.93729e07, No Iterations 0 time step continuity errors : sum local = 9.51804e15, global = 7.31233e17, cumulative = 1.07016e10 ExecutionTime = 25815.3 s ClockTime = 77481 s forces output: forces(pressure, viscous)((3.36891 0.00403213 9.48363e20) (0.365769 2.56731e05 1.7698e22)) moment(pressure, viscous)((3.40287e19 8.53412e18 0.136958) (8.8798e22 1.48492e20 0.0157549)) forceCoeffs output: Cd = 152.436 Why are the focesCoefficient still so high? please could someone help me? It´s very important. Last edited by ronaldo; September 9, 2009 at 04:56. 

November 11, 2009, 09:02 

#138 
New Member
Milos Stanic
Join Date: Mar 2009
Location: Novi Sad, Serbia
Posts: 29
Rep Power: 9 
Hello to everyone!
I'm using simpleFoam in OF 1.6 for some ship hull calculations and I really need either drag coeffs or forces. I tried following the instructions from this thread, but no success. I noticed that most of people here are using this forceCoeffs for airfoils (compressible flow?), so what should I change in order to get the forces for simpleFoam solver? When I try to start my simulation it finishes up like this: student@CFD:~/OpenFOAM/Projekti/cilindar$ simpleFoam >log keyword outputControl is undefined in dictionary "::functions::forces" file: ::functions::forces from line 52 to line 56. From function dictionary::lookupEntry(const word&, bool, bool) const in file db/dictionary/dictionary.C at line 388. FOAM exiting Thnx a million! 

November 11, 2009, 10:44 
outputControl

#139 
Member
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 49
Rep Power: 9 
Hi milos,
try something like this: functions ( forces { type forces; functionObjectLibs ("libforces.so"); //outputControl outputTime; outputControl timeStep; outputInterval 1; patches (SHIP); rhoInf 1025; CofR (0 0 0); } ); Good luck! Pascal. 

November 12, 2009, 05:00 

#140 
New Member
Milos Stanic
Join Date: Mar 2009
Location: Novi Sad, Serbia
Posts: 29
Rep Power: 9 
It worked Pascal, simulation has started normally. Thanks a lot! However, there are few more details that I would like to know.
1.  How do I plot the forces? Gnuplot command doesn't work... 3.  What are the units (I see in the .dat file that the numbers are way too huge to be Newtons)? 2.  Fundamentally, where's the catch? Thanks once more. Milos Last edited by milos; November 12, 2009 at 07:50. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Fan type BC in OF15  hsieh  OpenFOAM Running, Solving & CFD  31  July 30, 2015 12:22 
Bug in patchIntegrateC OF15  anger  OpenFOAM Bugs  8  May 29, 2009 04:36 
CoupledFvScalarMatrix in OF15  fisher  OpenFOAM Running, Solving & CFD  8  November 29, 2008 08:36 
OpenFOAMdev migration to OF15  fisher  OpenFOAM Installation  1  November 25, 2008 15:39 
Bug or a feature of OF15  rafal  OpenFOAM Bugs  5  July 25, 2008 05:25 