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

calculate and sample wallGradU & wallShearStress every output time

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By canopus

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 8, 2013, 12:00
Default Sample wallShearStress every output time for all wall points
  #1
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 15
ArathoN is on a distinguished road
Hello,
I'm a beginner user of OpenFoam, and after days of research i decided to ask your help dear community.

I need to calculate the velocity gradient and the wall shear stress at every output time, and i don't know how I can do it. I tried to modify the solver but my knowledge of C code isn't enough to make me understand what i have to do.

Another question is how can i output afterwards these data? I thought about using the sampledict but what should i choose between surface, sets and all other options?

Finally i saw some output file from the sample function and i didn't understand the meaning of the column, what they represent if i choose for example the variable velocity U and i want to sample in the "x" direction starting from point P1 and ending on point P2?

I thought on making something similar to the post-processing (it is written in the controldict and not in a separate file sampledict) present in the case "pitzDaily" where it outputs the fiels "P U K" every output time, but I don't know how I can do it.

I hope some kind soul could help me and sorry for my bad English (not my native language).

Last edited by ArathoN; November 17, 2013 at 18:49.
ArathoN is offline   Reply With Quote

Old   November 12, 2013, 09:26
Default
  #2
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 15
ArathoN is on a distinguished road
I'm using this function in the control dict to calculate wallshearstress at every output time, but it gives me only the min and max value of the variable:
Code:
wallShearStress1
    {
        type        wallShearStress;
        functionObjectLibs ("libutilityFunctionObjects.so");
        outputControl   outputTime;
        setFormat       gnuplot;

        patches     ("lowerWall");
    }

what should i add to give me the valu of the stress in the lowerwall and the distance too?

Last edited by ArathoN; November 17, 2013 at 13:36. Reason: inserted code tag
ArathoN is offline   Reply With Quote

Old   November 12, 2013, 11:32
Default
  #3
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 15
ArathoN is on a distinguished road
I tried to use also the sample function like this:

Code:
interpolationScheme cellPoint;
fields
(
    "wallShearStress"
);
sets
(    
lineX1
    {
        type        uniform;
        axis        distance;

        start       (0 0 0);
        end         (2.5 0 0);
        nPoints     10;
    }
);
where the lowerwall in which i'm interested to evaluate the wallshearstress begins from (0 0 0) and ends at (2.5 0 0).

But it will give me a null wallstressshear for every position. can you please tell me what am i doing wrong?

Last edited by ArathoN; November 17, 2013 at 13:37. Reason: inserted code tag
ArathoN is offline   Reply With Quote

Old   November 17, 2013, 12:59
Default
  #4
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 15
ArathoN is on a distinguished road
finally now i coult sample the wallshearstress. I want now to use the "libutilityfunctionobjects.so" with wallShearStress1 function in controldict. The only problem is that it will give me only the min and max value for every timeset, how can i specify that it should give me all the values on the lowerwall, i need to evaluate the separation point of the flow in a backward facing step.


Code:
wallShearStress1
    {
        type        wallShearStress;
        functionObjectLibs ("libutilityFunctionObjects.so");
        outputControl   outputTime;
        setFormat       gnuplot;

        patches     ("lowerWall");
    }
Please Can someone help me??I reached a dead end here and searched all the forum and the source documentation e found nothing.
ArathoN is offline   Reply With Quote

Old   November 17, 2013, 13:18
Default
  #5
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 15
ArathoN is on a distinguished road
I created the sample file so i can have the values of the wall shear stress with this code:

Code:
setFormat gnuplot;

surfaceFormat raw;

interpolationScheme cellPoint;
fields
(
    "wallShearStress"
);

sets
(
    
lineX1
    {
        type        face;
        axis        x;

        start       (0 -0.1 0);
        end         (2.5 -0.1 0);
        nPoints     400;
    }

);

surfaces
(
    
 walls_interpolated
    {
        type            patch;
        patches         ( "lowerWall" );
        interpolate     true;
    }

);
i sampled the same patch in two different modes, wanted to try the capability of the sample function.

I saw that i can add the libsampling.so to the controldict file and by this i can sample too while running the solver i tried modifying the file but with no success, any of you have a hint?
ArathoN is offline   Reply With Quote

Old   August 8, 2016, 07:50
Default calculate and sample wallGradU & wallShearStress every output time
  #6
Member
 
SM
Join Date: Dec 2010
Posts: 97
Rep Power: 15
canopus is on a distinguished road
Is it possible now to calculate wallGradU & wallShearStress every output time by using the controldict?
canopus is offline   Reply With Quote

Old   August 8, 2016, 08:21
Default
  #7
Member
 
SM
Join Date: Dec 2010
Posts: 97
Rep Power: 15
canopus is on a distinguished road
I found its possible to write in runtime with
Code:
wallShearStress1
    {
        type        wallShearStress;
        functionObjectLibs ("libutilityFunctionObjects.so");
        patches     ("wallbot");
//        outputControl   timeStep;
        outputControl   runTime;
        writeInterval   0.005;
    }
But problem is
Quote:
This function object evaluates and outputs the shear stress at wall patches. The result is written as a volVectorField to time folders as field 'wallShearStress'.
How can I make it write in postProcessing directory as the results of probe appear?
randolph likes this.
canopus is offline   Reply With Quote

Old   February 18, 2017, 02:05
Default
  #8
Member
 
Saurav Kumar
Join Date: Jul 2016
Posts: 80
Rep Power: 9
srv537 is on a distinguished road
Hi
i used
Quote:
pimpleFoam -postProcess -func wallShearStress
to calculate wallShearStress but it gives me only for saved data file but my case is unsteady so after some time i have to take average of all and to do this i want to calculate wallShearStress at each time step and its temporal average.
how to do it, please tell me. is there any method or code available in controlDict file to do this?

Thank you
srv537 is offline   Reply With Quote

Old   July 11, 2018, 12:14
Default
  #9
Senior Member
 
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 10
randolph is on a distinguished road
Quote:
Originally Posted by canopus View Post
I found its possible to write in runtime with
Code:
wallShearStress1
    {
        type        wallShearStress;
        functionObjectLibs ("libutilityFunctionObjects.so");
        patches     ("wallbot");
//        outputControl   timeStep;
        outputControl   runTime;
        writeInterval   0.005;
    }
But problem is
How can I make it write in postProcessing directory as the results of probe appear?

I do not see how this will work. How will the solver pass the turbulence model information to the function object?
randolph is online now   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
wallShearStress, wallGradU are inconsistent dancfd OpenFOAM Post-Processing 5 July 18, 2018 08:33
why does 'sample' do this? wallShearStress question CHARLES OpenFOAM Post-Processing 0 August 7, 2013 19:30


All times are GMT -4. The time now is 10:50.