Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
leendertvanwolfswinkel committed Oct 14, 2024
1 parent 2598254 commit 9f5700b
Show file tree
Hide file tree
Showing 5 changed files with 155 additions and 2,541 deletions.
179 changes: 155 additions & 24 deletions source/h_schema_300.rst
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ Migration guide

This migration guide describes the changes from database schema version 219 to database schema 300.

For a complete and detailed overview of the changes in each of the tables and columns, see <other/3Di database schema 219 to schema 300.xlsx>`_

.. note::

This migration guide is a work in progress. It will be updated and extended during development.
Expand All @@ -201,19 +203,45 @@ General changes

- All geometry columns have been renamed from "the_geom" to "geom", following current (informal) conventions.

- All tables that have a geometry will also have a code, display name, and tags

Tags
^^^^

A new feature that will be introduced is *tags*. You can define tags in the schematisation, and assign any number of these tags to each feature.
A new feature is the option to add *tags* to each schematisation object. You can define tags in the schematisation, and assign any number of these tags to each feature.

This is useful for administration of data sources and assumptions. For example, if you define a tag "Source: asset management system", you can assign this tag to all pipes that are imported from the asset management system. Pipes that are digitized by hand can be given the tag "Source: digitized by hand".
This is useful for administration of data sources and assumptions. For example, if you define a tag "Source: asset management system", you can assign this tag to all pipes that are imported from the asset management system; pipes that are digitized by hand can be given the tag "Source: digitized by hand", etc.


Settings
^^^^^^^^

For a complete and detailed overview of the changes in the settings tables, see <other/db_schema_300_settings.xlsx>`_

Tables in database schema 219:

- v2_aggregation_settings
- v2_global_settings
- v2_groundwater
- v2_interflow
- v2_numerical_settings
- v2_simple_infiltration
- v2_vegetation_drag

Tables in database schema 300:

- aggregation_settings
- groundwater
- initial_conditions
- interception
- interflow
- model_settings
- numerical_settings
- physical_settings
- simple_infiltration
- simulation_template_settings
- time_step_settings
- vegetation_drag_2d

For a complete and detailed overview of the changes in each of the tables and columns, see <other/3Di database schema 219 to schema 300.xlsx>`_

The settings that were grouped in the global settings table are split up into several tables that are consistent with (i) the grouping in the API, and (ii) the distinctions between settings required to generate the 3Di model and settings required to generate a simulation template. The contents of the global settings table can now be found in:

Expand All @@ -235,40 +263,62 @@ The settings that were grouped in the global settings table are split up into se

- **Interception**: defines the interception that is used in the 3Di model

The ``aggregation_variable`` in the aggregation settings table now uses the same variable names as are used in the computational core (and in threedigrid). The list below shows how each variable is renamed:

- discharge -> q
- flow_velocity -> u1
- pump_discharge -> q_pump
- rain -> rain
- waterlevel -> s1
- wet_cross-section -> au
- wet_surface -> su
- lateral_discharge -> q_lat
- volume -> vol
- simple_infiltration -> infiltration_rate_simple
- leakage -> leak
- interception -> intercepted_volume
- surface_source_sink_discharge -> q_sss

References to raster files were relative paths, starting from the location of the Spatialite (e.g. "rasters\dem.tif"). In schema 300, it should just be the file name ("dem.tif").

Settings tables are no longer referenced from the global settings (e.g. v2_global_settings.simple_infiltration_settings_id -> v2_simple_infiltration.id). Instead, a boolean field switches the specific process on or off (e.g. use_simple_infiltration).

Obstacles have three new attributes to finetune which types of flowlines they affect: 2D, 1D2D open water, and/or 1D2D closed system. For this reason, it matters in which cases 3Di identifies a node as "open water" node, and subsequently sets the flowline type of 1D2D flowlines connecting to such nodes to "open water". Before database schema 300, all nodes without a storage area where regarded as open water. The new default is to regard all nodes that connect to at least one channel as open water. To make the migration backwards compatible, it is still possible to use the old method, by setting the new attribute *node_open_water_detection* in the model settings to 1. In the migration, this is automatically done to be backwards combatible. It is recommended to manually set it to 0 after the migration.

0D Inflow
^^^^^^^^^

- The two methods of schematisating 0D inflow (using "surfaces" and "impervious surfaces") will be merged into a single method. The surface types available for "impervious surface" will still be available, as predefined settings.
Tables in database schema 219:

- v2_impervious_surface
- v2_impervious_surface_map
- v2_surface
- v2_surface_map
- v2_surface_parameters

Tables in database schema 300:

- dry_weather_flow
- dry_weather_flow_map
- dry_weather_flow_distribution
- surface
- surface_map
- surface_parameters

For a complete and detailed overview of the changes in each of the tables and columns, see <other/3Di database schema 219 to schema 300.xlsx>`_

- Dry weather flow will be moved to a separate layer (with Point geometry), with its own mapping
- The two methods of schematisating 0D inflow (using "surfaces" and "impervious surfaces") are merged into a single method. The surface types available for "impervious surface" will still be available, as prepopulated entries in the *surface parameters* table.

- It will be possible to define the distribution of dry weather flow over the 24 hours of the day in the schematisation.
- Dry weather flow is moved to a separate layer (with Polygon geometry), with its own mapping

- The intra-day distribution of dry weather flow over the 24 hours of the day is no longer fixed, but can be defined It will be possible to defined in the *dry weather flow distribution* table.

- If *Use 0D inflow* in the *Global settings* was set to 1, the data from the *Impervious surface* and *Impervious surface map* tables will be used, and data from *Surface*, *Surface map*, and *Surface parameters* will be discarded in the migration from schema version 219 to 300. If *Use 0D inflow* was set to 2, it will be the other way around.

- Option to add tags to each feature

Boundary conditions and laterals
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Tables in database schema 219:

- v2_1d_boundary_conditions
- v2_1d_lateral
- v2_2d_boundary_conditions
- v2_2d_lateral

Tables in database schema 300:

- boundary_condition_1d
- boundary_condition_2d
- lateral_1d
- lateral_2d

For a complete and detailed overview of the changes in each of the tables and columns, see <other/3Di database schema 219 to schema 300.xlsx>`_

- New: option to specifiy time units, interpolation, and/or offset (for laterals)

- New: option to add tags to each feature
Expand All @@ -277,6 +327,27 @@ Boundary conditions and laterals
Structure control
^^^^^^^^^^^^^^^^^

Tables in database schema 219:

- v2_control
- v2_control_delta
- v2_control_group
- v2_control_measure_group
- v2_control_measure_map
- v2_control_memory
- v2_control_pid
- v2_control_table
- v2_control_timed

Tables in database schema 300:

- measure_map
- measure_location
- memory_control
- table_control

For a complete and detailed overview of the changes in each of the tables and columns, see <other/3Di database schema 219 to schema 300.xlsx>`_

Structure control is simplified and the needed tables are given geometries, so they can be schematised, visualised, and edited on the map.

- Add geometries to timed, table, and memory control
Expand All @@ -287,6 +358,22 @@ Structure control is simplified and the needed tables are given geometries, so t
2D
^^

Tables in database schema 219:

- v2_dem_average_area
- v2_grid_refinement
- v2_grid_refinement_area
- v2_obstacle

Tables in database schema 300:

- dem_average_area
- grid_refinement_area
- grid_refinement_line
- obstacle

For a complete and detailed overview of the changes in each of the tables and columns, see <other/3Di database schema 219 to schema 300.xlsx>`_

The changes to *Dem average area*, *Obstacle*, *Grid refinement* and *Grid refinement area* will be minimal. The most important changes will be:

- New: option to add tags to each feature
Expand All @@ -295,6 +382,18 @@ The changes to *Dem average area*, *Obstacle*, *Grid refinement* and *Grid refin
1D2D
^^^^

Tables in database schema 219:

- v2_exchange_line
- v2_potential_breach

Tables in database schema 300:

- exchange_line
- potential_breach

For a complete and detailed overview of the changes in each of the tables and columns, see <other/3Di database schema 219 to schema 300.xlsx>`_

There will be some impactful changes to the schematisation of 1D2D exchange, but this is mainly governed by attributes of schematisation objects in the 1D category.

The changes to *Exchange line* and *Potential breach* will be minimal. The most important changes will be:
Expand All @@ -305,6 +404,38 @@ The changes to *Exchange line* and *Potential breach* will be minimal. The most
1D
^^

Tables in database schema 219:

- v2_channel
- v2_connection_nodes
- v2_cross_section_definition
- v2_cross_section_location
- v2_culvert
- v2_manhole
- v2_orifice
- v2_pipe
- v2_pumpstation
- v2_weir
- v2_windshielding

Tables in database schema 300:

- channel
- connection_node
- cross_section_location
- culvert
- material
- orifice
- pipe
- pump
- pump_map
- weir
- windshielding_1d
- obstacle

For a complete and detailed overview of the changes in each of the tables and columns, see <other/3Di database schema 219 to schema 300.xlsx>`_


- Pipe, Weir, and Orifice will have their own geometry.
- *Calculation type* will be replaced by two columns: *Exchange type* and *Exchange width*
- *Manhole* will no longer have an *Calculation type*; this will be moved to *Connection node* (as *Exchange type* and *Exchange width*)
Expand Down
Binary file not shown.
Loading

0 comments on commit 9f5700b

Please sign in to comment.