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. |
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. |
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 |
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). |
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. |
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.
|
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 |
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. |
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. |
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 |
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. |
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 |
Musa,
you're running the
Musa,
you're running the sample utility by typing "sample" in the case home directory, right? -Mike |
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?. |
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? |
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 |
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. |
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. |
Mike:
Ignore the previous p
Mike:
Ignore the previous post. Silly mistake on my part. Musa |
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.
|
Does anyone have a sampleDict file configured to read pressure from the sloping surfaces in a 2D tank problem that they wouldnt mind sharing with me? section 6.5 in the users manual is not clear on how to indentify a surface for sampling using sampleDict
|
There is an example sampleDict in the source tree: $FOAM_UTILITIES/postProcessing/sampling/sample/. You might want to look at the 'constantPlane' or 'interpolatedPlane' which sample on a plane. In 1.5.x. these will only work reliably on convex cells. And please move this discussion of the bug forum.
|
postprocessing for an Hill
Hi all,
I want to make some statiscs curves on an hill http://openfoamwiki.net/index.php/Si...Periodic_Hills on the curved wall. My problem is that I don't know how I can make a curve which is on my curved wall. I was all ready using the sample utility but I don't find the solution. Thank's Olivier |
I would sample the curved patch first (you are interested in boundary data I hope), export it to vtk ('surfaceFormat vtk') and clip the surface with a plane.
|
In fact I want to make a graph with gnuplot or xmgrace. So I want use some utilities like sample or postChannel to make some list of data and to plot it after.
With your command I can make this Mattijs ? |
see the example sampleDict in $FOAM_UTILITIES/postProcessing/sampling/sample on how to extract patch data (as a surface) and export it to vtk.
|
Thank's for your answer mattijs.
In fact the solution is in sampleSurface. |
help
hi
I am using O.F. 1.6 and when I use the sample utility no sets directory is created as I expect. for exaple I have run a case in tutorials (tutorials/stressAnalysis/solidDisplacementFoam/plateHole) and after running this case I type the "sample" in the terminal and I got this message: /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 1.6-53b7f692aa41 Exec : sample Date : May 26 2010 Time : 13:28:56 Host : mohsen-laptop PID : 4495 Case : /home/mohsen/OpenFOAM/mohsen-1.6/run/tutorials/stressAnalysis/solidDisplacementFoam/plateHole nProcs : 1 SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Time = 0 Time = 20 Time = 40 Time = 60 Time = 80 Time = 100 End but no extra folder was created in the case directory |
All times are GMT -4. The time now is 07:16. |