From fab832e189eff8d4d183cdfd5581cf43c6d0c5c1 Mon Sep 17 00:00:00 2001 From: Arushi Date: Thu, 23 Jan 2025 18:34:33 +0100 Subject: [PATCH] Add documentation for the .grid file. --- .../visualization_grid_file/index.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/doc/sphinx/GWB_parameter_listings/visualization_grid_file/index.md b/doc/sphinx/GWB_parameter_listings/visualization_grid_file/index.md index 77d022aef..d503cfd34 100644 --- a/doc/sphinx/GWB_parameter_listings/visualization_grid_file/index.md +++ b/doc/sphinx/GWB_parameter_listings/visualization_grid_file/index.md @@ -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. \ No newline at end of file