|
[Sponsors] |
sampleDict over a surface doubles number of points |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
Zeno
Join Date: Sep 2013
Location: Delft, The Netherlands
Posts: 63
Rep Power: 13 ![]() |
Hello,
I have a very simple straight pipe simulation and I want to sample the final velocity U over a cross section of the pipe perpendicular to the streamwise direction at a certain location downstream of the inlet. Everything works fine. However, I can see that my sampled U has twice as many values as the number of cell centres in my mesh (e.g. sampled U values= 1000, number of cell centres in mesh=500) and the same happens for the faceCentres file. I have a structured mesh and, if I plot the sampled corss section, I can see my structured cells have been divided into triangles. Hence the double number of points. Is there a way to deactivate this option? Thanks for your attention, Z |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
|
Hi,
Here is an excerpt from example sampleDict (located at $FOAM_APP/utilities/postProcessing/sampling/sample) Code:
constantPlane { type plane; // always triangulated basePoint (0.0501 0.0501 0.005); normalVector (0.1 0.1 1); //- Optional: restrict to a particular zone // zone zone1; //- Optional: do not triangulate (only for surfaceFormats that support // polygons) //triangulate false; } |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
Zeno
Join Date: Sep 2013
Location: Delft, The Netherlands
Posts: 63
Rep Power: 13 ![]() |
Hi Alex,
Thanks for the reply. Attached is the sampleDict file for reference: Code:
setFormat raw; surfaceFormat foamFile; interpolationScheme cell; fields ( U ); surfaces ( smoothU { type plane; basePoint (0.001 0 0); normalVector (1 0 0); //interpolate true; traingulate false; } ); I've also tried the following option: Code:
interpolate true; //traingulate false; I've also played around with the various interpolationScheme options but with no success. P.S. I'm using openfoam-2.4.0 |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
|
Hi,
I do not know what am I doing wrong but here is my sampleDict Code:
setFormat raw; surfaceFormat foamFile; // vtk; interpolationScheme cellPoint; fields ( U p ); sets ( ); surfaces ( normal-plane { type plane; basePoint (2.5 0 0); normalVector (1 0 0); interpolate true; triangulate false; } ); You can find whole case folder at https://github.com/mrklein/foam-case.../master/sample. |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
Zeno
Join Date: Sep 2013
Location: Delft, The Netherlands
Posts: 63
Rep Power: 13 ![]() |
Thanks for the reply!
I tested your code and found out 2 things: - The number of points in the faceCentres file is indeed the number of cell centres in your mesh (2912) -However, the number of points in the U or p files is 2969 which is equal to the number of points in the 'points' file containing the coordinates of the cell vertices. I took a snapshot with paraview to show where the velocity and pressure are defined (see attachment). I do not know whether this happens also in your case or it is just my case. Thanks, Z |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
|
Sorry, I have reread your posts, but still can not understand what you expect from points.
In case of tube, if we cut mesh with a plane normal to flow direction with triangulation being switched off, number of cells (or as it is plane - number of faces) should be equal to number of faces in inlet patch (and this is the case). However number of vertices (points) should be greater than number of faces. |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Member
Zeno
Join Date: Sep 2013
Location: Delft, The Netherlands
Posts: 63
Rep Power: 13 ![]() |
Dear Alex,
I agree that number of cells (or faces) at the cut should be equal to that of the inlet patch and that the number of vertices should be greater. However, I would expect the fields (U,p, etc) to be defined at the cell centres and thus be as many as the number of faces. However this is not the case as there are as many U (or p) values as the number of points in the sampled U (and p) files. This means that these values are defined at the vertices whereas I would like to have them at the cell centres. |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Senior Member
|
Well,
This sampleDict: Code:
... surfaceFormat foamFile; interpolationScheme cell; ... surfaces ( normal-plane { type plane; basePoint (2.5 0 0); normalVector (1 0 0); interpolate false; triangulate false; } ); |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Member
Zeno
Join Date: Sep 2013
Location: Delft, The Netherlands
Posts: 63
Rep Power: 13 ![]() |
Yes, that's exactly what I would like to have.
I've tried the settings above with of-2.4.0 and your test case and everything works fine but if I try with my test case cells are triangulated, I'm not really sure why. Here is a link to the test case for reference: https://github.com/ZenBel/sample Thanks again for the help, Z |
|
![]() |
![]() |
![]() |
![]() |
#10 |
Senior Member
|
Just a typo. Your plane description contains "traingulate" instead of "triangulate".
|
|
![]() |
![]() |
![]() |
![]() |
#11 |
Member
Zeno
Join Date: Sep 2013
Location: Delft, The Netherlands
Posts: 63
Rep Power: 13 ![]() |
I hate myself.
![]() Thanks a lot Alex for your time and help! Z |
|
![]() |
![]() |
![]() |
Tags |
double, number, sampledict, triangles |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
decomposePar -allRegions | stru | OpenFOAM Pre-Processing | 2 | August 25, 2015 04:58 |
simpleFoam parallel | AndrewMortimer | OpenFOAM Running, Solving & CFD | 12 | August 7, 2015 19:45 |
[blockMesh] --> foam fatal error: | lillo763 | OpenFOAM Meshing & Mesh Conversion | 0 | March 5, 2014 11:27 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 22:11 |
CFX4.3 -build analysis form | Chie Min | CFX | 5 | July 13, 2001 00:19 |