How to get a slice out of my foam results
Dear foamers,
I am trying to extract a slice out of my data, e.g. UMean fields. I tried the sample utility but I am not satisfied with the result. I like to have a flat plane at a constant y value. This means I set up the sampleDict as follows: Code:
surfaceFormat raw; Code:
-386.333333333 0 0.666666666667 kind regards, Fabian |
Is it possible that there is a bug in the sample utility? Because if I am using vtk or foamFile as export format, I am getting coordinates which make sense. Does anybody expierenced this bug to?
|
Greetings Fabian,
Yes, it is possible that sample could have a bug. Any chance you can provide a tutorial case modified to reproduce the error you're getting? Best regards, Bruno |
1 Attachment(s)
Hi Bruno,
I have played around a little bit. May be I am expecting something wrong but in the attached exampe you have a block of 4 x 4 cells with -2 <= x,y <= 2 and 0 <= z <= 4. If I am cutting a constant y plane at y = 0.5 with normal vector pointing along my y coodinate with interpolationScheme set to cell but without specifying the interpolation switch in my constantPlane subdirectory (I assume it is false) I get strange values (see sampleDict-fail and surfaces-fail). I expected to get 16 values at the cell centers but I am getting 32 values at strange positions. If I turn on the switch interpolation true I get 25 values for the vertices as expected (see sampleDict and surfaces). This behaviour is a bit strange in my opinion. kind regards, Fabian |
Hi Fabian,
These values on the fail version seemed familiar... they are the centers of triangles. If you check the original "sampleDict", located at "applications/utilities/postProcessing/sampling/sample": Code:
// Surface sampling definition This indeed seems to either be a bug, due to the inconsistent behavior, or it's a feature, that allows one to get either the values in the center of the cells or in the vertexes... After thinking a bit about this, it feels that the concept here is this:
Although this does bring up the question: then why doesn't the VTK format comply with the same criteria? If interpolate is turned off, it should provide the values in the center of the faces, not at the points as well?! Best regards, Bruno |
Quote:
kind regards, Fabian |
Hi Fabian,
Indeed, it still seems like an inconsistent behavior... Well, then I suggest you use the bug tracker and report this issue: http://www.openfoam.org/bugs/ Providing a good explanation about what is happening, along with the example case, will make it easier for them to diagnose and fix the issue. By the way, two details about the example you've provided:
Bruno |
slice for Tecplot
Hi,
It seems that the problem still persists. Did you guys find a way to solve it? In general, any idea how to get a slice out of foam results to open in Tecplot (same feature as "slice filter in paraView")? Thank you |
No I havn't solved that issure. On my TODO list there is also still a point to submit a bug report, but sorry for that I haven't had the time up to now. I use Tecplot to extract slices from my results, which works pretty well.
|
All times are GMT -4. The time now is 01:11. |