|
[Sponsors] |
Sample utility bug? For many cloud points in the sampleDict, some are neglected! |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 9, 2014, 12:42 |
Sample utility bug? For many cloud points in the sampleDict, some are neglected!
|
#1 |
New Member
Join Date: May 2014
Posts: 4
Rep Power: 12 |
Hiya,
Problem description With a self-written C++/OpenFOAM tool, I am outputting the coordinates of all cellCentres. This is working as expected. I copy those data into the sampleDict. It has the following appearance: Code:
setFormat raw; surfaceFormat raw; formatOptions { ensight { format ascii; } } interpolationScheme cellPoint; fields ( p U ); sets ( REPoints { type cloud; axis xyz; points ( MANY POINTS HERE, like: (x_1 y_1 z_1)} );); Why I need this I want to write a tool that can make a statement about the grid convergence or, more precisely, about an estimation of the discretisation error. 1. I take one domain with the same boundary conditions, solvers etc. and mesh it once --> that's my base grid, the coarse grid. 2. Then I refine this twice, to get a "medium" grid and a "fine" grid. 3. I calculate all three grid cases till iterative convergence. 4. In order to make a statement on discretisation errors, I need to compare the variable values at the locations of all the cell centres of the coarse grid with the respective variable values at the same location for the medium and the fine grid. 5. I want to display my calculated values with paraFoam. For that, I create a file for a physical quantity (for example the famous "Grid Convergence Index" for all points), fill the "internal domain" with the calculated values, put some values for the boundaries and put it into the latest timeStep of the coarse grid. I can then display it with paraFoam. The copying into the internal domain, however, is only possible, if the number of sample points is equal to the number of cells in OpenFOAM. Otherwise, some points would be missing and paraFoam rebels! In the recent case, I have over 1.700.000 cell centres and around 150 of them are missed out by sample. Of course, I don't know which ones. How you could help You can help me in two ways: 1. Either you have a workaround for sample (maybe it's a known sample problem that can be bypassed). 2. Or you see a more elegant way to suit my needs, without using the utility sample. Maybe there is a more-straightforward C++/OpenFOAM solution for getting the variable values for three different grids on the same coordinates. PS: In the latest case, I also get a warning during the run time of the sample utility. However, even without this error, the above described swallowing of points happens. Code:
--> FOAM Warning : From function tetIndices polyMeshTetDecomposition::triangleTetIndices(const polyMesh&, label, label, label) in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 643 No base point for face 1127060, 6(1862489 1862486 1860125 1860122 1863381 1863375), produces a valid tet decomposition. |
|
September 14, 2014, 17:09 |
Missing output from sample utility
|
#2 |
New Member
Jim Conger
Join Date: Jan 2014
Location: California, USA
Posts: 21
Rep Power: 12 |
I have run into the same thing. The annoying thing is that the omitted points are missing altogether rather than being listed in the 'sample' output with some sort of 'no data' or -999 flag. I get around the problem to interpolating the missing entries from nearest neighbors when post-processing the 'sample' output. This requires locating all the missing points by comparing the x,y,z location of all of the requested points with that of the 'sample' output. I do this using a bit of Python code.
|
|
September 25, 2014, 11:55 |
|
#3 |
New Member
Join Date: May 2014
Posts: 4
Rep Power: 12 |
Hi James,
yes, that is certainly an option. I had hoped that there might be a simpler option. It's sad that there seems to be a programming bug somewhere in the sample code. I might program a similar utility to sample if I'll have the time and motivation, using the C++ member functions of OpenFOAM. Otherwise I'll use your workaround. If anyone else has another idea, I'd be happy to here it! Bye Marcus |
|
January 19, 2015, 16:11 |
|
#4 |
Member
Join Date: Aug 2012
Posts: 33
Rep Power: 14 |
same issue here. makes me crazy
Why do some points are not sampled? Any news on this? Do you think it can be considered a bug? If so, it's quite serious. Point evaluation are one of the most important thing and, at least without interpolation ("Cell") they shuold always be provided correctly |
|
January 20, 2015, 03:50 |
|
#5 |
Member
|
Hi,
Why dont you use mapFields for your purpose? It can be use to map the result from one mesh to another with similar geometry. Of course, this solution only works if you accept the interpolation error during the process. Duong |
|
November 27, 2015, 10:11 |
|
#6 |
Senior Member
Join Date: Jul 2009
Posts: 260
Rep Power: 18 |
Has anyone worked out what's going on with this yet? All I want is a uniformly distributed line of points. Sometimes some are missing but they're almost always unordered. Is there a workaround?
|
|
July 15, 2016, 06:35 |
|
#7 |
New Member
Bah.Mah
Join Date: Jun 2016
Posts: 18
Rep Power: 10 |
Hallo, does any one had found the solution , I´m still struggling on that
|
|
July 15, 2016, 09:13 |
|
#8 |
Member
Join Date: Aug 2012
Posts: 33
Rep Power: 14 |
not sure if this has been solved in the new versions.
anybody checked? if the problem is still there, the only option is to dig into the code to understand when the missing points are removed any clue? |
|
October 9, 2017, 11:02 |
sampling issue reasons
|
#9 |
New Member
Join Date: Sep 2017
Posts: 2
Rep Power: 0 |
I have noted that missing of sampling points happens in two cases:
1. Round off errors of coordinates near the end of model. If the coordinates given in ccx, ccy and ccz (which already seem to have a minor round-off error) are close to the end regions of the geometry (like wall of a pipe) this almost always happens and the coordinates have to be adjusted a little. You may reduce the coordinate magnitudes by some small amount to ensure everything is within the geometry. 2. Copying data between different applications like excel or other sometimes gives this issue. |
|
October 10, 2017, 06:00 |
|
#10 |
Member
Join Date: Aug 2012
Posts: 33
Rep Power: 14 |
from what I remember the problem was more serious and happened also in the internal part of the mesh, very likely when points are close to faces.
it would be interesting to know if this has been solved in the new versions... |
|
August 22, 2022, 10:56 |
|
#11 |
New Member
Schweiz
Join Date: Aug 2022
Posts: 8
Rep Power: 4 |
Just ran into this problem as well.
Basically, I created a list of points and expect a matching list of samples, which is not the case. So I really don't know how I can match the samples with the points. Or is there a rule which points are dropped? Maybe some outside of the domain? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 10:38 |
sample utility stops sampling once the line leaves the domain | Zymon | OpenFOAM | 1 | May 2, 2012 05:51 |
interpolation with a cuttingPlane for sample utility | lbordier | OpenFOAM | 1 | February 14, 2012 14:53 |
bug in Rcomponents utility | cedric_duprat | OpenFOAM Bugs | 1 | May 7, 2009 03:56 |
[blockMesh] BlockMeshmergePatchPairs | hjasak | OpenFOAM Meshing & Mesh Conversion | 11 | August 15, 2008 08:36 |