CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Calculation of Velocity u.Gradient X

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By ghorrocks

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 12, 2015, 22:04
Default Calculation of Velocity u.Gradient X
  #1
New Member
 
Join Date: Sep 2015
Posts: 5
Rep Power: 11
Ever Seen a Tornado? is on a distinguished road
I am having a problem with calculating simple first derivatives of velocity fields (Velocity u and Velocity v) exported from sample planes in CFX-Post.

Specifically, when I sample on a uniform grid that is finer than the numerical mesh in a region, how the velocity field is interpolated (it appears to be using tri-linear shape functions) leads to errors in the derivative estimator (I am using central differences in MATLAB).

The result is a du/dx plot that looks like the top attached figure (notice the step changes in du/dx as the estimator passes each mesh point). Basically, when more than two points are sampled within an element, the linear interpolation scheme leads to constant du/dx within each element.

In contrast, if I plot the velocity gradient calculated within CFX (Velocity u.Gradient X) on a sample line with the same uniform discretization, the result is smooth, as shown in the bottom attached figure. How is this variable being calculated?
Attached Images
File Type: jpg CFX-gradients.jpg (54.9 KB, 40 views)
Ever Seen a Tornado? is offline   Reply With Quote

Old   November 13, 2015, 06:15
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,872
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
1) Are you sure CFX is plotting a smooth function? Or is there only a single point per element and therefore the chart looks smooth?
2) The CFX solver uses proper shape functions to get some high order terms for things like this. These are lost in the post processor and will result in small differences like what you report.

And no, I have never seen a tornado.
ghorrocks is offline   Reply With Quote

Old   November 13, 2015, 10:52
Default
  #3
New Member
 
Join Date: Sep 2015
Posts: 5
Rep Power: 11
Ever Seen a Tornado? is on a distinguished road
Thanks ghorrocks

I've checked that the plots are sampled on the same uniform grid. However, when I try to then derive the Velocity u.Gradient X data in MATLAB (d^u/dx^2), I get the same step pattern. Which makes sense, CFX is storing both the Velocity u and Velocity u.Gradient X at each element face, then interpolates when evaluating inside an element. Hence the Velocity u.Gradient X data will have the same linear segments as the Velocity u data and give the same problems when applying a differencing scheme.

As far as I can tell I have two options (since I haven't saved velocity gradient data at every timestep to save space):

1) Export data using a slice plane, and calculate my finite differences at the exact element locations, then interpolate onto a uniform grid.

2) Keep my uniform grid data, but use some piecewise polynomial fit on the data in order obtain smooth differentiation.

I'm going with 2) with a chebyshev polynomial package in order to avoid the data overhead associated with my fine near wall mesh, as well, developing a smooth differentiation code will be useful for the experiments this simulation is directed at.


--_-_-_-_---
-_-_-_
-_-_-
-__-
_-_
_-
-_
_-_
Ever Seen a Tornado? is offline   Reply With Quote

Old   November 14, 2015, 07:01
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,872
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Sounds sensible. Both of those options should work.
ghorrocks 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
LES and TKE calculations MST Main CFD Forum 3 May 30, 2016 07:26
DPM massflow calculation using diameter and velocity bernardb FLUENT 4 December 26, 2013 03:15
Warning 097- AB Siemens 6 November 15, 2004 05:41
absolute velocity calculation yann Phoenics 0 August 4, 2003 13:57
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11


All times are GMT -4. The time now is 08:44.