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

postProcess -func sampleDict does not create output folder

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By tmr2044

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 20, 2017, 01:42
Default postProcess -func sampleDict does not create output folder
  #1
New Member
 
Trent
Join Date: Jun 2017
Location: Fresno, California USA
Posts: 4
Rep Power: 9
tmr2044 is on a distinguished road
Hello,

As stated in the title, the function postProcess -func sampleDict is not returning any data. This has only happened once I repurposed my sampleDict to sample values on an arbitrary plane; when I ran the same function for a sampleDict sampling along an arbitrary line, a postProcessing directory was returned containing all the data. My sampleDict file is below:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      sampleDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
surfaceFormat raw;
interpolationScheme cell;
sets();
surfaces
(
    constantPlane
    {
        type              plane;    // always triangulated
        basePoint       (0.05 0.05 0.3);
        normalVector  (0 0 1);
    }
);
fields
(
    Uz
);
Thank you in advance for any help.
tmr2044 is offline   Reply With Quote

Old   June 20, 2017, 02:36
Lightbulb Solved!
  #2
New Member
 
Trent
Join Date: Jun 2017
Location: Fresno, California USA
Posts: 4
Rep Power: 9
tmr2044 is on a distinguished road
I found the solution to my own problem:

Sampling is not a function that has been 'superceded' (OF error's words) by calling sampleDict using postProcess, which was why I used the command
Code:
postProcess -func sampleDict
because of this, I had to include in my sampleDict the following (per OF error's instructions):
Code:
type    sets;
libs    ("libsampling.so");
*I did have this in my original sampleDict (just got lost amongst comments when I was copying pasting onto my post), which was why the command I used worked when I sampled along a line*

SOLUTION:


change
Code:
type    sets;
to
Code:
type    surfaces;
and voila! It works! Hope this helps someone!
tmr2044 is offline   Reply With Quote

Old   October 5, 2018, 12:09
Default Similar problem.
  #3
New Member
 
Join Date: Sep 2018
Posts: 4
Rep Power: 8
scrubber is on a distinguished road
Hello.

I have a similar problem running "postProcess -func sampleDict". No folder named "postProcessing" is created.

It seems like it is reading the my velocity field "U.air".
See my sampleDict below. Any help, is much appreciated.






____________________________

Time = 1

Reading fields:
volVectorFields: U.air


Executing functionObjects

End
__________________________


My sampleDict:




// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


setFormat raw;

surfaceFormat vtk;


{
ensight
{
format ascii;
}
}


interpolationScheme cellPoint;

// Fields to sample.
fields
(
U.air
);



type sets;
libs ("libsampling.so");

sets
(
BFS_xH_2
{
type midPointAndFace;// lineCellFace;//
axis distance;
start (0.0534 0.0000 0.0000);
end (0.0534 0.0667 0.0000);
}
BFS_xH_5
{
type lineCellFace;//midPointAndFace;
axis distance;
start (0.1335 0.0000 0.0000);
end (0.1335 0.0667 0.0000);
}
BFS_xH_7
{
type lineCellFace;//midPointAndFace;
axis distance;
start (0.1869 0.0000 0.0000);
end (0.1869 0.0667 0.0000);
}
BFS_xH_9
{
type lineCellFace;//midPointAndFace;
axis distance;
start (0.2403 0.0000 0.0000);
end (0.2403 0.0667 0.0000);
}
BFS_xH_12
{
type lineCellFace;//midPointAndFace;
axis distance;
start (0.3204 0.0000 0.0000);
end (0.3204 0.0667 0.0000);
}
BFS_xH_14
{
type lineCellFace;//midPointAndFace;
axis distance;
start (0.3738 0.0000 0.0000);
end (0.3738 0.0667 0.0000);
}
);



surfaces
(
);


// ************************************************** ********************* //
scrubber is offline   Reply With Quote

Old   October 5, 2018, 15:30
Default RE: Scrubber
  #4
New Member
 
Trent
Join Date: Jun 2017
Location: Fresno, California USA
Posts: 4
Rep Power: 9
tmr2044 is on a distinguished road
Hello Scrubber,

Does OF give you any errors when you try and run sampleDict?
tmr2044 is offline   Reply With Quote

Old   October 6, 2018, 05:30
Default
  #5
New Member
 
Join Date: Sep 2018
Posts: 4
Rep Power: 8
scrubber is on a distinguished road
Hello Tmr2044.

If I try to just run the command simpleDict, OF give this error
jens@jens-VirtualBox:~/OpenFOAM/jens-6/run/test_case/BFS/DPMFoam_2WC$ simpleDict
simpleDict: command not found

I get no error from OF when running "postProcess -func sampleDict", but no postProcessing folder is created.
scrubber is offline   Reply With Quote

Old   April 25, 2021, 23:28
Default Thanks
  #6
New Member
 
Join Date: Apr 2021
Posts: 1
Rep Power: 0
DevinS is on a distinguished road
Thank you guys!

By adding

type sets;
libs ("libsampling.so");


to my sampleDict, and use "postProcess -func sampleDict -latestTime" command. It finally succeed to sample!
DevinS is offline   Reply With Quote

Old   April 27, 2021, 09:36
Default
  #7
New Member
 
Adewumi Taiwo
Join Date: Apr 2018
Posts: 2
Rep Power: 0
Da Lord's is on a distinguished road
Hi everyone,


I had the same challenge as Trent, followed the fixes suggested on this page, but the postprocessing folder was still not created. I used the command "postProcess -func sampleDict -latestTime" as suggested by DevinS, but no output folder was created. Attached is my sampleDict.


Any help is well appreciated in advance.


Thanks.



Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      sampleDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
surfaceFormat raw;

interpolationScheme cell;
type    sets;
type    surfaces;

libs    ("libsampling.so");

surfaces
(
    constantPlane
    {
    type            constantPlane;
        planeType       pointAndNormal;    // always triangulated
        basePoint       (-126 0 110);
        normalVector  (0 0 1);
    }
);
fields
(
    U
);
Da Lord's is offline   Reply With Quote

Old   April 27, 2021, 15:33
Default
  #8
New Member
 
Adewumi Taiwo
Join Date: Apr 2018
Posts: 2
Rep Power: 0
Da Lord's is on a distinguished road
I later found my way around it. I changed the type from "constantPlane" to "cuttingPlane". Nonetheless, the data is repetitive at many locations, I could not easily plot it in matlab. I also took the data from the same plane in paraview and the data writes the same way.


Formerly, surface data was always written according to the point file. It seems so many things are changed now.


I have seen a similar thread, where a user provided an octave code to sort the rows of the data but the code is not working for me.


I will appreciate if there is a way to directly generate the points data result from openfoam.


Thanks again anticipation.
Da Lord's is offline   Reply With Quote

Reply

Tags
openfoam, postprocessing, sampling


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
Meshing a Sphere Ajay FLUENT 10 September 3, 2016 15:18
create an output file only at the endTime Cyp OpenFOAM Programming & Development 3 March 4, 2011 05:15
Actuator disk model audrich FLUENT 0 September 21, 2009 08:06
Where's the singularity/mesh flaw? audrich FLUENT 3 August 4, 2009 02:07
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


All times are GMT -4. The time now is 11:56.