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 Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By uckmhnds

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 5, 2017, 10:12
Default postProcessing "grad(U")
  #1
New Member
 
Livia Adinolfi
Join Date: May 2017
Posts: 15
Rep Power: 8
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, 11:30
Default
  #2
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 20
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, 12:35
Default
  #3
New Member
 
Livia Adinolfi
Join Date: May 2017
Posts: 15
Rep Power: 8
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, 07:06
Default
  #4
New Member
 
Gazi Yavuz
Join Date: Apr 2018
Posts: 17
Rep Power: 8
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, 04:20
Default answer
  #5
New Member
 
Masoumeh
Join Date: Oct 2019
Posts: 21
Rep Power: 6
ms.hashempour is on a distinguished road
just type:

postProcess -func "grad(U)"


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


All times are GMT -4. The time now is 13:43.