Implement new parameterization data input
With the new data structures almost ready, a new data input scheme can be established. The new scheme aims at being more customizable while always ensuring that grid intersections coincide with parameterization singularities ("compatible mesh"). The latter is achieved by the data structure itself.
For the new parameter input, we generally have to discern two use cases. For both, we want to end up with a data structure that maps an entity (or its index) to the soil medium it belongs to.
A (unstructured) grid is created from a GMSH file.
GMSH supports the definition of multiple "physical" entities on a mesh. When reading the mesh file, the grid entities can be mapped to the ID of the physical entity they belong to by their index (using a
A regular (but possibly unstructured) grid is created with the
In this case, we require additional input in the form of a data file. When building a grid with
x \times y \times zcells, a dataset with equal dimensions and extensions is required. For each cell, it states an medium index:
id = data[z][y][x]. H5 is a suitable format, and we can re-use
Both use cases can/should encompass the usage of Python scripts: With
pygmsh, one can easily write a
.geo GMSH input file with Python and afterwards compile it to a mesh (this requires the GMSH CLI to be installed). Also, it's really easy to write a multi-dimensional H5 file with
For the input of the parameters themselves, we use a new file in YAML format. It specifies the name of the soil layer, its id, the parameterization type, and the parameters themselves. The hierarchical layout of YAML makes it easy to hand over sub-nodes to the respective data structures for readout.
In the first implementation, we drop Miller scaling.
Remove the Parameter Field Generator
- Recommend installing the GMSH CLI
- Give example files and instructions on how to generate input files
H5Fileto also read datasets of
RichardsSimulationto build grid itself
- Two modes:
regular: Read GMSH file or build grid with
- Create mapping from cell ids to soil medium id
- Leave option for building
RichardsSimulationwith a grid instance
- Two modes:
RichardsParameterizationinstances from input file
- Build parameter map from mapping between cells ids and medium ids
Use case flow chart
--- sand_1: # name type: MvG # Mualem–van Genuchten index: 1 # layer index for reference parameters: alpha: -10.0 K_0: 1E-5 n: tau: theta_r: theta_s: my_layer: type: # ... # ...
How to test the implementation?
- tests work with new exemplary/default input files
Add test executables for
- Reading arbitrary H5 files.
- Correct grid cell - medium id mapping for 2D and 3D test cases, respectively.
See #63 (closed)