Skip to content

Google Summer of Code 2015

silviafranceschi edited this page Aug 23, 2015 · 22 revisions

Weekly report 2015/08/23

##What do I have completed this week?

  • fixed the documentation in the source code
  • finished the documentation of the module in the wiki
  • finished the development of the source code

##What am I going to achieve for next week? Next week I will:

  • submit the final evaluation
  • prepare the code for the code submission

##Is there any blocking issue? No blocking issue.

##Additional info I wanto to thanks my tutors for the great help and the support in succesfully finishing the Google Summer of Code. There are some minor changes that I would like to do the the code, I will work on it during the next months for my PhD work.

Weekly report 2015/08/16

##What do I have completed this week?

  • fixed/updated the documentation in the source code
  • tested with real data
  • started the documentation of the module in the wiki

##SAINTGEO

The module developed during this GSoC2015 is SaintGeo, a simple 1D hydraulic model based on the equations of Saint Venant.

Input

  • inRiverPoints: the shapefile containing the points of the main stream river starting from upstream with as attributes:

    • sectionid: ID of the corresponding section

    • prog: progressive distance from upstream

    • elev: elevation of the river point

  • inSections: the shapefile containing the linestring of the sections with as attributes:

    • sectionid: ID of the section

    • prog: progressive distance from upstream

  • inSectionsPoints: the shapefile containing the measured points of each section with as attributes:

    • index: progressive id of the point inside the section starting from left bank looking the river from upstream

    • elev: elevation of the section point

    • sectionid: ID of the section of which the point belongs

    • prog: progressive distance from upstream

These first three inputs can be calculated using the module RiverSectionsExtractor which can be used also to prepare the inputs for running HECRAS.

  • inDischarge: input CSV file containing the head discharge in m3/s

  • inDownstreamLevel: input CSV file containing the downstream levels as elevation above sea level

  • inLateralId2Discharge: input CSV file containing the lateral discharge contributes or offtakes and the ID of the referencing sections

  • inConfluenceId2Discharge: input CSV file containing the discharge coming from the lateral immission from confluences and the ID of the referencing sections

###Output

  • outputLevelFile: output file with levels

  • outputDischargeFile: output file with the quantities related to discharge

###Description The module now works considering only two boundary conditions:

  • upstream discharge

  • downstream water level

and can be used for supercritical and subcritical flow regimes.

An example of application of SaintGeo on a supercritical discharge is reported in the following pictures.

The basic profile of the river (red) with the water level corresponding to three different timesteps (t=0, t=177 h and t=359 h): as you can see from the image the downstream condition is never used and all is controlled from upstream (supercritical flow). basic_profile

In SaintGeo there is the possibility to add the contributes of the confluences. To do this it is necessary to identify the river sections where the confluences are located and insert the contributing discharge. The output is something like here: basic_profile

where the profiles increase in corrispondence of the confluences. The influence of the incoming discharge is limited to downstream because this is a supercritical flow.

SaintGeo can be used also to simulate non natural situations, where there are offtakes of water from the river (e.g. hydropower or irrigation use). Here are two different examples where the discharge taken form the river is equal and less than the flowing discharge.

basic_profile basic_profile

##What am I going to achieve for next week? Next week I will:

  • fix the documentation

##Is there any blocking issue? No blocking issue.

Weekly report 2015/08/09

##What do I have completed this week?

  • fixed some bugs in the main algorithm to have fisically coherent results
  • split the output in two different files to divide the quantities related to water depth and those related to dicharge
  • added timeseries reading parts for inputs lateral inflow and outflow
  • started testing on real data

##What am I going to achieve for next week? Next week I will:

  • continue the testing with real data
  • finalize the code with last bugs

##Is there any blocking issue? No blocking issue.

Weekly report 2015/08/02

##What do I have completed this week?

  • finalized the adaption of the HecrasInputBuilder to the new generic section extractor of the JGrassTools
  • found some input data for testing on the Adige river (Italy)
  • fixed the input data and extracted the module to modules package: moved the main algorithm in the OmsSaintGeo class and moved the input/output in SaintGeo
  • added timeseries reading parts for inputs (discharge, water level)
  • fixed some bugs in the main algorithm on the indexes of the sections points for solving the finite difference schema.

##What am I going to achieve for next week? Next week I will:

  • continue the testing with real data and verify the results
  • start adding the inflow and outflow with timeseries data

##Is there any blocking issue? No blocking issue.

Weekly report 2015/07/26

##What do I have completed this week?

  • continued coding the method for the solution of the Saint Venant equations
  • developed the method for solving the finite difference operator with a discretization upwind
  • looked for some data for testing

##What am I going to achieve for next week? Next week I will:

  • start fixing the issues contained in the developed code
  • prepare real data for testing
  • start testing with real data

##Is there any blocking issue? No blocking issue!

Weekly report 2015/07/19

##What do I have completed this week? I participated to the FOSS4G2015-EU in Como and did a presentation containing also some tools I developed during the GSoC of the last year. During the free time and the code spint of Saturday:

  • fixed some issues in the implemented code for solving the Saint Venant equations
  • fixed the documentation of the developed code

The workflow of the method to solve the equations of Saint Venant is:

  1. call the method wettedArea to evaluate all the variables dependent from water depth and geometries of the section, the result are stored in the idrgeo matrix
  2. calculate the vector of the average velocity on the section (U) for the timestep n
  3. calculate the explicit part of the dissipative term (GAM) at time n in the intermediate sections
  4. call the FQ function to solve the finite difference operator upwind for the timestep n
  5. define the coefficients of the matrix and the denominate number as a function of the boundary conditions (upstream and downstream)
  6. solve the tridiagonal system to calculate the water depth at timestep n+1 through the method ris_sistema
  7. calculate the discharge and the velocity for the timestep n+1 considering the water depth and the geometry of the sections
  8. verify to respect the Courant condition The code is still a working progress, and it needs to be fixed and tested during the next week, after developing the remaining parts.

##What am I going to achieve for next week? Next week I will:

  • fix some issues on the developed code for the solution of the Saint Venant equations
  • continue coding the method for the solution of the Saint Venant equations
  • start developing the method for solving the finite difference operator with a discretization upwind

##Is there any blocking issue? Finally no blocking issue this week!

Weekly report 2015/07/12

##What do I have completed this week? I started the implementation of the main 1D hydraulic model.

###Input

####Vector maps output of the OmsRiverSectionsExtractor

  • inRiverPoints: the main stream river points (with the elevation in the attribute table)
  • inSections: the section lines
  • inSectionPoints: the section points (with the elevation in the attribute table)

####Data files for initial and boundary conditions

  • inDischarge: the input head discharge
  • inDownstreamLevel: the input downstream level

####Data files for external contribution (confluence, tribute or offtake)

  • inLateralId2DischargeMap: lateral discharge tribute or offtake section discharge values for each ID
  • inConfluenceId2DischargeMap: lateral immission from confluences discharge values for each ID

###Parameters

  • pDeltaTMillis: internal time inteval for simulations in milliseconds

###Output

  • outputFile: the output file with discharge and water level for each section and for each timestep

###Description of the implementation of the model The main sections of the hydraulic model are:

  1. definition and initialization of the variables
  2. evaluation of the initial conditions: the hypotesis is the steady flow in all the sections with the discharge corresponding to the first value of the discharge serie of data, the formula used for this calculation is the one of Gaukler and Strickler
  3. check for lateral contributes (confluences, intake or offtake)
  4. manage the main cycle of the simulation: call the method for the evaluation of the water level in each section considering the current flow and boundary conditions.

##What am I going to achieve for next week? Next week I will:

  • fix some minor issues on the developed code
  • start coding the method for the solution of the Saint Venant equations

##Is there any blocking issue? I will participate to FOSS4G-EU in Como the whole week, I have a presentation on Thursday and I will participate to the codesprint on Saturday.

Weekly report 2015/06/14-21

##What do I have completed this week? I worked on the HecrasInputBuilder and did a huge refactor and fixing/enhancement of the hecras section extractor to be a generic purpose river sections extractor. The new module is OmsRiverSectionsExtractor and can be used to prepare the sections for Hecras and also for my 1D hydraulic model.

###Input

  • inElev: the raster map of elevation
  • inRiver: the vector (line) map of the main stream river of which the sections have to be extracted
  • inBridges: the vector (point) map of bridges sections to consider
  • inSections: the vector (line) map of sections to consider. If supplied, they are used instead of extracting at a given interval, the sections need to be created with this same module in a previous run

###Parameters

  • pSectionsIntervalDistance: the distance between the extracted sections
  • pSectionsWidth: the section width
  • pBridgeBuffer: the buffer to use for bridges
  • fBridgeWidth: the bridge width

###Output

  • outSections: the extracted section lines
  • outSectionPoints: the points of the extracted sections (with the elevation in the attribute table)
  • outRiverPoints: the extracted points on the main stream (with the elevation in the attribute table).";

With these changes I also had to adapt the Hecras extractor to use as input the output of the new module.

##What am I going to achieve for next week? Next week I will:

  • continue studying the Saint Venant equations and the finite difference schema to be implemented in the new model

##Is there any blocking issue? I will be on Honeymoon from 17th Juny to 3dr of July.

Weekly report 2015/06/07

##What do I have completed this week?

#Model specifications The 1D model I will integrate in the JGrassTools library will be based on the Saint Venant equations. These equations are derived from the Reynolds equations with the following hypothesis:

  • uni directional flow
  • unique average velocity on the entire sections

The whole domain, longitudinal coordinate of the river, will be discretized into irregular segments (different width) and a schema at finite difference will be used for solving the equations. The system will require the user to specify both the initial and the boundary conditions to use as starting point for the simulations.

The model will be a simple solution of the Saint Venant equations for the 1D flow, but I will include the possibility to specify for each section if there are inflow or outflow and in case to read a file with the discharge to add/subtract to the main flow at each timestep.

The main input parameters of the 1D hydraulic model are:

  • the parameters of the sections: position, geometry, physical parameters
  • the position and hydraulic hydrograph of the inflows
  • the position and hydraulic hydrograph of the outflows

The output:

  • the discharge in each cross section
  • the water level in each cross section.

#Section extractor There is an existing module in the JGrassTools library called HecrasInputBuilder which creates the input file for the Hecras model basically extracting the sections and the required parameters from:

  • DTM
  • shapefile with the river line
  • shapefile with the bridges.

Using this tool it is possible to extract the sections at regular steps along the river network or to extract the characteristics of a given set of sections.

The tool to extract the sections for the model of Saint Venant will be based on the existing one by extending HecrasInputBuilder or simply by calling the common procedures in the new model.

##What am I going to achieve for next week? Next week I will:

  • continue studying the Saint Venant equations and the finite difference schema to be implemented in the new model
  • study the existing HecrasInputBuilder and decide with my mentor the best solution to implement the required functionalities

##Is there any blocking issue? This model will require a lot of interaction with the user via GUI so there is the need to clarify with my mentors which will be the focus of the work before proceeding with the development: algorithm or GUI.

Weekly report 2015/05/31

##What do I have completed this week?

  • set up all the necessary tools to start coding
  • collect some articles in literature and available master thesis in the field of 1D hydraulics model

Set up tools

  • resumed the fork of the JGrassTools library I did last year for the GSoC on GITHUB all my code will be committed at: https://github.com/silviafranceschi/jgrasstools
  • downloaded all the code on my machine as a clone
  • downloaded all necessary libraries and created the Eclipse project for all sub-projects
  • set up the connection between my fork and the original repository by adding a the original repository to the list of my repositories
  • identified the package where to add my module: /hortonmachine/hydrogeomorphology

Literature review

  • master thesis of Angelo Zacchia: “About some methods for the forecast and prevention of hydraulics risk”
  • Chi Chi Choi, Mantilla: “Development and Analysis of GIS Tools for the Automatic Implementation of 1D Hydraulic - Models Coupled with Distributed Hydrological Models”
  • H.S. Mashriqui, J.S. Halgren, S.M. Reed: “A 1D River Hydraulic Model for Operational Flood Forecasting in the Tidal 3 Potomac: Evaluation for Freshwater, Tidal, and Wind Driven Events”

Work-plan for next week

Next week I will continue wit the literature review and define the main characteristics of the model:

  • the algorithm to develop
  • the pre-processing of the input data
  • the post-processing of the output

Blocking issues

This model will require a lot of interaction with the user via GUI so there is the need to clarify with my mentors which will be the focus of the work before proceeding with the development: algorithm or GUI.