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

Data Output

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 29, 2010, 02:48
Default Data Output
  #1
Senior Member
 
Rickard
Join Date: May 2010
Location: Lund, Skåne, Sweden
Posts: 143
Rep Power: 8
Rickard.Solsjo is on a distinguished road
I was just wondering how OpenFoam sorts the output data?
When I e.g. look in say timestep 0.0015 (whatever) there is a long list of, lets say, temperatures in the T-textfile. How can I interpret these values? I want to make correlations in MatLab and only use a plane.

Does anyone have an idea?
Rickard.Solsjo is offline   Reply With Quote

Old   July 29, 2010, 04:04
Default
  #2
New Member
 
Palma González García
Join Date: May 2009
Location: Valencia, Spain
Posts: 8
Rep Power: 9
Palminchi is on a distinguished road
As you say as an example, for temperature, it says the value of this parameter in each cell, i.e., if your mesh have 30000 cells, the first value is the temperature in cell#1 and so on. For velocity, there is a vector with the components, Ux, Uy and Uz -> (Ux, Uy, Uz) and it works the same as scalar variables. I hope it can help
Palminchi is offline   Reply With Quote

Old   July 29, 2010, 05:15
Default
  #3
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 1,163
Rep Power: 20
akidess will become famous soon enough
Based on what Palminchi says you are getting a 1D list of cells with their associated variable values. It's going to be tough extracting a plane from that. You might want to use the 'sample' tool to extract data on a plane.
akidess is offline   Reply With Quote

Old   July 29, 2010, 05:17
Default
  #4
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Belgium
Posts: 187
Rep Power: 9
cedric_duprat is on a distinguished road
Hi Richard

If you are interesting in only one plane of your geometry, you should look for the samplePlane tools (at least in OF 1.4.1) and post-process only this plane.

You can get a column text file with x,y,z and T for example which can be interpreted by matlab easily.

I hope this will help you

Cedric
cedric_duprat is offline   Reply With Quote

Old   July 29, 2010, 06:49
Default
  #5
Senior Member
 
Rickard
Join Date: May 2010
Location: Lund, Skåne, Sweden
Posts: 143
Rep Power: 8
Rickard.Solsjo is on a distinguished road
Okay that sounds great. So how do I use it ?
Is it something i have to download
Rickard.Solsjo is offline   Reply With Quote

Old   July 29, 2010, 08:06
Default
  #6
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Belgium
Posts: 187
Rep Power: 9
cedric_duprat is on a distinguished road
Nothing to download.
You'll have to add a file called sampleSurfaceDict where you'll define your plane coordinate (point + normal vector) and that's all. An example of this file can be found in a tutorial (I don't remember which one)
If you want to check the code it's in application/utilities/postProcessing/
I hope this will help

Cedric
cedric_duprat is offline   Reply With Quote

Old   July 29, 2010, 08:14
Default
  #7
Senior Member
 
Rickard
Join Date: May 2010
Location: Lund, Skåne, Sweden
Posts: 143
Rep Power: 8
Rickard.Solsjo is on a distinguished road
Are you referring to the sampleDict? Or there is actually a folder called sampleSurfaceDict?
Rickard.Solsjo is offline   Reply With Quote

Old   July 29, 2010, 08:27
Default
  #8
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Belgium
Posts: 187
Rep Power: 9
cedric_duprat is on a distinguished road
SampleDict is the file used by the application "sample" to print in a file values along a line . So in this file you define the line.

SampleSurfaceDict is the file used by the application "sampleSurface" to print in a file values in a plane. So in this file you define the plane coordinates
cedric_duprat is offline   Reply With Quote

Old   July 29, 2010, 08:33
Default
  #9
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Belgium
Posts: 187
Rep Power: 9
cedric_duprat is on a distinguished road
In OF 1.4.1, it was there:

applications/utilities/postProcessing/miscellaneous/sampleSurface

and an example of the sampleSurfaceDict can be found there too.

I don't know for more recent version of the code but, you should however find a similar tool.

Cedric
cedric_duprat is offline   Reply With Quote

Old   July 29, 2010, 08:41
Default
  #10
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 1,163
Rep Power: 20
akidess will become famous soon enough
Cedric, you are misinformed. sample with sampleDict can be used to extract surfaces as well, see U-165.
akidess is offline   Reply With Quote

Old   July 29, 2010, 08:44
Default
  #11
Senior Member
 
Rickard
Join Date: May 2010
Location: Lund, Skåne, Sweden
Posts: 143
Rep Power: 8
Rickard.Solsjo is on a distinguished road
Ah okay. So I suppose that I type. e.g
55 constantPlane
56 {
57 name constantPlane;
58
59 basePoint (0.0 0 0);
60 normalVector (0 1 -1);
61
62 // Optional: whether to leave as faces or triangulate (=default)
63 triangulate false;
64 }

What about the other ones, interpolation .... and following. Can I just skip these? Does OpenFoam know which one i want to use? In the terminal later; do I type sampleSurface or just sample?
Thx
Rickard.Solsjo is offline   Reply With Quote

Old   July 29, 2010, 08:54
Default
  #12
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 1,163
Rep Power: 20
akidess will become famous soon enough
There is a reference sampleDict file in ~/OpenFOAM/OpenFOAM-1.x/applications/utilities/postProcessing/sampling/sample/.

What you are missing in your example is specification of "type plane;". All the other entries are optional. How would OpenFOAM know what you want to use? You'll have to see if the default works for you or if you have to specify more to meet your expectations. The tool to use is 'sample', sampleSurface doesn't seem to be included any more in version 1.5 (and presumingly later versions).
akidess is offline   Reply With Quote

Old   July 29, 2010, 09:07
Default
  #13
Senior Member
 
Rickard
Join Date: May 2010
Location: Lund, Skåne, Sweden
Posts: 143
Rep Power: 8
Rickard.Solsjo is on a distinguished road
Okay, so my conclusion is that I should use sampleDict instead of sampleSurfaceDict and try to get that working instead.
Rickard.Solsjo is offline   Reply With Quote

Old   July 29, 2010, 09:23
Default
  #14
Senior Member
 
Rickard
Join Date: May 2010
Location: Lund, Skåne, Sweden
Posts: 143
Rep Power: 8
Rickard.Solsjo is on a distinguished road
Any reason why this shouldnt work ?

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location system;
object sampleDict;
}

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


setFormat raw;


surfaceFormat vtk;


interpolationScheme cellPoint;

fields
(
p
U
N-DODECANE
);



surfaces
(
constantPlane
{
type plane; // always triangulated
basePoint (0.0 0.0 0.0);
normalVector (0 0 -1);

//- Optional: restrict to a particular zone
// zoneName zone1;
}

);


// ************************************************** ********************* //
Rickard.Solsjo is offline   Reply With Quote

Old   July 29, 2010, 09:34
Default
  #15
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 1,163
Rep Power: 20
akidess will become famous soon enough
Looks good to me, except you might want to set surfaceFormat to raw if you are writing your own import function for MATLAB. Are you having problems?
akidess is offline   Reply With Quote

Old   July 29, 2010, 09:41
Default
  #16
Senior Member
 
Rickard
Join Date: May 2010
Location: Lund, Skåne, Sweden
Posts: 143
Rep Power: 8
Rickard.Solsjo is on a distinguished road
I changed what you said but i still have some problems



surfaceFormat raw;
setFormat raw;
interpolationScheme cellPoint;
fields
(
p
U
);
surfaces
(
constantPlane
{
type plane;
basePoint (0.0 0.0 0.0);
normalVector (0 0 -1);

}
);

Its when I remove the sets that it doesnt work anymore.
The sets being lines and stuff. But I dont want lines, just a plane.
Any idea?
thx
Rickard.Solsjo is offline   Reply With Quote

Old   July 29, 2010, 09:55
Default
  #17
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 1,163
Rep Power: 20
akidess will become famous soon enough
Try retaining an empty list of sets ->

sets ();
akidess is offline   Reply With Quote

Old   July 29, 2010, 09:58
Default
  #18
Senior Member
 
Rickard
Join Date: May 2010
Location: Lund, Skåne, Sweden
Posts: 143
Rep Power: 8
Rickard.Solsjo is on a distinguished road
Great! It works
thank you
Rickard.Solsjo is offline   Reply With Quote

Old   March 27, 2011, 14:10
Default set curve
  #19
Member
 
s.rasoul_varedi
Join Date: Feb 2010
Posts: 82
Rep Power: 7
desert_1250 is an unknown quantity at this point
Send a message via Yahoo to desert_1250
Hi all, How can i use set curve for sampling date a long a curve?? (for example cylinder curve)
desert_1250 is offline   Reply With Quote

Old   June 6, 2014, 08:50
Default
  #20
New Member
 
slan
Join Date: Nov 2010
Location: Eindhoven
Posts: 16
Rep Power: 8
aaron_lan is on a distinguished road
Send a message via MSN to aaron_lan
Hi s. ,

I have the same question as you had three years ago. If you already have an solution for that, can you please help me out? Thanks.

Aaron
aaron_lan is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to output data from stationary part only? Aerolex FLUENT 0 November 16, 2009 23:46
Output data file on the line of the example zhoubinwx OpenFOAM Paraview & paraFoam 0 February 13, 2008 05:59
how to output particle trajectory coordinate data steven CFX 0 July 13, 2006 17:49
How to update polyPatchbs localPoints liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 18:27
Structured Data Output Tristan Collins FLUENT 0 March 22, 2005 08:12


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