CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (http://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   SampleDict (http://www.cfd-online.com/Forums/openfoam-bugs/62293-sampledict.html)

musahossein February 24, 2009 16:39

Description: I am trying to r
 
Description:
I am trying to run samplDict in the dambreak tutorial and capture the pressure values on the leftwall using the surface option in sampleDict.

Solver/Application:
interFoam

Source file:
sampleDict

Testcase:
Dambreak

Platform:
Opensuse 11.0

Version:
OpenFoam version 1.5

Notes:
No output is generated. Problem could lie in the fact that there is insufficient documentation in section 6.3 as to how the wall patches are to be called hence the user maybe unclear as to how to correctly call the patches. For example, in blockmeshDict in the patch section, the walls are called as wall left wall etc. But that is conjecture only.

Additional comment by fellow Openfoam user:

------------------------------------------------------------
OpenFOAM Message Board: OpenFOAM: Running / Solving / CFD: About interFoam solver
------------------------------------------------------------

Posted by Michael Jaworski on Monday, February 23, 2009 - 09:46 pm:

Musa,
I am unable to get the "surface" portion of sample to work as well
(no files created). Perhaps someone out there has an example
dictionary. Otherwise, you'll have to dig into the source code to
determine the error.

There used to be a surfaceSample utility in 1.4.1. It's been removed
from 1.5, apparently. Looking for it in the old release might give you
a temporary fix.

Regards,
Mike J.

mattijs February 24, 2009 17:59

In 1.5.x I put in my surfaces
 
In 1.5.x I put in my surfaces section of system/sampleDict:

surfaces
(
leftWall
{
type patch;
patchName leftWall;
interpolate true;
triangulate true;
}
);

and that gives me surfaces/ddd/p_leftWall.vtk where ddd is the time.



musahossein February 24, 2009 22:05

Matt: Thanks for your respons
 
Matt:
Thanks for your response! if I understand it correctly the values are obtained by interpolation and triangulation. Is the triangulation / interpolation being done between the cell centers?

Musa

mattijs February 25, 2009 03:40

triangulation: per face. Does
 
triangulation: per face. Does not introduce any new vertices.
interpolation: from cell (or boundary face) to point (using distance weighted averaging).

musahossein March 4, 2009 10:47

Mattijs: I revised the samp
 
Mattijs:

I revised the sampleDict file as you suggested in your post
http://www.cfd-online.com/cgi-bin/OpenFOAM_Discus/show.cgi?tpc=126&post=32641#POST326 41

However, still no output for pressure p. In your post you refered to OpenFoam 1.5.x. Is there an updated version of OpenFoam available in which the sampleDict works? I am running OpenFoam 1.5 on openSUSE 11.0.

Also, is there a limit to the mesh size for which the sampleDict will work?
Looking forward to your response.

mike_jaworski March 4, 2009 15:45

I found my problem earlier tod
 
I found my problem earlier today when I looked at the dictionary again: a typo. Make sure you specify a sampleFormat as raw or vtk or what-not. You can see this in the user guide online or in the source code for the sample utility.

vishal March 5, 2009 04:19

Hi, i agree with Michael,
 
Hi,

i agree with Michael, even i am alos unig the same procedure for my case. with OF- 1.5,

Regards,

Vishal

mattijs March 5, 2009 06:52

Hello Musahossein, The 1.5.
 
Hello Musahossein,

The 1.5.x version is a source-only version downloadable using Git. See www.openfoam.org/download.html.

There is no limit on the mesh size apart from your computer's memory.

mike_jaworski March 5, 2009 23:47

Hi Musaddeque, Here's a lin
 
Hi Musaddeque,

Here's a link to the file:
https://netfiles.uiuc.edu:443/mjawor...OAM/sampleDict

Good luck!

Mike J.

musahossein March 6, 2009 22:35

Michael: Thanks for your resp
 
Michael:
Thanks for your response. If you compare the command sturcture of the file you referred me to with the one in OpenFOAM 1.5, you will see that they are different. Either way, neither one works it does not generate any output. I will keep trying though.

Musa

mike_jaworski March 7, 2009 00:55

Musa, Try changing the in
 
Musa,
Try changing the interpolation scheme to cellPointFace instead of just "cell". That might be the cause of your woes.

Also, I'd suggest putting a "setFormat raw;" line in there just in case it needs it.

Good Luck,
Mike J.

musahossein March 10, 2009 10:42

Mattijs After running OpenF
 
Mattijs

After running OpenFoam 1.5 interFoam solver for the dambreak problem, I used l -ual to check to see whether the sampleDict file had been accessed. l -ual sampleDict showed that the file had not been accessed during program run.

Any suggestions as to how to fix this will be appreciated.

Thanks
Musa

mike_jaworski March 10, 2009 11:02

Musa, you're running the
 
Musa,
you're running the sample utility by typing "sample" in the case home directory, right?

-Mike

musahossein March 10, 2009 13:41

Mike: No. I have assumed th
 
Mike:

No. I have assumed that the interFoam solver will process the sampleDict file and generate output at each time step. Is that an incorrect assumption?.

musahossein March 10, 2009 13:48

Mike: THANKS!!! You were ri
 
Mike:

THANKS!!! You were right - didnt realize sampleDict acts as a post processor than something that runs at interFoam runtime. I typed in sample and a subdirectory called "surfaces" was created storing images of pressure and velocity at each time step. But i need to get numbers. How can I do that?

mike_jaworski March 10, 2009 13:56

Musa, OpenFOAM is pretty m
 
Musa,
OpenFOAM is pretty modular. "blockMesh" is a pre-processing utility that reads a "blockMeshDict" file to build a mesh. "sample" is a post-processing tool to pull out numerical data from the mesh. Both of these are separate from any solver you might be using. You have to run them separately for them to do anything. Now, one *could* write a solver that automatically does something like what "sample" does, but I don't know that any of the solvers distributed with OF actually do this.

Try running the utility and that may solve all of your problems.

-Mike

mike_jaworski March 10, 2009 14:48

Musa, With the "raw" data
 
Musa,
With the "raw" data format, there are some tab delimited data files created within the subdirectory for each time step. It's your choice what plotting program to use or other data analysis tools to analyze the data. I personally make use of gnuplot for pretty much everything I do.

There is an example of gnuplot usage here. It's your choice how to post-process the data, though.

Good luck,
Mike J.

musahossein March 10, 2009 16:21

Mike: I didnt realize that
 
Mike:

I didnt realize that .raw file as output by sampleDict is an text file with x, y,z and p (pressure values) in my case. However, in the dambreak case, if i want to look at the left wall, there should be only p values associated with y and no x or z. However, I see only x ordinates and y and z are zero. Also, my mesh is 100 (vertical) x 166 (horizontal) so there should be at the most 100 p values on the leftwall but the file header says:

"p" POINT_DATA 334, indicating 334 points.

Is there somthing wrong or am I not looking at the data correctly?

I look forward to your response.

musahossein March 10, 2009 16:34

Mike: Ignore the previous p
 
Mike:

Ignore the previous post. Silly mistake on my part.

Musa

musahossein April 14, 2009 21:58

It runs as a post processor. I checked to see if it runs during the solver runtime, and it shows that the file is not accessed during runtime. The only time it runs is after the processing is complete and the word sampleDict is typed at the prompt.


All times are GMT -4. The time now is 18:46.