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

call a function from controlDict with postProcess

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 21, 2017, 11:46
Default call a function from controlDict with postProcess
  #1
Senior Member
 
Join Date: Jan 2015
Posts: 150
Rep Power: 11
Svensen is on a distinguished road
Is it possible to execute a function from controlDict after a simulation is done ?

For example, if the controlDict looks like:
Code:
application     icoFoam;

startFrom       startTime;

...

functions
{
        
    central_slice
    {
        type            surfaces;
        libs            ("libsampling.so");

        ...

        surfaces
        (
            cuttingPlane
            {
                type         cuttingPlane;
                ...
                }                
            }
        );
    }
};
Could I execute a 'central_slice' function to process the available datafiles ?
Thanks
Svensen is offline   Reply With Quote

Old   June 21, 2017, 11:47
Default
  #2
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
Use the -postProcess command line option.
__________________
*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

Old   June 22, 2017, 01:51
Default
  #3
Senior Member
 
Join Date: Jan 2015
Posts: 150
Rep Power: 11
Svensen is on a distinguished road
Yes, but I saved only U and p fields by reconstructPar and when I run pisoFoam -postProcess it showes that there is no 'sigma' field. But I don't need it for the surfaces functionObject.
Is it any idea how to solve this ?

Code:
Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
Selecting laminar stress model Maxwell
--> FOAM Warning : 
--> FOAM FATAL IO ERROR: 
cannot find file

file: /home/sergey/OpenFOAM/sergey-dev/run/probe/0.5/sigma at line 0.

    From function regIOobject::readStream()
    in file db/regIOobject/regIOobjectRead.C at line 72.
Svensen is offline   Reply With Quote

Old   July 20, 2017, 09:44
Default
  #4
Member
 
Linyan X
Join Date: Dec 2015
Posts: 43
Rep Power: 10
linyanx is on a distinguished road
Quote:
Originally Posted by akidess View Post
Use the -postProcess command line option.
Hi Anton,

Could you please give me some resource about the -postProcess command line option, any illustrations or instruction in the link or guidebook?

I'm going to probe the finished simulation and find this may be a good way for me to do that. The 'postProcess -func probes' didn't work for me by failing to recognize the system/probesDict.

Best,
Linyan
linyanx is offline   Reply With Quote

Old   July 28, 2017, 03:25
Default
  #5
New Member
 
Dan
Join Date: Nov 2013
Posts: 23
Rep Power: 12
Danubi is on a distinguished road
Hello linyanx,

Take a look here.

The best way I found to define a dictionary for the postProcess is to go to $FOAM_ETC and find there a template to be included in the system/ folder.

Regards
Danubi is offline   Reply With Quote

Old   July 28, 2017, 04:00
Default
  #6
Senior Member
 
Join Date: Jan 2015
Posts: 150
Rep Power: 11
Svensen is on a distinguished road
What about the missing 'sigma' field?
Is it any way to post-process data files without this ?
Svensen is offline   Reply With Quote

Old   July 28, 2017, 05:11
Default
  #7
New Member
 
Dan
Join Date: Nov 2013
Posts: 23
Rep Power: 12
Danubi is on a distinguished road
What is sigma in your case? Do you have it as a field in your processor/ folders?

Perhaps you need to reconstruct it as well or run the postProcess in parallel to use it.
Danubi 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
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 03:23
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 13:06
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 06:42
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 04:37
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 10:23


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