D3PLOT 22.1

Mapping Data Onto a Cellular Grid for Plotting

Mapping data onto a cellular grid for plotting

Some element types, notably Airbag particles but also SPH and DES elements, are "single point" and do not form a connected mesh, therefore contouring their results by averaging data across connected elements is not possible. D3PLOT performs contour plots by drawing each element in a single colour, but this is not always satisfactory since it can be hard to understand overall behaviour from a myriad of individual element results.

Data mapping attempts to solve this problem by imposing a cellular "sugar cube" mesh over the volume of space containing these elements, and computing values for each cell from the individual elements that occupy this cell. Since each cell in the mesh is connected to its neighbours it is possible to contour data across the mesh as a whole, and this can be especially useful for performing ISO surface plots, and also for plotting data on cut sections.

This image shows a notional distribution of "point" elements, coloured by contour value, distributed through a "sugar cube" cellular mesh.
Performing some calculation to aggregate all elements in a cell into a single value might give a result like this.

The value of this process is best demonstrated by example. The following sequence of images shows a series of frames of an airbag being inflated using the CPM method (*AIRBAG_PARTICLE).

(1) Firstly a sequence showing the bag fabric being inflated.

The inflator is at the back, and the bag is a "U" shape in which gas has to travel towards the observer on the left hand side as viewed here, then across the near side, and finally away from the observer to fill the right hand side. The sequence below is approximately 16 milliseconds long with 1ms between frames, and just shows a shaded plot of the bag fabric..0000

(2) Contour plot of particle translational velocity

Pressure in an airbag is a function of the sum of particle translational velocity within the volume "near" each particle, but it is clear from the sequence of images below that simply contouring particle velocity does not give a proper indication of pressure since each particle "bounces around" and it is impossible to get anything other than a very general feel for gas behaviour.

(3) Data-mapped display of Pressure calculated from the above

This plot shows the result of aggregating the particle velocities above into a cellular mesh, and calculating a pressure value for each cell. All particles in the cell are then given the same pressure value, which is why there are discrete blocks of colour.. A pattern is starting to emerge, but it is still hard to read.

(4) ISO plot of PARTICLE_PRESSURE, with a cut section active

The plots below are the result of performing an ISO plot through the data in image (3) above, and cutting the bag roughly 1/2 way up its vertical axis to reveal the internal pressure distribution. It now becomes much easier to visualize the internal pressure and the flow of gas through the bag.

(5) Mapped velocity plot (plan view from above of the same bag, inflator on right)

In this case individual particle velocities have been mapped onto a cellular grid, then all particles within a cell have been assigned the average velocity vector in that cell. This gives an indication of gas flow direction and velocity.

What data is actually mapped?

At present only "single point" element types can have their data mapped, which means airbag particles, SPH elements and Discrete Element Sphere (DES) elements.

Experience has shown that ISO plots through all these element types work well, but that cut-sections through SPH and DES elements are normally best left unmapped, since while these two element types may not be connected in a mesh they are nevertheless usually modeled as a block of adjacent elements, and cut sections expose the inside of such blocks well.

Nevertheless it is possible to cut through these types and the image below shows the result of a sand dune modeled with SPH elements being hit by a vehicle. On the left display shows the raw SPH element data, and on the right data mapping has been used to create an ISO plot and a continuously contoured cut section through the sand.

How is mapping performed?

Different data component require different mapping methods, and the size of the cells used can also influence the outcome. Three settings control mapping:

(1) Cell size.

When data is mapped D3PLOT will automatically calculate the bounding box that encloses the relevant elements, and this box is then sub-divided into cubical cells. The size of these cells can be controlled in the following ways:


Char #cells down edge The number of cells down the longest edge will be approximately the value given (default 15) and this sets the size of the cube used for all cells. In these three modes the mapping volume is automatically sized to enclose the bounding box around the elements being plotted.
%age of model bounding box The bounding box round the model's undeformed geometry is calculated, and the cell size the is the specified %age of this value.
Fixed cell size The user sets an explicit cell size in model space units.
User-defined grid The user sets the origin coordinate, cell size and #cells in each of the [X,Y,Z] dimensions. In this mode the grid remains fixed in model space over all results states.


It may be necessary to experiment to experiment a bit to find the best cell size for a given model, and different data components may also benefit from different cell sizes.


(2) Calculation method

Sum of data in cell Simple sum of the data values of all the elements that lie in a cell
Average of data in cell The sum as above, but divided by the number of elements in the cell.
Greatest magnitude in cell The single value with the greatest magnitude of all elements in the cell.

It is also possible to decide whether to use the raw value as calculated by the method above, or to divide this value by cell volume.

Note : certain "built in" mapped components (airbag particle pressure and velocity) will temporarily override these settings in order to calculate the correct values, and may have further internal factors as required to obtain the correct results. See Other values calculated by D3PLOT for more information.


(3) Data smoothing

The mapping process itself introduces a degree of smoothing into the results, but further smoothing can help with some data components. By default no smoothing is performed, but if turned on data in each cell will be a weighted average of the data in the cell itself plus that in the N cells that surround it.

Further data mapping options

Draw cut plane When a cut-plane is active, and this data type is set to be displayed on it (see above) the default is for the cut plane itself to show contoured results in the appropriate plotting mode. However in some cases, especially thick cuts through airbag particle plots, it can be helpful to omit the cut plane itself so that the "sliced data inside the bag" can be seen more clearly, and this option allows display of the plane to be switched off.
Draw underlying item symbols By default the actual element symbols, for example airbag particles, will be included in data mapped contour plots. Sometimes this is a nuisance, particularly in ISO plot, so deselecting this option will suppress these symbols in those plots only.
Show mapping cell borders Normally the cells used for mapping are invisible, but it can be useful to visualise them when trying to work out what is happening. Selecting this option will display the matrix of cells. An example is shown below.

This shows the section through the SPH mesh used in the example above, but this time with cell borders visible.

This is an orthogonal XZ view, so only a 2D grid is seen, an isometric view would should the full 3d grid.