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

postProcess functionality in openFOAM 4 and total(p)

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By mnikku

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 26, 2017, 06:39
Default postProcess functionality in openFOAM 4 and total(p)
  #1
Member
 
LVDH's Avatar
 
Andre Z
Join Date: Dec 2009
Posts: 75
Rep Power: 16
LVDH is on a distinguished road
Hi,
currently I am adapting some of my software to work with OF 4.1. The new post processing functionality is giving me a hard time though.
If I for example run the motorBike tutorial and create a total pressure field using:
Code:
mpirun -np 6 postProcess -func 'totalPressureIncompressible(U,p)' -parallel -latestTime
I get a new field in the 500 folder called "total(p)".
If I now modify the cuttingPlane stuff to this to include the total pressure:
Code:
cuttingPlane
{
    type            surfaces;
    libs ("libsampling.so");
    writeControl    writeTime;

    surfaceFormat   vtk;
    fields          ( p U total(p));

    interpolationScheme cellPoint;

...
I will later not get the expected cutting planes but this message:
Code:
--> FOAM Warning : 
    From function Foam::label Foam::sampledSurfaces::classifyFields()
    in file sampledSurface/sampledSurfaces/sampledSurfacesGrouping.C at line 75
    Cannot find registered field matching total(p)
In older OF versions I simply renamed the field with brackets to something new and it worked. If I do that now it does not help. The funny thing is that in 4.1 using total(p) as a field to create an isosurface does work.
So as I prefer not to change anything in the OF code I am wondering what I can do. I tried casting the brackets with all kinds of tricks but it never helped.

Does anyone have an idea?
__________________
www.MantiumCAE.com
LVDH is offline   Reply With Quote

Old   February 10, 2017, 05:50
Default
  #2
Member
 
Join Date: May 2015
Posts: 34
Rep Power: 10
mnikku is on a distinguished road
I got the same classifyFields() error as you with OF4.1 with twoPhaseEulerFoam when trying to create surfaces of timeaveraged values ( named Mean after the variable, for example pMean for timeaverage of p).

I found that using command postProcess was able to handle the Mean files, while using the solver name ie. twoPhaseEulerFoam -postProcess returned the classifyFields() error.

Another option is workaround: copy your unaccepted filename over an accepted filename. I copied my pMean to p and now it was also accepted both ways... I wouldn't use this without backing up the original files though...
LVDH likes this.

Last edited by mnikku; February 10, 2017 at 05:51. Reason: Fixing some silly typos
mnikku is offline   Reply With Quote

Old   February 15, 2017, 05:43
Default
  #3
Member
 
LVDH's Avatar
 
Andre Z
Join Date: Dec 2009
Posts: 75
Rep Power: 16
LVDH is on a distinguished road
Quote:
Originally Posted by mnikku View Post
Another option is workaround: copy your unaccepted filename over an accepted filename. I copied my pMean to p and now it was also accepted both ways... I wouldn't use this without backing up the original files though...
Good idea, I did not think about just using an accepted name. Too bad that seems to be a new concept. This makes using custom functionObjects more difficult.
My solution was to simply calculate the pressure coefficient in the post-processing tool (VTK).
__________________
www.MantiumCAE.com
LVDH is offline   Reply With Quote

Old   August 9, 2017, 09:11
Default
  #4
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
This should work if you call postProcess -field "total(p)" with the function object you already posted. Renaming is not necessary.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess 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
a reconstructPar issue immortality OpenFOAM Post-Processing 8 June 16, 2013 11:25


All times are GMT -4. The time now is 03:24.