CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Incorrect Drag and Drag Coefficient for flow over a cylinder (http://www.cfd-online.com/Forums/main/77629-incorrect-drag-drag-coefficient-flow-over-cylinder.html)

ozzythewise June 29, 2010 09:05

Incorrect Drag and Drag Coefficient for flow over a cylinder
 
Hello all,

I've been struggling with this for a while and I'm hoping that somebody here can give me a hand with it. I'm trying to simulate flow over a cylinder and compare that to past numerical studies to see if I am simulating correctly. Initially I am just checking to see if drag forces and drag coefficients match up to theoretical and numerical simulations. From past results I see that for what I have I should be getting a drag force of about 6.57e-7N and a drag coefficient of about 1. I am getting a drag force of 1.5e-7 (pressure force only) and a drag coefficient of about 2.63. Here are some details about my simulation

- Simulating air at Re=100 (flow velocity = 7.834e-4m/s to give that Re)
- 2D simulation of cylinder with 1m radius (z-direction has length of 0.1m)
- total control volume size is (217.77, 41.97) with cylinder at (41.97, 0)- symmetry plane along x-axis
- total mesh size is (379, 73) with grading all towards the cylinder
- total simulation time is 100 000s to give ~40 flow cycles over the body
- I am using RAS turbulent model with k-epsilon model
- Below is my U, p, nut, k and epsilon 0 files as well as my controlDict file to show how I am printing out forces and forcecoeffs:

U:
boundaryField
{
inlet
{
type freestream;
freestreamValue uniform (7.834e-4 0 0);
}
backOutlet
{
type freestream;
freestreamValue uniform (7.834e-4 0 0);
}
cylinder
{
type fixedValue;
value uniform (0 0 0);
}
frontAndBack
{
type empty;
}
topOutlet
{
type freestream;
freestreamValue uniform (7.834e-4 0 0);
}
bottomOutlet
{
type symmetryPlane;
}

p:
dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{

inlet
{
type freestreamPressure;
}
backOutlet
{
type freestreamPressure;
}
cylinder
{
type zeroGradient;
}

frontAndBack
{
type empty;
}
topOutlet
{
type freestreamPressure;
}
bottomOutlet
{
type symmetryPlane;
}

}

nut:
dimensions [0 2 -1 0 0 0 0];

internalField uniform 6.089e-4; //nut = C*k^2/epsilon where C = 0.09

boundaryField
{
inlet
{
type freestream;
freestreamValue uniform 6.089e-4;
}

backOutlet
{
type freestream;
freestreamValue uniform 6.089e-4;
}

cylinder
{
type nutWallFunction;
value uniform 0;
}
topOutlet
{
type freestream;
freestreamValue uniform 6.089e-4;
}
bottomOutlet
{
type symmetryPlane;
}
frontAndBack
{
type empty;
}
}

k:
dimensions [0 2 -2 0 0 0 0];

internalField uniform 3.069e-7;

boundaryField
{
inlet
{
type freestream;
freestreamValue uniform 3.069e-7;
}
backOutlet
{
type freestream;
freestreamValue uniform 3.069e-7;
}
cylinder
{
type kqRWallFunction;
value uniform 0;
}
topOutlet
{
type freestream;
freestreamValue uniform 3.069e-7;
}
bottomOutlet
{
type symmetryPlane;
}
frontAndBack
{
type empty;
}
}

epsilon:
dimensions [0 2 -3 0 0 0 0];

internalField uniform 1.4e-11; //epsilon = C^0.75*k^1.5/l where C = 0.09 and l = characteristic length

boundaryField
{
inlet
{
type freestream;
freestreamValue uniform 1.4e-11;
}
backOutlet
{
type freestream;
freestreamValue uniform 1.4e-11;
}
cylinder
{
type epsilonWallFunction;
value uniform 0;
}
topOutlet
{
type freestream;
freestreamValue uniform 1.4e-11;
}
bottomOutlet
{
type symmetryPlane;
}
frontAndBack
{
type empty;
}
}

controlDict:
application simpleFoam; //steady-state solver for incompressible, turbulent flow

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 100000; //~40 revolutions

deltaT 5;

writeControl adjustableRunTime;

writeInterval 1000;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression uncompressed;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;

adjustTimeStep yes;

maxCo 0.5;

maxDeltaT 1.5;

functions
(
forces
{
type forces;
functionObjectLibs ("libforces.so");
patches (cylinder);
rhoName rhoInf;
rhoInf 1.2;
CofR (0 0 0);
outputControl outputTime;
outputInverval 1;

}
forcesCoeffs
{
type forceCoeffs;
functionObjectLibs ( "libforces.so" ); // lib to load
outputControl timeStep;
outputInterval 1;
patches
(
cylinder // change to your patch name
);
// name of fields
pName p;
UName U;
rhoName rhoInf;
log true; // dump to file
rhoInf 1.2;
CofR ( 0 0 0 );
liftDir ( 0 1 0 );
dragDir ( 1 0 0 );
pitchAxis ( 0 0 0 );
magUInf 7.834e-4;
lRef 2;
Aref 0.2;
}

...
If anyone has any ideas for my problem I would really appreciate it. I know my description is a little long but I really have no idea where my problem may be. I think it has to do with my initial pressure conditions because my pressure field also doesn't match up to past simulation, but I am really not sure.

A million thanks to anyone that can help =D
-J

agd June 29, 2010 12:13

At a Re of 100, would the flow not be laminar? Have you tried turning off the turbulence model? Also, are you comparing apples to apples, i.e. are you comparing total drag to total drag, viscous drag to viscous drag, etc?

ozzythewise June 29, 2010 14:48

Hi, thanks for the reply.

Looking at the solvers, I guess I would need to use icoFoam. Is there anything that is used for laminar steady-state problems? Does that even exist?

Thanks
-J

mamad60 June 30, 2010 03:45

In Re=100 you need u unsteady simulation because of vortex shedding behind cylinder
therfore, Cd will be time averaged CD over simulation time

ozzythewise June 30, 2010 06:49

I believe it calculates it at every iterations, and then from there I can take the average of them to get the cd of the cylinder, right?

ozzythewise June 30, 2010 10:37

Also for my drag coefficient output, why does it start at a high value, then continuously decreases, appearing to asymptotically approach a value (the value I'm assuming is the actual drag coefficient)?

Thanks

ozzythewise June 30, 2010 11:17

Quote:

Originally Posted by agd (Post 265002)
At a Re of 100, would the flow not be laminar? Have you tried turning off the turbulence model? Also, are you comparing apples to apples, i.e. are you comparing total drag to total drag, viscous drag to viscous drag, etc?

agd:

In response about the Reynolds number. The reason i chose to use turbulent modelling was because I read that for flow around an object, purely laminar flow exists only until Re=0.1. So, to be safe, I decided to use a turbulence model. Does this sound correct?

Thanks

agd June 30, 2010 12:40

I don't know where you read the condition on the Re, but for practical purposes the flow around a cylinder at a Re = 100 will be laminar, and probably massively unsteady (I can't remember the cutoff where the separation bubble collapses into a vortex street.) I am unfamiliar with icoFoam, so I cannot answer any questions about that code. The behavior you describe for the drag coefficient is not unexpected, since the initial drag calculation will use a velocity gradient at the surface much larger than what the actual solution is - after one iteration or timestep, the approximate gradient at the surface is Ufreestream/ds, where ds is the distance of the first node off the wall. This assumes a no-slip wall, and is obviously much larger than the final velocity gradient, and resultant shear stress, will be.

malhar June 13, 2012 06:24

hello every1,
i am also new to openfoam. i have done similar sim ulation for flow acrodss a cylinder. i get drag n lift forces correctly, i.e accor ding to vortex shedding i am getting variation in lift forces. but the coeff of drag n lift Cd n Cl, i am getting them constant throughout. i am unable ti digest this contrasting behavour.
please guide me thr this.

thanks n regards malhar.


All times are GMT -4. The time now is 21:07.