WMS:Data Type Conversion: Difference between revisions

From XMS Wiki
Jump to navigationJump to search
(New page: 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 point...)
 
No edit summary
Line 1: Line 1:
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.
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==
==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 data sets associated with the grid and the data sets are associated with the new scatter point set.
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 data set representing the difference between two data sets using the data calculator. However, the two data sets must be associated with the same grid before the data calculator can be used. The data sets from one of the grids can be transferred to the other grid as follows:
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:


# Load the first grid and its data set into memory.
# Load the first grid and its dataset into memory.
# Convert the grid to a scatter point set using the '''Grid -> Scatter Points''' command.
# Convert the grid to a scatter point set using the '''Grid → Scatter Points''' command.
# Delete the first grid by selecting the '''Delete All''' command from the '''Edit''' menu.
# Delete the first grid by selecting the '''Delete All''' command from the ''Edit'' menu.
# Load the second grid and its data set into memory.
# Load the second grid and its dataset into memory.
# Switch to the 2D Scatter Point module and select an interpolation scheme using the '''Interpolation Options''' command in the '''Interpolation''' menu.
# Switch to the 2D Scatter Point module and select an interpolation scheme using the '''Interpolation Options''' command in the ''Interpolation'' menu.
# Interpolate the data set to the second grid by selecting the Interpolate to Grid command from the Interpolation menu.
# Interpolate the dataset to the second grid by selecting the '''Interpolate to Grid''' command from the ''Interpolation'' menu.
At this point, both data sets will be associated with the second grid and the data calculator can be used to compute the difference between the two data sets.
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==
==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 data set becomes the z value of TIN vertices.
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.





Revision as of 16:37, 20 February 2013

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