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

Various questions and doubts about simulating Drag Coefficient of Cylinder

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 9, 2016, 11:32
Question Various questions and doubts about simulating Drag Coefficient of Cylinder
  #1
New Member
 
Join Date: Aug 2016
Posts: 9
Rep Power: 2
_Ennui is on a distinguished road
Hello all,

I have been attempting to calculate Cd for a cylinder in sea water using a 2D case.
Diameter = 5m
Nu = 1.35e-6
U = 1 m/s
Re = 3.7e+6
Rho = 1026.9 (Although this is never requested or used, seemingly...)
I'm using SimpleFoam solver with Realisable k-e as the turbulence model.

In the documentation I am using for comparison/validation, the value of Cd listed for a smooth cylinder is 0.65 in steady-state flow situation.

The value I calculated for Cd were 0.159 and 0.113 for time steps of 1e-2 and 1e-3, respectively. Both of which are far lower than they should be.


My questions:

1. My mesh is limited to 100k nodes, is this too coarse to generate an accurate result? (see attached)

2. Why is the result seemingly independent of the fluid density? (it is never required as an input)

3. Why is there lift measured for the smaller of the two time steps?

My requests:

1. General advice on calculation of drag coefficients for high Re

2. Any helpful advice would be greatly appreciated


Attached are pictures of my mesh, and residuals & results for each run.

mesh.PNG fcoeffs_biggerDELt_1e02.PNGfcoeffs_littlerDELt_1e03.PNG resids_biggerDELt_1e02.PNG
resids_littlerDELt_1e03.PNG

I hope someone can help - I feel like this is a simple problem but I am really struggling with it.

Thank you very much!
_Ennui is offline   Reply With Quote

Old   September 9, 2016, 11:38
Default
  #2
New Member
 
Join Date: Aug 2016
Posts: 9
Rep Power: 2
_Ennui is on a distinguished road
For clarity, these were formed using SimFlow - a GUI for OpenFOAM. I hope this is an appropriate place to post this as there is currently no SimFlow specific sub.
_Ennui is offline   Reply With Quote

Old   September 9, 2016, 11:41
Default Case Summary
  #3
New Member
 
Join Date: Aug 2016
Posts: 9
Rep Power: 2
_Ennui is on a distinguished road
Here is the case summary:
case summary.JPG
_Ennui is offline   Reply With Quote

Old   September 12, 2016, 08:01
Default Aref // lref
  #4
New Member
 
Join Date: Aug 2016
Posts: 9
Rep Power: 2
_Ennui is on a distinguished road
Bonus question (for extra points): What is the use of Aref/lref in 2D simulation?

I am at the end of my tether with this. Please demystify these issues and I will be eternally grateful.
_Ennui is offline   Reply With Quote

Old   September 13, 2016, 05:07
Default
  #5
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,732
Blog Entries: 6
Rep Power: 31
Tobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hello Angus,

first of all, a very clear thread with a lot of information. I highly appreciate that. Based on the fact that I did similar simulations during my master, I think I can help you (but it is a few years ago).

Quote:
Originally Posted by _Ennui View Post
Hello all,

I have been attempting to calculate Cd for a cylinder in sea water using a 2D case.
Diameter = 5m
Nu = 1.35e-6
U = 1 m/s
Re = 3.7e+6
Rho = 1026.9 (Although this is never requested or used, seemingly...)
I'm using SimpleFoam solver with Realisable k-e as the turbulence model.
You are using simpleFoam, that means it is a solver without denisty (the whole equation is divided by rho - hence, cd and cl has to be multiplied by rho to get the real values later on).

Quote:
In the documentation I am using for comparison/validation, the value of Cd listed for a smooth cylinder is 0.65 in steady-state flow situation.

The value I calculated for Cd were 0.159 and 0.113 for time steps of 1e-2 and 1e-3, respectively. Both of which are far lower than they should be.
Furthermore, simpleFoam is not a transient solver, that means that you do not have a real time step. Based on the fact that we are only interested in the steady-state solution, we use some algorithm that does not fulfill the time accuracy (SIMPLE) but reaches the steady-state solution quickly; much faster than an transient solver. For that kind of solver we set dT always to 1 which will correspond to the number of iterations we did. That means, if the time is 145s, it means that we have 145 iterations done. Changing dT will not influence the solving procedure. In other words, if you have dT = 1 and go on in time to 145s (145 iterations) and compare that one with another simulation where you set dT = 0.02 and go on in time to 2.9s (145 iterations), you will figure out that the solutions are equal.

Quote:
My questions:

1. My mesh is limited to 100k nodes, is this too coarse to generate an accurate result? (see attached)
Yes

Quote:
2. Why is the result seemingly independent of the fluid density? (it is never required as an input)
It is based on the equation as mentioned above.

Quote:
3. Why is there lift measured for the smaller of the two time steps?
I did not get the point but again it is not the time, it is the iteration.

Quote:
My requests:

1. General advice on calculation of drag coefficients for high Re

2. Any helpful advice would be greatly appreciated
I calculated cd and cl for a flow around a cylinder for low Re numbers (Re ~ 40 to get the Von Karman Street) and compare the cd coefficients with the literature. Furthermore, I analyzed the vortex shedding to get the frequency - also here I got very good results. The only bad result that I got was the shedding angular. But it was as bad as predicted in fluent. All in all, my results were very accurate and compared to fluend the difference were 0.0001% (so equal).

Did you ever check your simulation results? Like, how does the velocity and pressure field look like and change during the iterations. You have some jump in the residual plot. Do you know where this behavior come from? I would first check the simulation results in paraview to get an idea about the flow field (it should be smooth and should not jump during the iterations). If you have some jumps, it could be based on the set-up you did (more than one solution allowed). In addition, at the end you have some unsteady behavior of your simulation. Maybe your mesh is too fine and you really resolve some vortexes but this can be analyzed by using paraview.

One way would be, to reduce your relaxation factors to be more stable.

Quote:
For clarity, these were formed using SimFlow - a GUI for OpenFOAM. I hope this is an appropriate place to post this as there is currently no SimFlow specific sub.
The problem you have is not related to SimFlow. Hence, your post is correct placed.

Quote:
Bonus question (for extra points): What is the use of Aref/lref in 2D simulation?
The A_{ref} is the projected area of your cylinder perpendicular to the flow (you need to consider the extrusion in the 3rd dimension) and l_{ref} is the diameter of your cylinder. To be more clear with A_{ref}, it is finally:

A_{ref} = d_{cyl} \cdot \Delta z

I hope I could help you a bit. Good luck.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   September 13, 2016, 05:49
Default
  #6
New Member
 
Join Date: Aug 2016
Posts: 9
Rep Power: 2
_Ennui is on a distinguished road
Extremely helpful, thank you.

How can one measure a value for Δz in a 2D simulation? As I understand it, OpenFOAM doesn't truly model in 2D? Is Δz therefore the cell size in z direction?

Secondly, I can't make sense of why Cd should be so dependent on Area? I understand that it is intrinsically connected to the Force but cannot seem get round this circular relationship. Linear relationship between value of Cd and variance in Area?

Lastly, changing "lref" seems to have no effect on the solution at all?

Sorry to be a burden, thanks for all the help so far.
_Ennui is offline   Reply With Quote

Old   September 13, 2016, 06:35
Default
  #7
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,732
Blog Entries: 6
Rep Power: 31
Tobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by _Ennui View Post
Extremely helpful, thank you.

How can one measure a value for Δz in a 2D simulation? As I understand it, OpenFOAM doesn't truly model in 2D? Is Δz therefore the cell size in z direction?
Exactly. Based on the fact that FOAM uses the finite volume method, we need a 3D mesh, even for 1D or 2D cases.

Quote:
Originally Posted by _Ennui View Post
Secondly, I can't make sense of why Cd should be so dependent on Area? I understand that it is intrinsically connected to the Force but cannot seem get round this circular relationship. Linear relationship between value of Cd and variance in Area?
The calculation of the coeffs are done within the forceCoeffs.C
Code:
        // lift, drag and moment
        coeffs[0] = (totForce & liftDir_)/(Aref_*pDyn);
        coeffs[1] = (totForce & dragDir_)/(Aref_*pDyn);
        coeffs[2] = (totMoment & pitchAxis_)/(Aref_*lRef_*pDyn);

        scalar Cl = sum(coeffs[0]);
        scalar Cd = sum(coeffs[1]);
        scalar Cm = sum(coeffs[2]);

        scalar Clf = Cl/2.0 + Cm;
        scalar Clr = Cl/2.0 - Cm;
Why should the drag coefficient not be depended on the projected area? What would you expect?

Quote:
Originally Posted by _Ennui View Post
Lastly, changing "lref" seems to have no effect on the solution at all?

Sorry to be a burden, thanks for all the help so far.
This value will not change your drag and lift coefficient, it will only influence your moment (cm) as you can see in the C++ code above.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   September 13, 2016, 07:10
Default
  #8
New Member
 
Join Date: Aug 2016
Posts: 9
Rep Power: 2
_Ennui is on a distinguished road
Brilliant, thank you.

That is what I had initially thought, I think my confusion stemmed from a tutorial video produced by SimFlow themselves:

https://www.youtube.com/watch?v=wASYUxQ9LMc

at ~10:00 they set the values of lref and Aref. For the latter he sets it to be equal to dcyl^2 .
Any idea why this may have been done? It is a similar case, in that it is 2D and of a cylinder in crossflow.

All the best,
Angus
_Ennui is offline   Reply With Quote

Old   September 13, 2016, 11:40
Default As it stands...
  #9
New Member
 
Join Date: Aug 2016
Posts: 9
Rep Power: 2
_Ennui is on a distinguished road
Recap / Overview:
Attempting to calculate drag coefficients for a smooth cylinder in crossflow using 2D steady state, incompressible case.
Diameter = D = 5m
Nu = 1.35e-6
U = 1 m/s
Re = 3.7e+6
The expected value from literature (http://www.germanlloyd.org/pdf/DNV-OS-J101_2014-05.pdf) is Cd = 0.65 for steady flow.


Current state:
After refining the mesh as much as possible within the 100k node limit and resetting the discussed parameters (Δt, lref, Aref, relaxation) the case converged in 5,118 iterations.
The calculated value was found to be Cd = 2.66712 which is far larger than the expected. (Somewhat humorously, it is nearly equidistant from the expected solution as my initial calculation)


Case Details:
Mesh:
See attached.
Solver:
SimpleFoam
Turbulence Model:
Realizable k-ε Model with full defaults on constants.
Discretisation:
Steady-state. Using LUST scheme for U, k and ε convection.
Boundary Conditions:
Inlet: Velocity inlet, of type "Surface Normal Fixed Value" (=U=1m/s)
Outlet: Custom of type "Pressure Inlet-Outlet Velocity"
Boundaries: Outflow of type "Zero Gradient"
Z-plane: Empty
Initial Conditions:
U=1m/s
k=1
ε=1
Monitor Reference Values:
lref = D = 5
Aref = D = 5

Questions:
{{ Expected: Cd=0.65 // Calculated: Cd=2.66712 }}
  1. Can anyone see any glaringly obvious reasons the calculated solution would be so far from the expected value? (out by ~310% )

  2. Anything of note regarding the residuals? Particularly, what is happening to the residual for k? (see attached)

  3. Is the reason for the error in the solution primarily due to the coarseness of the mesh?


Pictures:

Mesh: Mesh_l8stgr8st.PNG Mesh_l8stgr8st_zoom.PNG
Residuals & Case Summary: Residuals_l8stgr8st.PNG case summary_l8stgr8st.PNG

Any guidance at this point (specific or otherwise) would be greatly appreciated.


Kind regards,
Angus
_Ennui is offline   Reply With Quote

Old   September 13, 2016, 14:06
Default
  #10
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,732
Blog Entries: 6
Rep Power: 31
Tobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

my time is very limited but I uploaded my project work onto my web space (unfortunately it is in German). Nonetheless, maybe it will help you. You will find it here: http://www.holzmann-cfd.de/index.php...karman-strasse

I am wondering why your projected area is equal to 5 - and if you say it is the diameter, the unit would be [m] and not [mē]. I can not belive that you extrude the mesh in z - direction to 1m.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Reply

Tags
drag coefficient, help needed

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 14:27.