The data files for the project are in directory: SpatVar_002\Exercises\Case 2\Data. Look for ! TODO text in the datafile and follow the instructions.
Case2 example shows how to define a regular grid with rectangular cells and export the values at grid points. To do that first the Spatial_grid needs to be created (this will internally create an "empty" spatial grid). Then the Spatial_grid_output data structure may be assigned the created spatial grid to map variable values at grid nodes for output.
Spatial_grid
Data File |
|
* Spatial_grid NUM=1 ! --------------------------------- Name "Complete_Domain" Type "Grid1" Grid_origin IDM=3 /MinX/ 0.0 /MinY/ 0.0 /MinZ/ 0.0 Num_cells_x 5 Num_cells_y 100 Num_cells_z 1 Cell_division_x 20 Cell_division_y 10 Cell_division_z 0
|
1Spatial_grid data structure is defined 2The name of the grid is set to "Complete_Domain" 3The type of grid is set to "Grid1" (grid with rectangular cells with same size in each direction. For more info on grid types see Spatial_grid) 4The grid origin is specified at (X, Y, Z) = (0, 0, 0) 5In X direction grid is discretized in 5 cells of 20 m each. In Y direction grid is discretized in 100 cells of 10 m each. In Z direction no discretization is made.
|
The Spatial_grid_output is defined after the second Control_data so that the exported results correspond to the end of the analysis.
Spatial_grid_output
Data File |
|
* Spatial_grid_output NUM=1 ! --------------------------------- Name "Complete_Domain" Grid_assignment "Complete_Domain" File_name "OutputGrid" Grid_name_flag 1 Geometry_entity_flag 0 Element_variables IDM=5 "Strs_xx" "Strs_yy" "Strs_xy" "Press" "Efstrs"
|
1The name of the exported grid is set to "Complete_Domain". Note that even though the previously created grid was named "Complete_Domain" a name for the exported grid may be defined (which may be different to the previously created grid name). If not defined the exported grid will be named with a generic name "Spat_grid". 2Previously created grid named "Complete_Domain" is assigned to map the values into it and export. 3File name is defined as "OutputGrid". Because Grid_name_flag is set to 1 the exported file name will be "OutputGrid_Complete_Domain.spat" 4Geometry_entity_flag is set to 0 so geometry entities at each grid point are not output. 5The element variables to be mapped to the grid and exported are specified. They are Stress in X and Y directions, Shear stress in XY plane, Effective Mean Stress (Press) and deviatoric stress (Efstrs).
|
Results
The result files for the project are in directory: SpatVar_002\Exercices\Case2\Results. Note that there are grid points for which the exported values are 0. This is because the grid points are outside of the model domain due to compaction. Optionally Boundary_map_flag may be set to 1 in the Spatial_grid data structure defined in the datafile prior to output. This will result in assigning the closest value to grid points outside model domain.
OutputGrid_Complete_Domain.spat
View of the defined grid.
|