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

sample utility problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 3, 2010, 04:13
Default sample utility problem
  #1
And
New Member
 
Andrea Aprovitola
Join Date: Nov 2009
Posts: 16
Rep Power: 17
And is on a distinguished road
Hello to the OpenFOAM community.

I'm experiencing a problem when using the sample utility distributed in OpenFOAM 1.6.x.

I would like to draw the streamwise component Ux along the y direction for the pitzDaily3D tutorial in non reacting conditions. The sampleDict has the following entries:

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

interpolationScheme cell;

setFormat raw;

sets
(
internalField
{
type uniform;
axis y;
start ( 0.01 -0.025 0 );
end ( 0.01 0.025 0 );
nPoints 100;
}
);

surfaces ();

fields ( U );


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


The sample utility seems to work properly when it is invoked:


// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Time = 0

Time = 0.05

Time = 0.1

Time = 0.15

Time = 0.2

Time = 0.25

Time = 0.3

Time = 0.35

Time = 0.4

Time = 0.45

anyway the files internalField.xy created in the "/sets/[0-0.45]" folders are empty

I tried also to compute the single velocity component by selecting in the keyword fields:

fields ( U.component(0) )

but the result is the same. Does anyone can help me to fix this problem ?

Regards

Andrea

Last edited by And; September 3, 2010 at 04:52.
And is offline   Reply With Quote

Old   September 3, 2010, 09:31
Default
  #2
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24
santiagomarquezd will become famous soon enough
Andrea, I couldn't find it, but there is a post saying that sample utility is not working properly for U and U.component() at least for 1.5. Maybe this thread can be useful for you:

http://www.cfd-online.com/Forums/ope...oam-1-6-a.html

Regards.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   September 3, 2010, 09:41
Default
  #3
And
New Member
 
Andrea Aprovitola
Join Date: Nov 2009
Posts: 16
Rep Power: 17
And is on a distinguished road
Quote:
Originally Posted by santiagomarquezd View Post
Andrea, I couldn't find it, but there is a post saying that sample utility is not working properly for U and U.component() at least for 1.5. Maybe this thread can be useful for you:

http://www.cfd-online.com/Forums/ope...oam-1-6-a.html

Regards.
Thank you very much Santiago.I was aware of this post. I have just tried to follow the suggestions contained in it before posting. However I coundn't fix the problem.

Regards
And is offline   Reply With Quote

Old   September 3, 2010, 12:12
Default
  #4
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Hi,


you could try:
foamCalc components U

This will print out the components of U in each time directory - Ux, Uy and Uz.

Then try sample after that, with Ux in the fields section of sampleDict.


Philip
bigphil is offline   Reply With Quote

Old   September 6, 2010, 11:12
Default
  #5
And
New Member
 
Andrea Aprovitola
Join Date: Nov 2009
Posts: 16
Rep Power: 17
And is on a distinguished road
Quote:
Originally Posted by bigphil View Post
Hi,


you could try:
foamCalc components U

This will print out the components of U in each time directory - Ux, Uy and Uz.

Then try sample after that, with Ux in the fields section of sampleDict.


Philip
Hi Philip,

thanks for your reply. But unfortunately after having executed

foamCalc components U

and then sample with Ux in the fields section of sampleDict, it creates the file in the directory time 0.04 but remains still empty.
And is offline   Reply With Quote

Old   September 6, 2010, 11:22
Default
  #6
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Hmmnn I am not sure then what's the problem,

Hopefully someone else might be able to help.

Philip
bigphil is offline   Reply With Quote

Old   October 7, 2010, 10:58
Default
  #7
Senior Member
 
Francois Beaubert
Join Date: Mar 2009
Location: Lille, France
Posts: 147
Rep Power: 17
francois is on a distinguished road
I've got strange results with the sample utility (OF 1.7-1):

For example when I try to plot the wall shear stress on a line on the inner wall of a pipe the sample utility and paraFoam give me a different distribution. It's the exact same line.

The line is z oriented and in my sampleDict file I have:

interpolationScheme cellPoint;

fields
(
U
wallShearStress
);

sets
(
x=-0.025
{
type face;
axis z;
start (-0.025 0 0);
end (-0.025 0 1.495);
}

I also encountered empty sample output file.

Any one has also seen these kind of problems ?

Last edited by francois; October 7, 2010 at 16:45.
francois is offline   Reply With Quote

Old   October 7, 2010, 12:49
Default
  #8
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 20
vkrastev is on a distinguished road
Hi all,

to my experience the sample utility gives empty files when it cannot found node values near enough to interpolate from them. I don't know if this is the case, but I can suggest you to put the sample line "inside" the domain, and not on the border (I mean, if your 2D domain in OpenFOAM has a thickness of 0.1 m in the z direction and is comprised between z=0 and z=0.1, set the z coordinate in the sampleDict as 0.05).

Regards

V.
vkrastev is offline   Reply With Quote

Old   October 8, 2010, 05:05
Default sample utility
  #9
And
New Member
 
Andrea Aprovitola
Join Date: Nov 2009
Posts: 16
Rep Power: 17
And is on a distinguished road
Hi Vesselin

I followed your suggestions and I put the sample line inside the domain without including the boundaries and it worked. The files created inside the sets directories were not empty.

Thanks for your help,

Regards

Andrea Aprovitola
And is offline   Reply With Quote

Old   October 8, 2010, 05:40
Default
  #10
Senior Member
 
Francois Beaubert
Join Date: Mar 2009
Location: Lille, France
Posts: 147
Rep Power: 17
francois is on a distinguished road
Thanks guys for the suggestions.

So if I understand you correctly you said that the sample utility is unable to give values at wall boundaries of your computational domain nor inlet or outlet.

So how do you obtain you wall shear stress or y+ values at the wall ?

Regards
François
francois is offline   Reply With Quote

Old   October 8, 2010, 06:24
Default
  #11
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 20
vkrastev is on a distinguished road
Quote:
Originally Posted by francois View Post
Thanks guys for the suggestions.

So if I understand you correctly you said that the sample utility is unable to give values at wall boundaries of your computational domain nor inlet or outlet.

So how do you obtain you wall shear stress or y+ values at the wall ?

Regards
François
Hi Francois,

actually what I have experienced in using the sample utility is that it has some difficulties to interpolate correctly the required data field if the sampling pattern is set exactly on the boundary of the domain: this doesn't mean that it doesn't work in any case, but simply that with such kind of setting you cannot be shure that It will work properly. Anyway, you have also to keep in mind that the sample utility gives the opportunity to choose between different sampling options and interpolating algorithms, and I haven't tried to use all of them yet, so maybe there can be a more effective global setting which can avoid such kind of problems. But, however, if you want to sample some quantities at the boundary of your domain (e. g. at a solid wall or at a generic boundary patch) my personal suggestion is to set the sampling pattern very close to the boundary (e. g. at 10^-05 m or lower) but not exactly on it. Finally, if we talk about y+ and the wall shear stress I think that OpenFOAM has some "ad hoc" utilities to calculate them, so maybe you can have a look on the user's Guide about this matter.

Regards

V.
vkrastev is offline   Reply With Quote

Old   October 8, 2010, 06:50
Default
  #12
Senior Member
 
Francois Beaubert
Join Date: Mar 2009
Location: Lille, France
Posts: 147
Rep Power: 17
francois is on a distinguished road
Hi Vesselin,

Thank you very much for your kind and helpful answers.
I will try what you suggest.

Regarding the y+ and the wall shear stress, indeed OF has already some utilities to compute those values: yPlusLES, yPlusRAS and wallShearStress but the values computed are on the wall patches of the computational domain so it doesn't solve the problem.

I've tried to use the cellPointFace interpolation scheme but it doesn't work at all.

Anyway will try to build my line "near" the wall to see what happen.
If someone has other suggestions ...

Regards
François
francois is offline   Reply With Quote

Old   October 8, 2010, 07:21
Default
  #13
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 20
vkrastev is on a distinguished road
Quote:
Originally Posted by francois View Post
Hi Vesselin,

Thank you very much for your kind and helpful answers.
I will try what you suggest.

Regarding the y+ and the wall shear stress, indeed OF has already some utilities to compute those values: yPlusLES, yPlusRAS and wallShearStress but the values computed are on the wall patches of the computational domain so it doesn't solve the problem.

I've tried to use the cellPointFace interpolation scheme but it doesn't work at all.

Anyway will try to build my line "near" the wall to see what happen.
If someone has other suggestions ...

Regards
François
I've done in the same way to evaluate the y+ value over a solid wall (I mean, run the yPlusRAS utility, put the sampling line very close to the wall and then run the sample utility) and if remember correctly it should work...
vkrastev is offline   Reply With Quote

Old   March 27, 2011, 15:03
Default set curve
  #14
Member
 
s.rasoul_varedi
Join Date: Feb 2010
Posts: 82
Rep Power: 15
desert_1250 is an unknown quantity at this point
Send a message via Yahoo to desert_1250
Hi all,
how can i extract data (for example pressure) with sampling utility for cylinder wall? if it may be done with curve set point or other advice, i am very glad that tell me a bout it, thanks.
desert_1250 is offline   Reply With Quote

Old   March 31, 2011, 23:43
Default
  #15
xqy
New Member
 
xuqy
Join Date: Jan 2010
Posts: 9
Rep Power: 16
xqy is on a distinguished road
Quote:
Originally Posted by desert_1250 View Post
Hi all,
how can i extract data (for example pressure) with sampling utility for cylinder wall? if it may be done with curve set point or other advice, i am very glad that tell me a bout it, thanks.
I'm also finding it . If you know, plz tell me how. Thanks.
xqy is offline   Reply With Quote

Old   April 1, 2011, 05:07
Default
  #16
Member
 
s.rasoul_varedi
Join Date: Feb 2010
Posts: 82
Rep Power: 15
desert_1250 is an unknown quantity at this point
Send a message via Yahoo to desert_1250
yep, i find it, just enough that be used sampleDict utility and set the pach name cylinder in the "surfaces" and and then set "p" in the fields, after that execute "sample"
if it is not clear for u, tell me to explain more

_____
Rasoul
desert_1250 is offline   Reply With Quote

Old   April 1, 2011, 11:24
Default
  #17
xqy
New Member
 
xuqy
Join Date: Jan 2010
Posts: 9
Rep Power: 16
xqy is on a distinguished road
Quote:
Originally Posted by desert_1250 View Post
yep, i find it, just enough that be used sampleDict utility and set the pach name cylinder in the "surfaces" and and then set "p" in the fields, after that execute "sample"
if it is not clear for u, tell me to explain more

_____
Rasoul
Desert_1250, I test your method like this:

surfaces
(
inlet
{
type patch;
patchName INLET;
}
);


but there's nothing exact in the dictionary .../case/surfaces/1000/.

My case is a 2d calculation, and the inlet is a surface just for test. In fact I want to output data on a cylinder line .
xqy is offline   Reply With Quote

Old   April 1, 2011, 11:49
Default
  #18
Member
 
s.rasoul_varedi
Join Date: Feb 2010
Posts: 82
Rep Power: 15
desert_1250 is an unknown quantity at this point
Send a message via Yahoo to desert_1250
you should modify your sampleDict as this follow:


surfaces
(
inlet //-> the name of your cylinder patch
{
type patch;
patchName inlet;// ->the name of your cylinder patch
}
);

fields
(
p
);

_____
Rasoul
desert_1250 is offline   Reply With Quote

Old   April 16, 2012, 15:20
Default
  #19
New Member
 
Caroline Vandame
Join Date: Aug 2010
Posts: 26
Rep Power: 16
CaroVandame is on a distinguished road
So I've been trying to use the info from this post to sample the wallShearStress at a cylinder wall.
My pipe_flow was defined using the wedge method.

Using previous answers from this thread, here is what my sampleDict file looks like:

fields (wallShearStress);
sets();
surfaces
(
fixedWall //-> the name of my pipe wall
{
type patch;
patchName fixedWall;
}
);

But I get an error:
"keyword patches is undefined in dictionary "/home/caro/OpenFOAM/caro-2.1.0/run/pipe_flow/system/sampleDict::surfaces" "

So it seems I'm not defining the keyword patches, but I've looked at other sampleDict files from the tutorials, and couldn't find any with this keyword, could someone help me please?
Also, 2nd question, I'm not sure which interpolation scheme I should use?

Thanks!
CaroVandame is offline   Reply With Quote

Old   April 16, 2012, 15:32
Default
  #20
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24
santiagomarquezd will become famous soon enough
Caro, FOAM is asking you for the keyword "patches" which is a part of the sets section where you set the points sampling. Maybe you can add a simple sampling point in order not to leave the sets section empty.

Regards.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd 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
Sample utility Gearb0x OpenFOAM Post-Processing 13 April 30, 2019 13:16
UDF compiling problem Wouter Fluent UDF and Scheme Programming 6 June 6, 2012 05:43
Sample utility not working properly titio OpenFOAM 2 June 9, 2010 11:45
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 07:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 20:13


All times are GMT -4. The time now is 04:34.