|
[Sponsors] |
June 16, 2014, 06:28 |
sampledSurface: size mismatch issue
|
#1 |
Member
YS
Join Date: Jan 2010
Posts: 96
Rep Power: 16 |
Hi everyone,
The sampledSurface "size mismatch" problem has been bothering me for quite a while. Basically what I am trying to do is to get a sampled normal velocity field on a sampling surface defined by a STL file using the sampledTriSurfaceMesh class. The code is something like following. And from time to time I get error message: "size mismatch: field XXX != surface XXX", which is really annoying. Can anyone give a hint how to solve this issue. Thanks a lot in advance! -----> const sampledTriSurfaceMesh& pln = velTriSurf_[planeI]; label nFaces = pln.faces().size(); reduce(nFaces, sumOp<label>()); if (nFaces) { interpolationCellPoint<vector> UInterp(U); scalarField UInterpPl(pln.project(pln.interpolate(UInterp))); SubList<face> plnFaces(pln.faces(), pln.faces().size()); primitivePatch primitivePtch(plnFaces, pln.points()); primitivePatchInterpolation primPatchInterp(primitivePtch); scalarField UInterpPlFaces(primPatchInterp.pointToFaceInterpol ate(UInterpPl)); massFlow = pln.integrate(UInterpPlFaces); } <----- |
|
June 17, 2014, 01:58 |
|
#2 |
Member
YS
Join Date: Jan 2010
Posts: 96
Rep Power: 16 |
the "interpolate" switch must be set to "false" to dismiss this annoying error. This way the sampling will be based on the surface triangle centers. Otherwise, it will be performed based on the surface points. By setting "interpolate" to "true", you have high chance to be hit by the "size mismatch" error. And there's no way to perform the "project" operation where a fieldSizeCheck will be performed. Can anyone explain why the sampledSurface has been designed this way? Thanks a lot!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
catalogue size problem | steven | CFX | 4 | May 30, 2012 08:23 |
Problems in compiling paraview in Suse 10.3 platform | chiven | OpenFOAM Installation | 3 | December 1, 2009 08:21 |
[Commercial meshers] ST_Malloc: out of memory.malloc_storage: unable to malloc Velocity SA, | cfdproject | OpenFOAM Meshing & Mesh Conversion | 0 | April 14, 2009 16:45 |
Guides for calculation of mesh size for combustion | Luk | CFX | 4 | March 17, 2008 03:34 |
Gambit Size functions issue | jon | FLUENT | 1 | December 13, 2006 11:39 |