# Problem with Wall Distance Calculation

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

November 27, 2016, 06:30
Problem with Wall Distance Calculation
#1
New Member

Denis Sotomayor
Join Date: Jan 2015
Location: Saint-Petersburg, Russia
Posts: 4
Rep Power: 9
Well, I wanted to ask some questions related to a problem I am having in ANSYS:

I have been trying to perform the simulation of a Flow around a 2D Circular Cylinder (classical to get the von-Karman street) at 500 000 Reynolds, U-RANS, SST k-w model. I did this simulation in CFX (3D with one cell in z) and FLUENT (2D), with same mesh parameters (y+<1), same timestep and with the highest-order schemes for both softwares (Both QUICK even with Turbulence, Second Order Backward Euler, etc). The results: Cd (Drag coeff) that varies 20% between softwares, and an amplitude of Cf (Lift Coeff) that almost varies 3 times (!!!). I tried a lot of things, changing schemes, mesh size, etc. but the difference on results still persists. I have thought maybe the SST formulations on both softwares might be somehow different, or maybe the cell/node centered method of both softwares might be affecting, but what was interesting was the next thing I just found in CFX:

The variable Wall Distance, that should represent the distance of a point to the nearest wall is not the right one (geometrically speaking). The first image displays that to the limit of my domain I have a distance of 25 m from the wall, while my domain has a Radius of 15 m (Cylinder of 0.5 m Radius). Second image shows that even near to my wall, the Relationship between the Wall Distance Vs Y (Starting from the cylinder's wall) is not even Linear. I have read the documentation (3rd image) and I dont understand the objective of this kind of "Wall Distance" calculation.
Having an incorrect "Wall Distance" actually can be the answer to my problem in CFX, since it can strongly affect the Turbulence Model near the wall in the calculation in the Blending Function, getting different Pressures and Wall Shear Stresses, which might result in having this different results with FLUENT.

From here, my questions are the next:
1) How should my Pseudo-2D simulation in CFX be so the Wall Distance would be calculated properly? What could be the problem?
2) Why does CFX uses such a strange (for me) algorithm to calculate the Wall Distance and not just use the Geometrical Distance?
3) Is there a way to Override the calculation of this variable and, instead, force the Wall Distance = Geometrical Distance through the Command Editor?

PD: My Domain has Two Sub-Domains for meshing purposes, connected by an Interface GGI.
Attached Images
 1.png (130.1 KB, 38 views) 2.jpg (69.0 KB, 36 views) 3.png (62.0 KB, 41 views)

November 27, 2016, 18:42
#2
Super Moderator

Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,231
Rep Power: 135
You say you have tried different meshes, but I would also do different time step sizes and convergence criteria.

Your wall distance issue may be explained by simply not having fully converged the wall distance equation. Have you tried a tighter convergence criteria?

Also, the wall distance parameter only has a significant effect in the vicinity of the wall. You are looking a long way from the wall. Have you looked at how accurate it is in the vicinity of the wall?

Quote:
 Why does CFX uses such a strange (for me) algorithm to calculate the Wall Distance and not just use the Geometrical Distance?
Because directly calculating the geometric distance is not straight forward in general. The approach used in CFX is simple, fast to calculate and adequate in most circumstances.

Quote:
 Is there a way to Override the calculation of this variable and, instead, force the Wall Distance = Geometrical Distance through the Command Editor?
Not to my knowledge.

December 1, 2016, 19:43
#3
New Member

Denis Sotomayor
Join Date: Jan 2015
Location: Saint-Petersburg, Russia
Posts: 4
Rep Power: 9
Quote:
 Originally Posted by ghorrocks You say you have tried different meshes, but I would also do different time step sizes and convergence criteria.
I also tried to reduce the timestep almost in 1/2 and 1/4 (I originally had 64 timesteps per shedding cycle, up to 256), and almost 20 iterations for the implicit time scheme.

Quote:
 Originally Posted by ghorrocks Your wall distance issue may be explained by simply not having fully converged the wall distance equation. Have you tried a tighter convergence criteria?
1e-12. It converges at the 4th timestep.

Quote:
 Originally Posted by ghorrocks Also, the wall distance parameter only has a significant effect in the vicinity of the wall. You are looking a long way from the wall. Have you looked at how accurate it is in the vicinity of the wall?
You are right. Wall distances close to the wall are almost the same as the geometrical distances. I had read a paper about this calculation (FARES E., SCHRODER, W. "A differential equation for approximate wall distances") and seems like this algorithm is pretty accurate near walls, where turbulence models require it to be so. So this might not be the problem (starting from 0 :\)

I have started to perform several calculations at different Reynolds (1e2, 1e3, 1e4, 1.4e5 until now) with the same parameters for both CFX and Fluent. For low Re, Laminar cases are equal even without achieving mesh-time convergence (but obviously still little bit different from a decent simulation, but that is not my objective).

For cases of 1e3 and 1e4, SST gives me a difference of less than 20% between CFX and FLUENT on Cd, Cl and Cm, but at 1.4e5, the difference in Cl increases a lot (1.1 VS 0.3!!).

I am looking forward to solve this doubt about the reason why this difference appears in a numerical aspect (even if results are un-physical since 3D starts to make its way in reality). Still, I need more results at higher Re (1e6, 1e7), so I am still working on this.

By the way, thanks very much for the reply.

December 2, 2016, 04:23
#4
Senior Member

Join Date: Feb 2011
Posts: 495
Rep Power: 16
Quote:
 Originally Posted by Foxbor I also tried to reduce the timestep almost in 1/2 and 1/4 (I originally had 64 timesteps per shedding cycle, up to 256), and almost 20 iterations for the implicit time scheme. 1e-12. It converges at the 4th timestep. You are right. Wall distances close to the wall are almost the same as the geometrical distances. I had read a paper about this calculation (FARES E., SCHRODER, W. "A differential equation for approximate wall distances") and seems like this algorithm is pretty accurate near walls, where turbulence models require it to be so. So this might not be the problem (starting from 0 :\) I have started to perform several calculations at different Reynolds (1e2, 1e3, 1e4, 1.4e5 until now) with the same parameters for both CFX and Fluent. For low Re, Laminar cases are equal even without achieving mesh-time convergence (but obviously still little bit different from a decent simulation, but that is not my objective). For cases of 1e3 and 1e4, SST gives me a difference of less than 20% between CFX and FLUENT on Cd, Cl and Cm, but at 1.4e5, the difference in Cl increases a lot (1.1 VS 0.3!!). I am looking forward to solve this doubt about the reason why this difference appears in a numerical aspect (even if results are un-physical since 3D starts to make its way in reality). Still, I need more results at higher Re (1e6, 1e7), so I am still working on this. By the way, thanks very much for the reply.
Do you monitor this quantities during run? Do they reach steady values? Do you calculate 'em the same way?

December 2, 2016, 06:48
#5
New Member

Denis Sotomayor
Join Date: Jan 2015
Location: Saint-Petersburg, Russia
Posts: 4
Rep Power: 9
Quote:
 Originally Posted by Antanas Do you monitor this quantities during run? Do they reach steady values? Do you calculate 'em the same way?
Yes, I monitor these quantities during both simulations. Also I monitor Yplus average and maximum values.

The amplitudes reach steady values at almost 60 seconds of simulation, thats like after 12 sheedings. In some simulations I tried 100 seconds, but not further change on amplitudes.

I calculate them the same way. I verified it a lot of times.

 December 2, 2016, 09:34 #6 Senior Member   Join Date: Jun 2009 Posts: 1,609 Rep Power: 29 I am not certain what may be the source of the differences; however, if you want to compare both solutions, it would help to run them as close as possible. I assume you are using the identical meshes (barring the 1-element thick difference) From your initial message, you are using Fluent with QUICK+SOBE, but no information about CFX so I assume HighResolution+SOBE as well, correct? Advection scheme differences only go away under mesh refinement which may be expensive. An alternative is to run both codes using First Order/Upwind using the current mesh and though the results may not be accurate, you will eliminate another source for the differences. My 2 cents,

 Tags cfx, wall distance, wallscale

 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 06:38 Maff OpenFOAM Bugs 5 August 14, 2014 15:41 sebastian OpenFOAM Bugs 4 October 31, 2012 11:24 rks171 Main CFD Forum 7 June 16, 2012 16:39 HFLUENT Fluent UDF and Scheme Programming 0 April 27, 2011 13:03

All times are GMT -4. The time now is 05:43.