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

Concerns with gradient calculation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 21, 2015, 16:18
Default Concerns with gradient calculation
  #1
Member
 
Leonardo Honfi Camilo
Join Date: Mar 2009
Location: Delft, Zuid Holland, The Netherlands
Posts: 60
Rep Power: 17
lhcamilo is on a distinguished road
Hello everyone,

there is this itch I have been trying to scratch and hopefully it is just me doing something dumb.

in any case, as a background I have been performing LES simulations on this channel and I have been calculating the production and dissipation. And upon calculating the dissipation and production terms of the Reynolds stress equation in the spanwise, vertical and streamwise directions and compering with a DNS database, I realised that something was wrong. The streamwise and vertical components seemed switched and the spanwise component did not match well with the reference.

After mulling over it for some time, I decided to take a look at each term individually. And this weekend I decided to take a look at how the Mean velocity gradients matched with the reference.

The Mean velocity I used,,UMean, was averaged through the flow after a rather long development period. So in order to calculate the components of the mean velocity gradient I computed the Tensor with

Code:
fvc::grad(UMean)
For this simulation I used a fixed pressure gradient of 1 and a viscosity of nu = 1/Re_tau for Re_tau = 180. The plot data is being produced with a modified version of the postChannel utility. The margenta color is the reference.

gradx.jpg

grady.jpg

grady_ref.jpg

gradz.jpg

The black crosses represent the data from extrating the components XX,XY and XZ from fvc::grad(UMean), the green line represents the data obtained by calculating each scalar element directly and the magenta line is the DNS reference.

Those gradients have been computed as a post-process, but the results are consistent with a on the fly computation.

Additionally fvSchemes is set as:

Code:
gradSchemes
{
    default         Gauss linear;
}
So, am I doing something really dumb or there seems to be something off with fvc::grad()?

Note. This was tested in openFoam 2.0.x,2.2.x and 2.3.x

I should also point out that the Mean velocity profile seems to be in very good agreement with the reference, so for all intent and purposes, the issue does not seem to be the UMean field.

Last edited by lhcamilo; February 22, 2015 at 06:08. Reason: legends
lhcamilo is offline   Reply With Quote

Old   February 22, 2015, 06:57
Default
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
try

default cellLimited Gauss linear 1;
If this does not help, AND YOUR MESH IS REASONABLE, there is garbage in your velocity field.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Reply

Tags
gradient


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
question regarding LES of pipe flow - pimpleFoam Dan1788 OpenFOAM Running, Solving & CFD 37 December 26, 2017 15:42
conjugateHeatFoam, grid spacing and gradient calculation benk OpenFOAM 1 May 5, 2010 17:06
Face based gradient calculation Bernhard Kubicek Main CFD Forum 1 February 12, 2008 17:34
Gradient calculation Harry Main CFD Forum 3 October 7, 2006 05:19
Warning 097- AB Siemens 6 November 15, 2004 05:41


All times are GMT -4. The time now is 15:47.