WMS:Data Type Conversion

From XMS Wiki
Revision as of 16:37, 20 February 2013 by Jcreer (talk | contribs)
Jump to navigationJump to search

It is sometime useful to convert a 2D grid to a set of scattered data points or a TIN data structure. Data for the grid can then be used to perform operations available for scattered points or TINs.

Grid → Scatter Points

The Grid → Scatter Points command in the Grids menu is used to create a new scatter point set using the nodes or cells of a 2D grid. A copy is made of each of the datasets associated with the grid and the datasets are associated with the new scatter point set.

This command is useful for comparing the solutions from two separate simulations from different grids. For example, if two simulations have been performed with slightly different grids (base vs. plan) it may be useful to generate a contour or fringe plot showing the difference between the solutions. It is possible to generate a dataset representing the difference between two datasets using the data calculator. However, the two datasets must be associated with the same grid before the data calculator can be used. The datasets from one of the grids can be transferred to the other grid as follows:

  1. Load the first grid and its dataset into memory.
  2. Convert the grid to a scatter point set using the Grid → Scatter Points command.
  3. Delete the first grid by selecting the Delete All command from the Edit menu.
  4. Load the second grid and its dataset into memory.
  5. Switch to the 2D Scatter Point module and select an interpolation scheme using the Interpolation Options command in the Interpolation menu.
  6. Interpolate the dataset to the second grid by selecting the Interpolate to Grid command from the Interpolation menu.

At this point, both datasets will be associated with the second grid and the data calculator can be used to compute the difference between the two datasets.

Grid → TIN

A new TIN can be created from a 2D grid by selecting the Grid → TIN command from the Grids menu. Two triangles are created from each cell in the grid. The active scalar dataset becomes the z value of TIN vertices.


Related Topics