# Conversion from unstructured field to structured

 Register Blogs Members List Search Today's Posts Mark Forums Read

 October 30, 2003, 13:05 Conversion from unstructured field to structured #1 henna Guest   Posts: n/a Is there any software or code that can convert a data field in unstructured grid to a structured grid (3 D)? Appriciate your help. henna

 October 31, 2003, 04:28 Re: Conversion from unstructured field to structur #2 Pr Guest   Posts: n/a I think matlab can do it sreach for GRIDDATA function.This might be help to you Pr

 November 4, 2003, 06:30 Re: Conversion from unstructured field to structur #3 Des Aubery Guest   Posts: n/a Hi 'Pr', Is it this function you are refering to? --------------------------------------------------- MATLAB Function Reference griddata Data gridding SyntaxZI = griddata(x,y,z,XI,YI) [XI,YI,ZI] = griddata(x,y,z,xi,yi) [...] = griddata(...,method) DescriptionZI = griddata(x,y,z,XI,YI) fits a surface of the form z = f(x,y) to the data in the (usually) nonuniformly spaced vectors (x,y,z). griddata interpolates this surface at the points specified by (XI,YI) to produce ZI. The surface always passes through the data points. XI and YI usually form a uniform grid (as produced by meshgrid). XI can be a row vector, in which case it specifies a matrix with constant columns. Similarly, YI can be a column vector, and it specifies a matrix with constant rows. [XI,YI,ZI] = griddata(x,y,z,xi,yi) returns the interpolated matrix ZI as above, and also returns the matrices XI and YI formed from row vector xi and column vector yi. These latter are the same as the matrices returned by meshgrid. [...] = griddata(...,method) uses the specified interpolation method: 'linear' Triangle-based linear interpolation (default)'cubic'Triangle-based cubic interpolation'nearest'Nearest neighbor interpolation'v4'MATLAB 4 griddata methodThe method defines the type of surface fit to the data. The 'cubic' and 'v4' methods produce smooth surfaces while 'linear' and 'nearest' have discontinuities in the first and zero'th derivatives, respectively. All the methods except 'v4' are based on a Delaunay triangulation of the data. Note Occasionally, griddata may return points on or very near the convex hull of the data as NaNs. This is because roundoff in the computations sometimes makes it difficult to determine if a point near the boundary is in the convex hull. RemarksXI and YI can be matrices, in which case griddata returns the values for the corresponding points (XI(i,j),YI(i,j)). Alternatively, you can pass in the row and column vectors xi and yi, respectively. In this case, griddata interprets these vectors as if they were matrices produced by the command meshgrid(xi,yi). AlgorithmThe griddata(...,'v4') command uses the method documented in [3]. The other griddata methods are based on a Delaunay triangulation of the data that uses Qhull [2]. This triangulation uses the Qhull joggle option ('QJ'). For information about Qhull, see http://www.geom.umn.edu/software/qhull/. For copyright information, see http://www.geom.umn.edu/software/download/COPYING.html. ExamplesSample a function at 100 random points between ±2.0: rand('seed',0) x = rand(100,1)*4-2; y = rand(100,1)*4-2; z = x.*exp(-x.^2-y.^2); x, y, and z are now vectors containing nonuniformly sampled data. Define a regular grid, and grid the data to it: ti = -2:.25:2; [XI,YI] = meshgrid(ti,ti); ZI = griddata(x,y,z,XI,YI); Plot the gridded data along with the nonuniform data points used to generate it: mesh(XI,YI,ZI), hold plot3(x,y,z,'o'), hold off See Alsodelaunay, griddata3, griddatan, interp2, meshgrid References[1] Barber, C. B., D.P. Dobkin, and H.T. Huhdanpaa, "The Quickhull Algorithm for Convex Hulls," ACM Transactions on Mathematical Software, Vol. 22, No. 4, Dec. 1996, p. 469-483. Available in HTML format at http://www.acm.org/pubs/citations/jo...4/p469-barber/ and in PostScript format at ftp://geom.umn.edu/pub/software/qhull-96.ps. [2] National Science and Technology Research Center for Computation and Visualization of Geometric Structures (The Geometry Center), University of Minnesota. 1993. [3] Sandwell, David T., "Biharmonic Spline Interpolation of GEOS-3 and SEASAT Altimeter Data", Geophysical Research Letters, 2, 139-142,1987. [4] Watson, David E., Contouring: A Guide to the Analysis and Display of Spatial Data, Tarrytown, NY: Pergamon (Elsevier Science, Inc.): 1992. grid griddata3 --------------------------- I would also like to investigate 'converting from unstructured to structured fields'... Regards, Des Aubery... (adTherm Technology - www.adtherm.com - des@adtherm.com )

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post alessio.nz OpenFOAM 6 December 23, 2015 15:27 Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20 Jingwei FLUENT 0 March 2, 2009 22:29 matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51 Shane FLUENT 2 January 23, 2007 21:57

All times are GMT -4. The time now is 18:05.