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

postProcessing "grad(U")

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

Like Tree1Likes
  • 1 Post By uckmhnds

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 5, 2017, 11:12
Default postProcessing "grad(U")
  #1
New Member
 
Livia Adinolfi
Join Date: May 2017
Posts: 14
Rep Power: 6
liviaadi is on a distinguished road
Dear Foamers,

I would like to calculate the shear stresses in a laminar simulation of an open channel flow. I am using the interFoam solver with OF 4.1
I was trying to postProcess and calculate grad(U). But I have this error:

Executing functionObjects
--> FOAM Warning :
From function bool Foam::functionObjects::regionFunctionObject::store (Foam::word&, const Foam::tmp<T>&, bool) [with ObjectType = Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh>]
in file /home/ubuntu/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/regionFunctionObjectTemplates.C at line 61
Cannot store cache-able field with the named used in the cache.
Either choose a different name or cache the field and use the 'writeObjects' functionObject.
--> FOAM Warning : functionObject grad: Cannot find required field U

-------------------------------------------------------------------------------------------------------------------

I know that there are many threads on this topic and I have read something, but still I did not solve this problem.

Can anyone help me ?
Thanks in advance.
liviaadi is offline   Reply With Quote

Old   September 5, 2017, 12:30
Default
  #2
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 18
floquation will become famous soon enough
Which command exactly did you type?

Did you include something like "-field U" or "-fields (U)" in the argument list, such that the utility knows that it should read U from file?
floquation is offline   Reply With Quote

Old   September 5, 2017, 13:35
Default
  #3
New Member
 
Livia Adinolfi
Join Date: May 2017
Posts: 14
Rep Power: 6
liviaadi is on a distinguished road
Hi,

after the simulation:

interFoam -postProcess -func "grad(U)".

I tried also to do it in runtime by typing in the ControlDict file:

functions
{

grad
{
type grad(U);
libs ("libFVFunctionObjects.so");
fieldName "U";
resultName "gU";
}

}

but I have always the same error.
What would you suggest ?

Thanks a lot!
liviaadi is offline   Reply With Quote

Old   April 6, 2020, 08:06
Default
  #4
New Member
 
Gazi Yavuz
Join Date: Apr 2018
Posts: 17
Rep Power: 5
uckmhnds is on a distinguished road
this is too late answer. though it would be helpful for others. the function should be like;

Code:
functions
{

gradient /could be anything you name
{
type grad;
libs ("libfieldFunctionObjects.so");
field U;
writeControl writeTime;
}

}
osu_tom likes this.
uckmhnds is offline   Reply With Quote

Old   October 11, 2021, 05:20
Default answer
  #5
New Member
 
Masoumeh
Join Date: Oct 2019
Posts: 19
Rep Power: 4
ms.hashempour is on a distinguished road
just type:

postProcess -func "grad(U)"


ms.hashempour is offline   Reply With Quote

Reply

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
using fieldAverage library to average postprocessing eelcovv OpenFOAM Programming & Development 31 December 24, 2020 05:31
How to export the specific heat and viscosity for postprocessing (compressible) ? david39 OpenFOAM Post-Processing 2 January 4, 2019 08:04
PostProcessing of particle source boesendorfer FLOW-3D 3 October 26, 2017 17:22
Postprocessing in 3d - Creating part of a surface shankara.2 FLUENT 0 July 13, 2009 18:33
Question about Postprocessing Using UDF(in tutoria sarah_ron2002 FLUENT 1 April 10, 2007 17:17


All times are GMT -4. The time now is 14:12.