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

wallGradU at runtime

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 5, 2015, 00:56
Default wallGradU at runtime
  #1
Senior Member
 
Join Date: Jan 2013
Posts: 135
Rep Power: 13
kkpal is on a distinguished road
Dear all,
In order to calculate the instantaneous total force, which is composed of pressure force and shear force on the surface of the body, I need to obtain the pressure(p) and friction\partial u/\partial y on the surface. The former could be easily done by including a surface probe function in the controlDict. However, there seems to be no such function for obtaining the friction distribution at runtime. Only some post-processing tools like wallShearStress, wallGradU are available. Could someone give me some hints about how to obtain the runtime wallGradU ?

best,
kkpal is offline   Reply With Quote

Old   June 8, 2015, 10:48
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 646
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

Is there any particular reason you do not use the forces functionObject? It does calculate those forces instantaneously for you.

Regards,
Tom
tomf is offline   Reply With Quote

Old   June 10, 2015, 12:55
Default
  #3
Senior Member
 
Join Date: Jan 2013
Posts: 135
Rep Power: 13
kkpal is on a distinguished road
Hi, in order to use the functionObject, I need to write down all the files at time interval that is small enough and do the postProcessing with these written files. In the case of large mesh, it would be prohibitive because writing large amount of data to disk is time and disk space consuming. That's why I need to use a runtime utility of wallGradU.
With the extensibility of OpenFOAM I'm sure one could do some programming to achieve this... Could someone give me some hints on this?
Quote:
Originally Posted by tomf View Post
Hi,

Is there any particular reason you do not use the forces functionObject? It does calculate those forces instantaneously for you.

Regards,
Tom
kkpal is offline   Reply With Quote

Old   June 10, 2015, 13:02
Default
  #4
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 646
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
The functionObject is executed at runTime, that is the whole point of the functionObjects.

Just use it like this (in the functions part of your controlDict):

Code:
    
    forces_Total
    {
        type forces;
        functionObjectLibs ("libforces.so");
        patches
        (
           <yourPatchNames(s)>
        );
        rhoName        rho;//rhoInf; (rhoInf for incompressible)
        pName           p;
        rhoInf             1.225;
        CofR              (0 0 0);
        outputControl  timeStep; //This says to execute every timeStep!
        outputInterval  1;
        log                 false;
    }
This will give you a contiuously updated file with the pressure viscous (and porous) forces.

Regards,
Tom

Last edited by tomf; June 10, 2015 at 13:03. Reason: clarification
tomf is offline   Reply With Quote

Old   June 11, 2015, 03:49
Default
  #5
Senior Member
 
Join Date: Jan 2013
Posts: 135
Rep Power: 13
kkpal is on a distinguished road
Hi, Tomf,
I made some mistakes in the previous post, I was a little dizzy when I was writing that yesterday

I now realize that the functionObject is the thing I needed to output the total or averaged viscous force on the wall. Thank you.

However, the problem I'm facing is one step further. I need to calculate the sectional viscous force on a circular cylinder, since this cylinder is 3 dimensional(waviness or taper in the span-wise direction). The available functionObject will only give the mean viscous force of the whole cylinder.

This is the question that is haunting me. Sorry for the vague illustration in the previous posts.
kkpal is offline   Reply With Quote

Old   June 11, 2015, 04:17
Default
  #6
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 646
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Well, there is actually the "bin" functionality, which gives "sectional" output, just add it to the functionObject description.

This was released in version 2.2:
http://www.openfoam.org/version2.2.0...processing.php

Code:
    binData
    {
        nBin        20;
        direction   (1 0 0);
        cumulative  yes;
    }
You may want to google for some examples/more descriptions.
tomf is offline   Reply With Quote

Old   June 12, 2015, 20:56
Default
  #7
Senior Member
 
Join Date: Jan 2013
Posts: 135
Rep Power: 13
kkpal is on a distinguished road
Wow, that's exciting! I will try that out!
thank you, Tom
kkpal 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
runTime deji OpenFOAM 2 January 17, 2019 10:14
Problem in3D model processing mebinitap OpenFOAM 2 December 12, 2014 05:40
getting (0 0 0) wallGradU value when i m probing wallGradU at some points suryawanshi_nitin OpenFOAM 1 December 9, 2013 12:36
Runtime modification of a volScalarField Scofield OpenFOAM Programming & Development 4 October 1, 2013 09:31
runTime out of scope in functionObject Sune OpenFOAM Programming & Development 2 September 26, 2012 03:11


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