Skip to content

Commit

Permalink
Add documentation for the .grid file.
Browse files Browse the repository at this point in the history
  • Loading branch information
alarshi committed Jan 23, 2025
1 parent a6dc4ac commit fab832e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions doc/sphinx/GWB_parameter_listings/visualization_grid_file/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,32 @@ Visualization Grid file
```{todo}
This part of the manual is used to list all the parameters for the visualization grid file.
```

The visualization grid file is used to create a structured mesh and populate the node points with the generated world, i.e., initial conditions of temperature, composition, grains, etc. In essence, it is a text file that contains 3 major sections specifying the mesh points and values :

1. Mesh Output Type
* grid_type = annulus|cartesian|chunk|spherical
The geometry of the output grid. The `gwb-grid` will not throw an error if the chosen grid type is inconsistent with the coordinate system in the input world_builder (`.wb`) file, but the generated output values would not make much sense. This means that for the spherical coordinate system, either of the `annulus`, `spherical`, or `chunk` grid types would give expected output for the computed properties.

* dim = 2|3
The dimensions of the world.

* compositions = 0
The number of compositions the output .vtu file contains. It can be any number from 0 to MAX_UNSIGNED_INT value. This means that even if we only have 1 composition in the input `.wb` file, it is possible to create visualization outputs for many compositional fields, which will be just equal to zero everywhere in the output mesh. If no value is specified, then it is assumed that there are no compositional fields, i.e., `compositions = 0`.

2. Mesh extent
The following lines specify the domain of the grid. In case of 2D, you only need to specify the x and the z extent. Each of the following variables can be a double with a value from -MAX_DOUBLE to MAX_DOUBLE (inclusive)
* x_min
* x_max
* y _min
* y_max
* z_min
* z_max

3. Mesh discretization
Along with the domain extent, we also need to specify the number of points along each direction (for a 2D cross-section of world, only specify in the X and Z directions). The following variables will do exactly that and can have any value from 1 to the MAX_INT (inclusive).
* n_cell_x
* n_cell_y
* n_cell_z

An easier way to start writing your grid file is to copy any existing grid file available under the `tests` or `examples` directory and modify the file to include all the features from your `.wb` file.

0 comments on commit fab832e

Please sign in to comment.