|
[Sponsors] |
August 28, 2018, 15:35 |
Lift and Drag are 0
|
#1 |
New Member
Join Date: Aug 2018
Posts: 2
Rep Power: 0 |
Hi, I converted a STL sphere into the Openfoam format using this guide (http://sourceflux.de/blog/preparing-geometry/).
I am using the simpleFoam solver and I'm trying to print out the coefficients of drag and lift. However, they are all returning 0. Here is my controlDict file: Code:
functions { #includeFunc streamlines forcesCoeffs { type forceCoeffs; functionObjectLibs ( "libforces.so" ); // lib to load writeControl timeStep; writeInterval 50; rho rhoInf; patches ( body // change to your patch name ); rhoInf 1000; log true; // dump to file CofR ( 0 0 0 ); liftDir ( 0 1 0 ); dragDir ( 1 0 0 ); pitchAxis ( 0 0 0 ); magUInf 9; lRef 1; Aref 0.1; } } This is the code in my fvSolution Code:
solvers { p { solver GAMG; tolerance 1e-06; relTol 0.1; smoother GaussSeidel; } "(U|k|epsilon|omega|f|v2)" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-05; relTol 0.1; } } SIMPLE { nNonOrthogonalCorrectors 0; consistent yes; pRefCell 0; pRefPoint 0; pRefValue 0; residualControl { p 1e-2; U 1e-3; "(k|epsilon|omega|f|v2)" 1e-3; } } relaxationFactors { equations { U 0.9; // 0.9 is more stable but 0.95 more convergent ".*" 0.9; // 0.9 is more stable but 0.95 more convergent } } |
|
August 30, 2018, 05:31 |
|
#2 |
Senior Member
Join Date: Mar 2014
Posts: 112
Rep Power: 12 |
as you see in controlDict;
"patches (body); ..." you have to use the defined wall(s) name(s) here instead of "body" |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calculation of lift and drag coefficients on airfoil | CoolHersheys | OpenFOAM Post-Processing | 5 | September 27, 2021 07:04 |
How to calculate lift, drag and lift distribution in Star CCM+? | israelcasillas94 | STAR-CCM+ | 4 | November 6, 2020 09:35 |
wrong SU2 calculation for lift and drag coefficient for NAC4421 | mechy | SU2 | 7 | January 9, 2017 06:18 |
[OpenFOAM] Display lift and Drag in paraview | SamerAli | ParaView | 1 | May 16, 2013 13:51 |
Correct lift but wrong pressure drag - possible? | zx | Main CFD Forum | 4 | July 28, 2007 00:38 |