CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

2D cylinder drag coefficient

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2016, 08:36
Default 2D cylinder drag coefficient
  #1
New Member
 
Michal
Join Date: Mar 2016
Posts: 5
Rep Power: 10
miku11 is on a distinguished road
Hello,
I'm a new user of openfoam and i'm just started my journey with cfd, so my questions might be easy to solve, but i need some help.
I'm trying to validate 2D flow around cylinder and find Drag coefficient. I selected case for Re=1, so Cd should be around 10. Unfortunately i obtained value about 4. I used k omegaSST turbulence model.

I set nu to value 10, because radius of my cylinder is 0.5 m and flow velocity is 20 m/s, so nu should be equal to 10.
I'm not sure about my boundary conditions k and omega:

The problem is, that drag coefficient decrease in every time step
k
Quote:
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0.01;

boundaryField
{
inlet
{
type fixedValue;
value uniform 0.01;
}
outlet
{
type zeroGradient;
}
wall1
{
type zeroGradient;
}
wall2
{
type zeroGradient;
}
ball
{
type zeroGradient;
}
frontAndBackPlanes
{
type empty;
}
}
and omega

Quote:
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object omega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 -1 0 0 0 0];

internalField uniform 0.01;

boundaryField
{
inlet
{
type fixedValue;
inletValue $internalField;
value $internalField;
}
outlet
{
type zeroGradient;
}
wall1
{
type zeroGradient;
}
wall2
{
type zeroGradient;
}
frontAndBackPlanes
{
type empty;
}
ball
{
type omegaWallFunction;
value $internalField;
}
}
Here is my case:
Quote:
FoamFile
{
version 2.0;
format binary;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application simpleFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 4200;

deltaT 20;

writeControl timeStep;

writeInterval 10;

purgeWrite 0;

writeFormat binary;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

libs
(
"libforces.so"
);


functions
{
forceCoeffs1
{
type forceCoeffs;

functionObjectLibs ( "libforces.so" );

outputControl timeStep;
timeInterval 1;

log yes;

patches ( ball );
rhoName rhoInf; // Indicates incompressible
rhoInf 1; // Redundant for incompressible
liftDir (0 0 1);
dragDir (1 0 0);
CofR (0 0 0); // Axle midpoint on ground
pitchAxis (0 1 0);
magUInf 20;
lRef 1; // Wheelbase length
Aref 1; // Estimated

}
}
turbulenceProperties:

Quote:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
RAS
{
RASModel kOmegaSST;
turbulence on;
printCoeffs on;
}
Log:
Quote:
smoothSolver: Solving for Ux, Initial residual = 0.000681436, Final residual = 6.04267e-05, No Iterations 12
smoothSolver: Solving for Uy, Initial residual = 0.000724218, Final residual = 6.40965e-05, No Iterations 12
GAMG: Solving for p, Initial residual = 0.000794664, Final residual = 6.97221e-06, No Iterations 8
time step continuity errors : sum local = 7.36926e-05, global = 7.0562e-07, cumulative = 0.0159493
smoothSolver: Solving for omega, Initial residual = 5.51651e-07, Final residual = 4.08989e-08, No Iterations 4
smoothSolver: Solving for k, Initial residual = 0.00124186, Final residual = 0.000112596, No Iterations 3
ExecutionTime = 166.94 s ClockTime = 167 s

forceCoeffs forceCoeffs1 output:
Cm = 3.18034e-21
Cd = 3.91579
Cl = -7.41775e-21
Cl(f) = -5.28535e-22
Cl(r) = -6.88922e-21

Time = 4160

smoothSolver: Solving for Ux, Initial residual = 0.000678821, Final residual = 6.01967e-05, No Iterations 12
smoothSolver: Solving for Uy, Initial residual = 0.000721321, Final residual = 6.38416e-05, No Iterations 12
GAMG: Solving for p, Initial residual = 0.000792302, Final residual = 6.67782e-06, No Iterations 8
time step continuity errors : sum local = 7.03966e-05, global = 6.78587e-07, cumulative = 0.01595
smoothSolver: Solving for omega, Initial residual = 5.46691e-07, Final residual = 4.06206e-08, No Iterations 4
smoothSolver: Solving for k, Initial residual = 0.00123355, Final residual = 0.000112172, No Iterations 3
ExecutionTime = 167.71 s ClockTime = 168 s

forceCoeffs forceCoeffs1 output:
Cm = 3.17389e-21
Cd = 3.90818
Cl = -7.39271e-21
Cl(f) = -5.22465e-22
Cl(r) = -6.87024e-21

Time = 4180

smoothSolver: Solving for Ux, Initial residual = 0.000676188, Final residual = 5.99651e-05, No Iterations 12
smoothSolver: Solving for Uy, Initial residual = 0.000718458, Final residual = 6.35896e-05, No Iterations 12
GAMG: Solving for p, Initial residual = 0.000788874, Final residual = 6.90003e-06, No Iterations 8
time step continuity errors : sum local = 7.25486e-05, global = 6.91636e-07, cumulative = 0.0159507
smoothSolver: Solving for omega, Initial residual = 5.41841e-07, Final residual = 4.0346e-08, No Iterations 4
smoothSolver: Solving for k, Initial residual = 0.00122535, Final residual = 0.000111751, No Iterations 3
ExecutionTime = 168.48 s ClockTime = 169 s

forceCoeffs forceCoeffs1 output:
Cm = 3.16754e-21
Cd = 3.90062
Cl = -7.36866e-21
Cl(f) = -5.16788e-22
Cl(r) = -6.85187e-21

Time = 4200

smoothSolver: Solving for Ux, Initial residual = 0.000673624, Final residual = 5.97395e-05, No Iterations 12
smoothSolver: Solving for Uy, Initial residual = 0.00071561, Final residual = 6.3339e-05, No Iterations 12
GAMG: Solving for p, Initial residual = 0.000786379, Final residual = 6.61115e-06, No Iterations 8
time step continuity errors : sum local = 6.93323e-05, global = 6.64381e-07, cumulative = 0.0159513
smoothSolver: Solving for omega, Initial residual = 5.37108e-07, Final residual = 4.00752e-08, No Iterations 4
smoothSolver: Solving for k, Initial residual = 0.00121725, Final residual = 0.000111333, No Iterations 3
ExecutionTime = 169.29 s ClockTime = 170 s

forceCoeffs forceCoeffs1 output:
Cm = 3.16115e-21
Cd = 3.89311
Cl = -7.34413e-21
Cl(f) = -5.10912e-22
Cl(r) = -6.83321e-21

End
I attached some pictures for velocity around ball (after 200, 2000 and 4000 iterations). As you can see after 4000 there is a high range of low velocity close to the cylinder.
Doy you have any ideas how to improve this simulation
Attached Images
File Type: png 200.png (62.5 KB, 14 views)
File Type: png 2000.png (65.0 KB, 10 views)
File Type: png 4000.png (70.7 KB, 13 views)
miku11 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to calculate drag force coefficient of cylinder in oscillating flow vhcongtltd FLUENT 10 September 25, 2014 05:59
How to calculate the drag coefficient for flow past cylinder o_mars_2010 Tecplot 0 April 18, 2013 02:26
problem with saving drag coefficient colopolo FLUENT 5 April 12, 2013 11:59
Drag Coefficient of an Elliptical Cylinder San Jose Main CFD Forum 0 July 6, 2008 14:26
drag and lift coefficient of compressible cylinder Bin Li Main CFD Forum 1 March 7, 2004 10:49


All times are GMT -4. The time now is 02:42.