Marco, I am actually tied up for the next week or so, so if you can post a sample in that timeframe that would be perfect.
Thanks very much Dennis From: Marco Nawijn [mailto:naw...@gmail.com] Sent: Tuesday, August 25, 2015 11:21 AM To: Dennis Conklin Cc: Paraview (paraview@paraview.org) Subject: Re: [EXT] Re: [Paraview] How to find the nearest quad element? Hi Dennis, You might also be interested in the vtkCellCenters filter. As the name suggests, it will generate the centers of the cells for you. If you are not in a big rush, I can build you a small self contained sample in Python that demonstrates the filter and the use of the point locator. I am a little busy at the moment, but I can post the sample in a couple of days. Marco On Tue, Aug 25, 2015 at 1:40 PM, Dennis Conklin <dennis_conk...@goodyear.com<mailto:dennis_conk...@goodyear.com>> wrote: Marco, Thanks for that tip – I’m not very familiar with vtk and I’ve never heard of that class but it seems appropriate so I will try to dig into it. Thanks again Dennis From: Marco Nawijn [mailto:naw...@gmail.com<mailto:naw...@gmail.com>] Sent: Monday, August 24, 2015 10:28 AM To: Dennis Conklin Cc: Paraview (paraview@paraview.org<mailto:paraview@paraview.org>) Subject: [EXT] Re: [Paraview] How to find the nearest quad element? What about the following: Generate two additional datasets, one containing (an approximate of) the center of the hex elements, the second the center of the quads. Then create a vtkKdTreePointLocator object based on the center points of the quad elements. Than loop over the centers of the hex elements and use one of the Find* methods to get the closest quad. Marco On Fri, Aug 21, 2015 at 2:21 PM, Dennis Conklin <dennis_conk...@goodyear.com<mailto:dennis_conk...@goodyear.com>> wrote: Sam, Thanks for responding. You have helped me several times in the past and I am always grateful for your insights. In this case there is considerable refinement in the model, so only a very small portion of the hex elements are in immediate contact with quads. Also you could think of places like the tread in the tire where there is no reinforcement whatsoever. Another approach which I have considered is a wave propagation technique, where in the first wave every hex immediately adjacent to a quad gets direction cosines assigned (as you suggest). Then you loop thru the remaining elements and assign cosines from any adjacent quad or hex that has cosines. Eventually the direction cosines will propagate throughout the model. A major complication is that wavefronts will collide and then you will have to choose which of several conflicting neighbor cosines to adopt. Averaging is one approach but certain structures give adjoining cosines which are 180 degrees reversed, so averaging would give you an indeterminate direction. I am toying now with some pseudo-variables, such as combinations of radius and lateral location, combined with zoning, to try to find a quantity that is unique for a local section of the geometry, to reduce the search size for each hex element. I am still hoping for a very clever scheme which someone may suggest before I proceed with these much more brute force methods. Dennis Sam Key Wrote: Dennis, Assuming for the moment that each quad 4-tuple is a finite element that contains one or more tire reinforcement items, and that each quad 4-tuple is "sandwiched" in between two hex 8-node finite elements, then the quad's 4-tuple is also a surface facet of two different 8-node hexahedrons. Both hexhedrons are the 'closest' hexhedrons to the quad. Given the usual organization of 'element blocks' in the Exodus-II datum structures, the two closest hexahedrons will be located on the surface of their respective element blocks. Using material ID's which are also element block ID's, have the software generate surface side-sets for each of these two element blocks specified with these two material ID's. With luck, each member in the side-set will be specified as a 2-tuple, (Elem# in the block, Quad-Face# in the hexah) With his info, you can confine your search to finding the side-set item that has a 4-tuple that matches your quad's 4-tuple. The search is reduced to a relatively small collection of hexahedral surface 4-tuple faces. Hope this helps. Samuel W Key FMA Development, LLC 1005 39th Ave NE Great Falls, Montana 59404 USA From: Dennis Conklin Sent: Thursday, August 20, 2015 3:52 PM To: Paraview (paraview@paraview.org<mailto:paraview@paraview.org>) Subject: How to find the nearest quad element? All, I have an Exodus, multi-block model. Most of the blocks are hex elements, and some are layers of quads (tires are composite structures). I would like to establish local strains which are oriented in the direction of the nearest quad layer. To do this I need to identify, for each hex in the model, which quad element in the model is closest to the hex. Then I can extract directions from the quad element and rotate the strain tensor in the hex to these local coordinates. My question is, is there some clever and efficient way to quickly determine the nearest quad for each hex in the model. Keep in mind that there are multiple blocks of quads, but if there is some way to address the quad blocks one at a time, I could make this work. The brute force way is: Loop over every hex in the model: Loop over every quad in the model: Calculate the distance between hex and quad Smallest distance wins! That is a pretty brutally inefficient calc (several million hex elements) that I am trying to avoid – any ideas about how best to approach this. I’m hoping for some elegant way to use connectivity or something of that sort. Thanks for looking Dennis _______________________________________________ Powered by www.kitware.com<http://www.kitware.com> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/paraview
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/paraview