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

how to calculate 'grad(UMean)' in OF-5.0?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 2 Post By kera

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 5, 2018, 04:35
Default how to calculate 'grad(UMean)' in OF-5.0?
  #1
New Member
 
sagar saroha
Join Date: Sep 2015
Posts: 11
Rep Power: 8
sagar_saroha is on a distinguished road
I have been using:
pisoFoam -postProcess -func "grad(U)"
and it works well... but when i try using:
pisoFoam -postProcess -func "grad(UMean)"
for calculating mean velocity gradient - it show the following error


--> FOAM Warning : functionObjects::grad grad(UMean) cannot find required object UMean of type volScalarField
--> FOAM Warning : functionObjects::grad grad(UMean) cannot find required object UMean of type surfaceScalarField
--> FOAM Warning : functionObjects::grad grad(UMean) cannot find required object UMean of type volVectorField
--> FOAM Warning : functionObjects::grad grad(UMean) cannot find required object UMean of type surfaceVectorField
--> FOAM Warning : functionObjects::grad grad(UMean) failed to execute.

Please help me identify the mistake or suggest an alternate way to calculate gradient of mean velocity.


Last edited by sagar_saroha; February 6, 2018 at 02:38. Reason: incomplete question
sagar_saroha is offline   Reply With Quote

Old   February 5, 2018, 08:17
Default a smart alternative patch
  #2
New Member
 
sagar saroha
Join Date: Sep 2015
Posts: 11
Rep Power: 8
sagar_saroha is on a distinguished road
In my attempts to solve the problem, I managed to get an alternate way of doing so...
Seemingly the problem was mainly due to the name of the file 'UMean'. I did rename the file to 'U' and then calculated its gradient using

pisoFoam -postProcess -func "grad(U)"
I still expect to hear from experienced users about the non-eluding way of addressing it.

Last edited by sagar_saroha; February 6, 2018 at 02:38.
sagar_saroha is offline   Reply With Quote

Old   February 5, 2018, 09:18
Default
  #3
Member
 
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 9
kera is on a distinguished road
Hallo Sagar!

If you already have your simulation results of the case!

Can you tell me, what output do you get after executing this piece of command in the terminal:

Code:
postProcess -latestTime -func "grad(UMean)" 

or 

postProcess -noZero -func "grad(UMean)"
or if you wanna re-run the simulation, try executing with the command, (I am not sure about this one):

Code:
pisoFoam -postProcess -noZero -func "grad(UMean)"

Regards,
Ricky

PS: I am assuming that the UMean field exist in your time directories
sagar_saroha and rezika like this.
__________________
If it is easy, then something is fishy!
kera is offline   Reply With Quote

Old   February 6, 2018, 02:36
Default
  #4
New Member
 
sagar saroha
Join Date: Sep 2015
Posts: 11
Rep Power: 8
sagar_saroha is on a distinguished road
Hi Ricky

Thanks a lot for the reply; both of your suggestions do work:


Quote:
Originally Posted by kera View Post

Code:
postProcess -latestTime -func "grad(UMean)" 

or 

postProcess -noZero -func "grad(UMean)"
PS: I am assuming that the UMean field exist in your time directories

yeah, I had UMean field existing in the time directories.

I am curious to know if it was 'zero' time folder which was causing issue or something else?
sagar_saroha is offline   Reply With Quote

Old   February 6, 2018, 04:33
Default
  #5
Member
 
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 9
kera is on a distinguished road
Hallo Sagar!

well your suspicion is in fact correct. It was actually the "zero" folder that was causing the error, as "UMean" field is not available at the start, rather it is created in the subsequent iterations. --> at least that's what I think

Regards,
Ricky

Quote:
Originally Posted by sagar_saroha View Post

I am curious to know if it was 'zero' time folder which was causing issue or something else?
__________________
If it is easy, then something is fishy!
kera is offline   Reply With Quote

Old   June 2, 2020, 07:25
Default
  #6
Member
 
Join Date: Apr 2018
Location: UK
Posts: 68
Rep Power: 5
JM27 is on a distinguished road
Hello,


I know this post is a bit old but it's the only one I could find that prints a similar error message to what I'm getting.

I am also using OF v5 and I introduced a functionObject in my controlDict to calculate the gradient of velocity during run-time using grad(U).

The functionObject is:

Code:
gradUtensor// shearStressU // originally gradientU
       {
        type             grad;
        libs             ("libfieldFunctionObjects.so");
        field            U;
        writeControl     writeTime;

       }
and the warning that is printed in the log file is:

Code:
--> FOAM Warning :     functionObjects::grad gradUtensor cannot find required object U of type volScalarField
--> FOAM Warning :     functionObjects::grad gradUtensor cannot find required object U of type surfaceScalarField
I've tried changing the name of the function and I have also tried the postProcess option using -noZero and -latestTime flags on a different case and I still get a similar error. The grad(U) is computed but I am not sure why the WARNING continues to be printed? Am I missing something?
JM27 is offline   Reply With Quote

Reply

Tags
grad(umean), openfoam 5, post procesing

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Calculate CF Odusseas Tecplot 3 August 28, 2020 15:16
calculate friction factor & nusselt number soheil1991 FLUENT 3 March 11, 2017 10:30
How to calculate grid width in control volume Ingenierias2003 OpenFOAM 5 November 24, 2010 13:40
how to calculate flow properties along the first grid point near to the wall kiran OpenFOAM Post-Processing 2 September 12, 2010 13:59
calculate values for eps and k from Re or u????? sbar OpenFOAM Pre-Processing 5 August 16, 2010 05:10


All times are GMT -4. The time now is 19:09.