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

SampleDict

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 24, 2009, 15:39
Default Description: I am trying to r
  #1
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
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.
musahossein is offline   Reply With Quote

Old   February 24, 2009, 16:59
Default In 1.5.x I put in my surfaces
  #2
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
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.


mattijs is offline   Reply With Quote

Old   February 24, 2009, 21:05
Default Matt: Thanks for your respons
  #3
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
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
musahossein is offline   Reply With Quote

Old   February 25, 2009, 02:40
Default triangulation: per face. Does
  #4
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
triangulation: per face. Does not introduce any new vertices.
interpolation: from cell (or boundary face) to point (using distance weighted averaging).
mattijs is offline   Reply With Quote

Old   March 4, 2009, 09:47
Default Mattijs: I revised the samp
  #5
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
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.
musahossein is offline   Reply With Quote

Old   March 4, 2009, 14:45
Default I found my problem earlier tod
  #6
Senior Member
 
Michael Jaworski
Join Date: Mar 2009
Location: Champaign, IL, USA
Posts: 126
Rep Power: 17
mike_jaworski is on a distinguished road
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.
mike_jaworski is offline   Reply With Quote

Old   March 5, 2009, 03:19
Default Hi, i agree with Michael,
  #7
Member
 
Vishal Jambhekar
Join Date: Mar 2009
Location: University Stuttgart, Stuttgart Germany
Posts: 90
Blog Entries: 1
Rep Power: 17
vishal is on a distinguished road
Hi,

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

Regards,

Vishal
__________________
Cheers,

Vishal Jambhekar...
"Simulate the way ahead......!!!"
vishal is offline   Reply With Quote

Old   March 5, 2009, 05:52
Default Hello Musahossein, The 1.5.
  #8
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
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.
mattijs is offline   Reply With Quote

Old   March 5, 2009, 22:47
Default Hi Musaddeque, Here's a lin
  #9
Senior Member
 
Michael Jaworski
Join Date: Mar 2009
Location: Champaign, IL, USA
Posts: 126
Rep Power: 17
mike_jaworski is on a distinguished road
Hi Musaddeque,

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

Good luck!

Mike J.
mike_jaworski is offline   Reply With Quote

Old   March 6, 2009, 21:35
Default Michael: Thanks for your resp
  #10
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
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
musahossein is offline   Reply With Quote

Old   March 6, 2009, 23:55
Default Musa, Try changing the in
  #11
Senior Member
 
Michael Jaworski
Join Date: Mar 2009
Location: Champaign, IL, USA
Posts: 126
Rep Power: 17
mike_jaworski is on a distinguished road
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.
mike_jaworski is offline   Reply With Quote

Old   March 10, 2009, 09:42
Default Mattijs After running OpenF
  #12
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
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
musahossein is offline   Reply With Quote

Old   March 10, 2009, 10:02
Default Musa, you're running the
  #13
Senior Member
 
Michael Jaworski
Join Date: Mar 2009
Location: Champaign, IL, USA
Posts: 126
Rep Power: 17
mike_jaworski is on a distinguished road
Musa,
you're running the sample utility by typing "sample" in the case home directory, right?

-Mike
mike_jaworski is offline   Reply With Quote

Old   March 10, 2009, 12:41
Default Mike: No. I have assumed th
  #14
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
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 is offline   Reply With Quote

Old   March 10, 2009, 12:48
Default Mike: THANKS!!! You were ri
  #15
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
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?
musahossein is offline   Reply With Quote

Old   March 10, 2009, 12:56
Default Musa, OpenFOAM is pretty m
  #16
Senior Member
 
Michael Jaworski
Join Date: Mar 2009
Location: Champaign, IL, USA
Posts: 126
Rep Power: 17
mike_jaworski is on a distinguished road
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 is offline   Reply With Quote

Old   March 10, 2009, 13:48
Default Musa, With the "raw" data
  #17
Senior Member
 
Michael Jaworski
Join Date: Mar 2009
Location: Champaign, IL, USA
Posts: 126
Rep Power: 17
mike_jaworski is on a distinguished road
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.
mike_jaworski is offline   Reply With Quote

Old   March 10, 2009, 15:21
Default Mike: I didnt realize that
  #18
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
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 is offline   Reply With Quote

Old   March 10, 2009, 15:34
Default Mike: Ignore the previous p
  #19
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Mike:

Ignore the previous post. Silly mistake on my part.

Musa
musahossein is offline   Reply With Quote

Old   April 14, 2009, 21:58
Default
  #20
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
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.
musahossein 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
SampleDict patch export surface size amp orientation axel OpenFOAM Post-Processing 1 September 29, 2008 13:42


All times are GMT -4. The time now is 09:58.