Projection on a Cartesian Grid¶
quantities_cell_projection projects the sum of one or several fields onto a Cartesian grid matching the cells of the
DEM grid. The grid can then be written for ParaView with write_grid_vtklegacy.
| Parameter | Type | Default | Description |
|---|---|---|---|
fields |
list of string |
regular expressions selecting the fields to project, e.g. [vx, ay, stress] |
|
grid_subdiv |
double |
1 |
number of subdivisions of each grid cell (1: no subdivision) |
splat_size |
int ≥ 1 |
1.0 |
smoothing factor controlling the spatial influence of each projected value |
The simplest way is to set simulation_analyses_frequency and add the operator to the analyses batch (see
example/polyhedra/analyses/particle_cell_projection.msp):
Left: relative velocity (surface plot); middle: glyphs of the grid (arrows); right: zoom on the octahedra.
Predefined projections¶
data/config/config_cell_projection.msp provides ready-to-use projections:
| Block | Description | Output |
|---|---|---|
all_cell_proj |
all the available fields | ParaviewOutputFiles/quantities_XXX.vtk |
vnorm_cell_proj |
sum of the velocity norms per cell | ParaviewOutputFiles/vnorm_XXX.vtk |
velocity_cell_proj |
velocity norm and components | ParaviewOutputFiles/velocity_proj_XXX.vtk |
stress_cell_proj |
stress | ParaviewOutputFiles/stress_proj_XXX.vtk |
count_cell_proj |
number of particles per cell | ParaviewOutputFiles/count_proj_%010d.vtk |
Note
These blocks also output count, to compute averages of the projected quantities. They do not use the grid
subdivision.
Full example: example/polyhedra/analyses/particle_cell_projection_count_vnorm_v_stress.msp: