|
[Sponsors] |
How to Calculate the Drag Coefficient in CFX? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 25, 2016, 00:24 |
How to Calculate the Drag Coefficient in CFX?
|
#1 |
New Member
Christopher
Join Date: Apr 2015
Posts: 20
Rep Power: 11 |
I am just running verification cases of basic geometries in CFX, and I started with a cylinder. I am using the function calculator in CFD-Post for the forces in the x-direction acting on the cylinder. The issue I am having is that when I use that force for Cd, I get a value that is off by 80%. That is why I suspect that I am probably using the wrong value...
Is there another way to get the drag forces or is the number I am using the correct number, but just an issue with my setup? |
|
May 25, 2016, 02:58 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144 |
Go through the issues discussed in the FAQ first : http://www.cfd-online.com/Wiki/Ansys..._inaccurate.3F
|
|
May 31, 2016, 12:27 |
|
#3 |
New Member
Christopher
Join Date: Apr 2015
Posts: 20
Rep Power: 11 |
Alright, I went through the list to see what issues that I could have. From my understanding, it seems my initial setup is correct. Not sure what I am lacking.
Going through the list: 1. Firstly, is the simulation correctly set up? Does your model include all relevant physics? I am dealing with flow over a cylinder, and I made a simple wind tunnel control volume surrounding the cylinder. I am attempting to model a Reynolds number of 1E4 and with a cylinder diameter of 1.2192 m the velocity is about 0.1239 m/s. I am dealing with an incompressible fluid, and I am not dealing with the energy equation as that is turned off. I believe that gravity affects are negligible, so I have turned that on. Reference pressure is 1 atm and assuming the air flow is at sea level. Relative outlet is 0 atm. 2. Has your solution converged to a reasonable value (see above)? I am able to have my results converge to 1e-4, but I have not gotten any lower than that even when I leave my simulation running for a few hours. I assume that is a mesh issue. 3. Perform a sensitivity analysis on the relevant features of your simulation. Domain Size: The control volume is 30 x 30 meter^2 area with an extrusion of 0.1 meters. The cylinder is about 1/3 distance from the inlet and placed in the center. Grid: Mesh Qualities: Nodes: 351446 Elements: 175924 Element Quality Average: 0.19978 Grid Type: Structured (?) The inflation layer scheme I am using is First Layer Thickness with a thickness of 1.46024314455646E-03 m. I used a Y+ calculator for that. http://www.pointwise.com/yplus/ I tried different mesh qualities and the results I am looking at only differ around 10%. Temporal Discretisation (?): Steady-State with a initial timescale of 1. Turbulence Model: Shear-Stress Transport Turbulence Numerics: Default CFX settings Turbulence Intensity: Medium intensity (Default) Boundary Conditions: Assuming 2D simulation domain. The cell thickness is 0.1 meters with symmetry boundaries on the two sides. Inlet is Cart. Velocity Components with x-comp = 0.12393 m/s, y and z-components = 0 m/s The top, bottom and left boundary are openings with 0 atm opening pressure and direction. The only wall is the cylinder and that is a no slip wall. Timestep: None (?) it's steady-state with a initial timescale of 1. 4. Perform an error analysis: N/A 5. Comparison Results: From using the function calculator in CFD-Post for the force acting on the wall in the global x-direction I get 0.000769546 N. The total surface of the cylinder is about 0.383006 m^2. From these numbers I am looking to calculate the drag coefficient using this equation from here https://en.wikipedia.org/wiki/Drag_coefficient I written my equation as this: Cd = Fx/(pi*diameter*Thickness*0.5*rho*u^2) The drag force I am calculating is 0.22 and the value I am looking to get is around 1 to 1.2. Something similar to this graph: http://scienceworld.wolfram.com/phys...inderDrag.html My question boils down to is there something wrong with my simulation or the value I am using for force? I would assume even if there was something wrong with my simulation, there shouldn't be results that are off by a factor of 80% or so. I would think that there was an issue with the boundary conditions or maybe my physics of off? Any help would be appreciated! EDIT: Here is the pressure contour if that would help get an idea. |
|
May 31, 2016, 13:40 |
|
#4 |
Senior Member
Join Date: Jun 2009
Posts: 1,873
Rep Power: 33 |
Have you tried reducing, or even increasing the physical timescale in order to converge the results below 1E-4 ?
Have you looked at the equation imbalances ? If ALL the equations residuals cannot be reduced below 1E-4, something is off and it must be looked at. |
|
May 31, 2016, 14:07 |
|
#5 |
New Member
Christopher
Join Date: Apr 2015
Posts: 20
Rep Power: 11 |
I have no issue with getting the momentum and mass terms to converge below 1e-4. The two turbulence terms I have are KE and Frequency. I can get Frequency below 1e-04, but I cannot get KE to go that low.
How do I check equation imbalances? |
|
May 31, 2016, 14:37 |
|
#6 |
Senior Member
Join Date: Jun 2009
Posts: 1,873
Rep Power: 33 |
IMbalances are listed at the end of the output file, and they can also be monitored in the Solver Manager.
Add new Plot Monitor, select Balances, select equation of interest, Apply. |
|
May 31, 2016, 15:23 |
|
#7 |
New Member
Christopher
Join Date: Apr 2015
Posts: 20
Rep Power: 11 |
I changed the timescale from 1 to 500 and was able to get all my values to converge below 1e-04. Not sure why the wallscale doesn't change once it hits 1e-04. Then from the force function calculator in CFD-Post I got 0.000851278 N, which still seems fairly low and I get for Cd as 0.24 instead of 0.22.
Here are the residuals: http://imgur.com/a/6lnn1 Is there an issue with my simulation setup or am I not calculating Cd correctly? I was thinking that it's not including the viscous forces on the body, but I am not sure how to take that into consideration. |
|
June 1, 2016, 03:32 |
|
#8 |
Senior Member
Maxim
Join Date: Aug 2015
Location: Germany
Posts: 413
Rep Power: 13 |
could you please post your out-file?
A timescale of 500 is too high for the final results. I use a timestep of 100 sometimes to "flush" my flow field and then go down to 1 or lower after a few iterations. As far as I understand, with a high timescale your "resolution in time" is too coarse to calculate turbulent phenomena such as vortices correctly. Therefore it is easier to converge but the result is not physically correct. You could also create a monitor for your cd value and see if that changes with the number of iterations in solver manager. If you don't know how to do that, please look it up in the documentation. |
|
June 1, 2016, 04:15 |
|
#9 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144 |
Maxim - your understanding of time scale in a steady state simulation is the wrong way around. The Reynolds Averaged NS equations requires there to be a distinction between resolved and non-resolved fluid motion. The non-resolved fluid motion is averaged and assumed to be turbulence and the resolved fluid motion is captured by the U, V and W velocity vector fields. There is also a similar distinction between resolved and non-resolved time scales. The time scale here is the physical time step size - which means you want all transient motion to be at a time scale smaller than your physical time step.
With a steady state simulation you are assuming that all transient fluid motion is turbulence. That is it is non-resolved. Therefore you should use a time scale which means all transient fluid motion is below your physical time step size. This is a long way of saying that as you approach convergence in a steady state simulation you should increase the physical time step size to ensure all transient time scales are properly covered in the turbulence model. It is fine to use small time steps to start off, but once convergence is progressing nicely you should increase the time step size. |
|
June 1, 2016, 04:21 |
|
#10 | |
Senior Member
Maxim
Join Date: Aug 2015
Location: Germany
Posts: 413
Rep Power: 13 |
Thank you Glenn for your explanations. I am still relatively new to CFD and I am learning more every day.
Edit: Sorry for hijacking this thread but your post got me all confused. I was talking about the observation I made with my projects, that a large timescale factor helps to converge my simulation until it "stalls" (residuals do not decrease any more) and when I use a smaller timescale factor, the residuals converge further. User Chander described the same thing here: Quote:
How does that go together? My after-lunch-food-coma brain won't connect the dots. Thanks again. Last edited by -Maxim-; June 1, 2016 at 08:08. Reason: confusion |
||
June 1, 2016, 09:21 |
|
#11 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144 |
This points to some combination of:
* The convergence is limited by mesh quality or some other parameter stopping full convergence. * the flow being actually transient and requiring a transient run to converge |
|
June 1, 2016, 09:33 |
|
#12 |
Senior Member
Maxim
Join Date: Aug 2015
Location: Germany
Posts: 413
Rep Power: 13 |
Okay, good - this is the case in my project. It is a highly turbulent flow around sharp edges, a propeller, etc. A transient simulation is therefore necessary.
|
|
June 1, 2016, 09:41 |
|
#13 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144 |
Bluff bodies often have large scale transient flow features in the wake which cannot be captured very well with a steady state simulation. So yes, they often need transient simulations. They often cannot be captured well with a RANS simulation either, but that is another matter.
|
|
June 1, 2016, 15:18 |
|
#14 | |
Senior Member
Join Date: Jun 2009
Posts: 1,873
Rep Power: 33 |
Dear Maxim,
I am bit confused by your use of "large timescale factor". Are you referring to the "Physical Timescale" or to "Local Timescale Factor" ? They are different concepts, and the latter must be used with a lot of care and clear understanding of its side effects. Hope the above helps Quote:
|
||
June 2, 2016, 03:53 |
|
#15 |
Senior Member
Maxim
Join Date: Aug 2015
Location: Germany
Posts: 413
Rep Power: 13 |
Hello Opaque,
I usually use "Auto Timescale" for my steady-state simulation. I use that result as initial solution for my 'real' transient simulation. As I described above, I start with a "Timescale Factor" of 100 to 'flush' my fluid region to get the flow in the right direction and after 50 iterations or so, the MAX residuals stagnate usually around 10^-2 and 10^-3. So I change the "Timescale Factor" during the run to 1 (which is the standard setting in CFX) and get my solution to converge in a lot of cases. My convergence criteria is MAX residuals < 10^-3 and imbalances <1%. "Timescale Factor" here is just a multiplier of "Auto Timescale". I definitely have to dig deeper into this topic. All those different time scales and their effects in steady-state and transient and the connections to the turbulence models still confuse me. |
|
June 2, 2016, 13:14 |
|
#16 | |
New Member
Christopher
Join Date: Apr 2015
Posts: 20
Rep Power: 11 |
Quote:
I couldn't find anything precisely in the documentation on the ANSYS site, but I found this link and used to calculate the Cd. The value I am getting is approximately what I am calculating at 0.24. http://www.cfd-online.com/Forums/cfx...efficient.html Is viscosity normally accounted for in CFX in the default settings? |
||
June 2, 2016, 16:17 |
|
#17 |
New Member
Christopher
Join Date: Apr 2015
Posts: 20
Rep Power: 11 |
Just an update, I increased the inflation layer number and increased the number of divisions in the mesh. I ran that simulation and got about 0.26 for drag coefficient.
I feel like I am not getting all the forces or there are physics that I must be missing even from the simple setup of the problem. Would a mass flow instead of a velocity inlet change anything? |
|
June 2, 2016, 20:18 |
|
#18 | |||
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144 |
Quote:
Quote:
Quote:
* Run a simulation on your existing mesh, and extract your key parameter from the simulation (in your case that would be Cd). * Generate a new mesh which is significantly finer. Preferably that means halve the element edge length (which means approximately 5x to 8x more nodes). Don't compare a mesh with 100k nodes to 120k nodes, that is not enough of a difference. You need to compare 100k nodes to 400k nodes to be significant. * Run the simulation on the finer mesh and extract the key performance parameter. * If the change in performance parameter is less than a tolerance you are happy to live with then the coarse mesh is OK to use. * If the change is unacceptable then generate a significantly finer mesh again and repeat until you achieve mesh insensitivity. You can easily see how this process will result in very fine meshes and large simulations. But frequently that is what CFD requires to get accuracy. That is why most of the world's supercomputers are doing CFD. |
||||
June 3, 2016, 10:10 |
|
#19 | |
Senior Member
Join Date: Jun 2009
Posts: 1,873
Rep Power: 33 |
Thank you for the clarification.. I understand now, and you are working correctly with the Auto Timescale. As long as the simulation converges, the Timescale Factor for the automatic timescale can be as large as you want.
Quote:
|
||
June 4, 2016, 16:34 |
|
#20 |
Senior Member
yaseen
Join Date: Oct 2015
Location: Hawler
Posts: 174
Rep Power: 11 |
[QUOTE=-Maxim-;602948]
My convergence criteria is MAX residuals < 10^-3 and imbalances <1%. "Timescale Factor" here is just a multiplier of "Auto Timescale". dear Maxim is residual < 10^-3 acceptable for academic research? I surprised because according to CFX documentation even bellow 10^-4 is only for qualitative understanding of the flow field not quantitative (I know this value depends that what is you modeled). thanks |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to use ANSYS CFX to get the drag coefficient? | victorzcc | CFX | 12 | October 1, 2015 06:30 |
calculation of Drag Coefficient in CFX? | ganesh chakravarthi | CFX | 5 | May 28, 2014 19:54 |
Question about heat transfer coefficient setting for CFX | Anna Tian | CFX | 1 | June 16, 2013 07:28 |
How to calculate the drag coefficient for flow past cylinder | o_mars_2010 | Tecplot | 0 | April 18, 2013 02:26 |
Too low drag coefficient on a bus | Roland R | CFX | 8 | September 21, 2012 06:23 |