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

why does 'sample' do this? wallShearStress question

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 7, 2013, 20:30
Question why does 'sample' do this? wallShearStress question
  #1
Member
 
CHARLES
Join Date: May 2013
Posts: 46
Rep Power: 13
CHARLES is on a distinguished road
Hello all,

I've been trying to use the 'sample' utility in OpenFOAM with hopes to get field variables at the mesh vertices (flat plate on a wall resolved mesh). For some reason 'sample' is not outputting the field values at the points corresponding to node locations...
My domain is 1m tall. If I define the 'end' of the line in the y-direction to be at 1m, the y values I get in the output file start from 0 and the next value is some value much greater than the first node point (located at y=5e-7). However, if I define the 'end' as 0.25m (as I did below) 'sample' gives the y coordinates corresponding to the node values.

I am using the finest mesh (545X385) obtained from NASA's website: http://turbmodels.larc.nasa.gov/flatplate_grids.html


About wallShearStress problem:
I'm getting values that are almost half of what they should be when I plot the friction coefficient, Cf, as a function of x (distance along the plate), where Cf =tau_wall/(0.5*U_inf ^2 * rho). To make the plot, I am using the data from the wallShearStress output file obtained via 'sample'.

I understand that in OpenFOAM wallShearStress calculates tau_wall/rho but in this case rho=1... so wallShearStress should give me tau_wall.

What is interesting is that when I calculate Cf from the wallShearStress folder obtained via 'wallShearStress' command, the values appear as they are supposed to for the wall resolved mesh. When I look at a coarse mesh that isn't wall resolved, the plot results (obtained via 'sample') for Cf are what they are supposed to be... I've double checked the plotting commands and they're correct. The actual output file (from 'sample') for the wall resolved mesh shows tau_wall=3.XXX but the wallShearStress folder shows tau_wall=6.XXX... so the data that OpenFOAM is outputting via 'sample' is different from the one it has calculated via 'wallShearStress' command... why?!

The plot I've attached shows:
Unresolved='sample' results for coarse mesh
Calculated=results from wallShearStress file divided by 0.5*Uinf^2*rho for resolved mesh
Sampled='sample' results for resolved mesh

Thanks for taking the time to look through this!


Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version         2.0;
    format          ascii;
    class           dictionary;
    location        "system";
    object          sampleDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

interpolationScheme cellPointFace;

setFormat raw;

sets
(
   Scottnut_y
    {
        type            face;
        axis            y;
        start           (0.97 0.0 0.0);
        end             (0.97 0.25 0.0);
    }
    Scottnut_x
    {
        type            face;
        axis            x;
        start           (0.0 0.0 0.0);
        end             (2.0 0.0 0.0);
    }
);

fields
(
   	U
	wallShearStress	
	yPlus
	nut
	nuTilda
	R
);


// ************************************************************************* //
Attached Images
File Type: png online.png (4.7 KB, 62 views)
CHARLES is offline   Reply With Quote

Reply

Tags
death, openfoam, sample, wallshearstress


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
OpenFOAM sample utility aylalisa OpenFOAM Post-Processing 5 August 26, 2019 17:47
wallShearStress, wallGradU are inconsistent dancfd OpenFOAM Post-Processing 5 July 18, 2018 09:33
sample in multiregions mateusps OpenFOAM 0 February 29, 2012 23:01
sample samiam1000 OpenFOAM 1 January 28, 2012 12:20
SOLAVOF Sample Test Problem Zi-Wei Chiou Main CFD Forum 0 October 27, 2001 01:35


All times are GMT -4. The time now is 07:06.