CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   OpenFOAM sample utility (http://www.cfd-online.com/Forums/openfoam-post-processing/116043-openfoam-sample-utility.html)

aylalisa April 11, 2013 14:22

OpenFOAM sample utility
 
Hello,

could anybody give me an hint how to use sample utility correctly for all time steps?

I only would like to sample Ux from the velocity field U.

sampleDict-file

Quote:

setFormat raw;

surfaceFormat vtk;

interpolationScheme cellPoint;


fields
(
Ux
);


sets
(
lineX1
{
type uniform;
axis z;
start (1 0.125 0.01);
end (1 0.125 0.02);
nPoints 30;
}

);
If I use sample utility the folder sets is created, but contains only one time directory 0 including demanded Ux data. Other time directories, including Ux, are missing.

The help menu offers the option -time <range>.

sample -time :0.1-1.5: (and similar versions) don't work.



Aylalisa

wyldckat April 14, 2013 14:45

Greetings Aylalisa,

A few questions:
  • Which OpenFOAM version are you using?
  • Try running:
    Code:

    sample -latestTime
    Did it work at least for the final time instance?
If you are using OpenFOAM 2.2.0 and the last time instance was not outputted either, then the problem might be related to this one: http://www.openfoam.org/mantisbt/view.php?id=813 - if this is the case, then you'll need to upgrade to OpenFOAM 2.2.x.


As for running for all time steps, I think is should be something like ("1.5" is the last time step):
Code:

sample -time :1.5
Or better yet:
Code:

sample -time 0:
Best regards,
Bruno

aylalisa April 16, 2013 09:15

sample Ux
 
Hello Bruno,

sample util works well if I sample U for all time steps or a range of time steps. All your recommended commands are fine.
I am not able to extract only Ux of velocity field U.
I have tried Ux, U(x), UX, U(1) and U.component(1) but do not receive the required result.

OpenFOAM version 2.1.1

Do you know the solution for my problem?

Thanks a lot!

Best regards,
Lisa

Quote:

Originally Posted by wyldckat (Post 420480)
Greetings Aylalisa,

A few questions:
  • Which OpenFOAM version are you using?
  • Try running:
    Code:

    sample -latestTime
    Did it work at least for the final time instance?
If you are using OpenFOAM 2.2.0 and the last time instance was not outputted either, then the problem might be related to this one: http://www.openfoam.org/mantisbt/view.php?id=813 - if this is the case, then you'll need to upgrade to OpenFOAM 2.2.x.


As for running for all time steps, I think is should be something like ("1.5" is the last time step):
Code:

sample -time :1.5
Or better yet:
Code:

sample -time 0:
Best regards,
Bruno


samsi April 16, 2013 11:31

You have to create your components of the velocity vector before running sample utility with this command:
foamCalc components U
This will create Ux, Uy, Uz folders in your time directories. After that you can run the sample utility


All times are GMT -4. The time now is 08:15.